[Bioperl-l] Parsing multi-record genbank file
Robert Johnson
robjohn7000 at gmail.com
Thu Nov 7 21:23:32 UTC 2013
Hi,
I would be happy if someone could help me get the following code to output
the sequences (including the ids) of all records in the input file (
http://biopython.org/DIST/docs/tutorial/examples/ls_orchid.gbk):
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);
}
Thank you
More information about the Bioperl-l
mailing list