56
56
# also don't want features, just sequence so let's save bandwith
57
57
# and request Fasta sequence
58
58
$gb = new Bio::DB::GenBank(-retrievaltype => 'tempfile' ,
60
60
my $seqio = $gb->get_Stream_by_acc(['AC013798', 'AC021953'] );
61
61
while( my $clone = $seqio->next_seq ) {
62
62
print "cloneid is ", $clone->display_id, " ",
65
65
# note that get_Stream_by_version is not implemented
67
# don't want the entire sequence or more options
68
my $gb = Bio::DB::GenBank->new(-format => 'Fasta',
73
my $seqi = $gb->get_Stream_by_query($query);
75
These alternate methods are described at
76
L<http://www.ncbi.nlm.nih.gov/entrez/query/static/efetchseq_help.html>
78
NOTE: strand should be 1 for plus or 2 for minus.
80
Complexity: gi is often a part of a biological blob, containing other gis
82
complexity regulates the display:
83
0 - get the whole blob
84
1 - get the bioseq for gi of interest (default in Entrez)
85
2 - get the minimal bioseq-set containing the gi of interest
86
3 - get the minimal nuc-prot containing the gi of interest
87
4 - get the minimal pub-set containing the gi of interest
89
'seq_start' and 'seq_stop' will not work when setting complexity to any value
90
other than 1. 'strand' works for any setting other than a complexity of 0
91
(whole glob); when you try this with a GenBank return format nothing happens,
92
whereas using FASTA works but causes display problems with the other sequences
93
in the glob. As Tao Tao says from NCBI, "Better left it out or set it to 1."
69
Allows the dynamic retrieval of Sequence objects (Bio::Seq) from the
97
Allows the dynamic retrieval of L<Bio::Seq> sequence objects from the
70
98
GenBank database at NCBI, via an Entrez query.
72
WARNING: Please do NOT spam the Entrez web server with multiple
100
WARNING: Please do B<NOT> spam the Entrez web server with multiple
73
101
requests. NCBI offers Batch Entrez for this purpose.
75
103
Note that when querying for GenBank accessions starting with 'NT_' you
91
119
Bioperl modules. Send your comments and suggestions preferably to one
92
120
of the Bioperl mailing lists. Your participation is much appreciated.
94
bioperl-l@bioperl.org - General discussion
95
http://bioperl.org/MailList.shtml - About the mailing lists
122
bioperl-l@bioperl.org - General discussion
123
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
97
125
=head2 Reporting Bugs
99
127
Report bugs to the Bioperl bug tracking system to help us keep track
100
the bugs and their resolution. Bug reports can be submitted via email
128
the bugs and their resolution. Bug reports can be submitted via the
103
bioperl-bugs@bio.perl.org
104
http://bugzilla.bioperl.org/
131
http://bugzilla.open-bio.org/
106
133
=head1 AUTHOR - Aaron Mackey, Jason Stajich
121
148
package Bio::DB::GenBank;
123
use vars qw(@ISA %PARAMSTRING $DEFAULTFORMAT $DEFAULTMODE);
124
use Bio::DB::NCBIHelper;
150
use vars qw(%PARAMSTRING $DEFAULTFORMAT $DEFAULTMODE);
126
@ISA = qw(Bio::DB::NCBIHelper);
152
use base qw(Bio::DB::NCBIHelper);
128
154
$DEFAULTMODE = 'single';
129
$DEFAULTFORMAT = 'gp';
131
'batch' => { 'db' => 'nucleotide',
155
$DEFAULTFORMAT = 'gbwithparts';
157
'batch' => { 'db' => 'nucleotide',
132
158
'usehistory' => 'n',
134
'retmode' => 'text'},
159
'tool' => 'bioperl'},
135
160
'query' => { 'usehistory' => 'y',
136
161
'tool' => 'bioperl',
137
162
'retmode' => 'text'},