Robert Johnson | 7 Nov 22:23 2013
Picon

Parsing multi-record genbank file

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

Gmane