如果有人可以帮助我获得以下代码来输出输入文件(http://biopython.org/DIST/docs/tutorial/examples/ls_orchid.gbk)中所有记录的序列(包括 id),我会很高兴:
use Bio::SeqIO;
use Bio::Seq;
use Bio::DB::GenBank;
$seq_obj = Bio::SeqIO->new(-file => "ls_orchid.gbk" , '-format' => 'genbank');
$seqio_obj2 = Bio::SeqIO->new(-file => '>sequence.fasta', -format => 'genbank' );
while ( my $seq = $seq_obj->next_seq() ) {
print "Sequence ",$seq->id ($seq_obj)"\n";
#print $seq_obj->seq,"\n";
$seqio_obj2->write_seq($seq_obj);
}
我希望看到一个由纯序列(最好带有标题)组成的输出,如下所示:
seq1:
ATTCGCTGCATGACAT..........
Seq2:
ACTGCGATGGATGGAT..
谢谢