Bio::DB::GenBank, Bio::SeqIO

bioperl(http://bioperl.org/)模块使用--生物信息学中用的模块

功能:根据核酸的gi号自动从GenBank中提取FASTA格式的序列,可以多序列提取。

#!/usr/bin/perl -w 

use Bio::DB::GenBank; 
use Bio::SeqIO; 
my $gb = new Bio::DB::GenBank; 

my $seqout = new Bio::SeqIO(-fh => *STDOUT, -format => 'fasta'); 


# if you want to get a bunch of sequences use the batch method 
my $seqio = $gb->get_Stream_by_id([ qw(27501445 2981014)]); 

while( defined ($seq = $seqio->next_seq )) { 
        $seqout->write_seq($seq); 
}


你可能感兴趣的:(Bio::DB::GenBank, Bio::SeqIO)