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);
}
I would like to see an output consisting of purely sequences (preferably with headers) as follows:
seq1:
ATTCGCTGCATGACAT..........
Seq2:
ACTGCGATGGATGGAT..
Thank you