~ubuntu-branches/ubuntu/trusty/bioperl/trusty

« back to all changes in this revision

Viewing changes to examples/db/getGenBank.pl

  • Committer: Package Import Robot
  • Author(s): Charles Plessy
  • Date: 2013-09-22 13:39:48 UTC
  • mfrom: (3.1.11 sid)
  • Revision ID: package-import@ubuntu.com-20130922133948-c6z62zegjyp7ztou
Tags: 1.6.922-1
* New upstream release.
* Replaces and Breaks grinder (<< 0.5.3-3~) because of overlaping contents.
  Closes: #722910
* Stop Replacing and Breaking bioperl ( << 1.6.9 ): not needed anymore. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
my $seqout = new Bio::SeqIO(-fh => \*STDOUT, -format => 'fasta');
15
15
 
16
16
# if you want a single seq
17
 
my $seq = $gb->get_Seq_by_id('MUSIGHBA1');
 
17
my $seq = $gb->get_Seq_by_id('J00522');
18
18
$seqout->write_seq($seq);
19
19
# or by accession
20
20
$seq = $gb->get_Seq_by_acc('AF303112');
23
23
 
24
24
# feel free to pull multiple sequences...
25
25
# if you want to get a bunch of sequences use the get_Stream_by_id/acc methods
26
 
my $seqio = $gb->get_Stream_by_id([ qw(J00522 AF303112 2981014)]); 
 
26
my $seqio = $gb->get_Stream_by_id([ qw(J00522 AF303112 2981014)]);
27
27
 
28
28
while( defined ($seq = $seqio->next_seq )) {
29
29
        $seqout->write_seq($seq);