Entering edit mode
11.5 years ago
maczerek
▴
40
Hello, I've got some trivial (I guess) question. I try to write features of a sequence in single output sequences. My code looks like that:
my @features = $seq->get_SeqFeatures(); #GenBank sequence
my $split = Bio::Location::Split->new();
foreach my $feat ( @features ) {
if ($feat->primary_tag eq "exon"){ #exons only
$split->add_sub_Location($feat->location);
}
my $cds= $seq->subseq($split);
my $seq = new Bio::PrimarySeq(-seq => $cds,
-id => 'cds',
-alphabet => 'dna');
$seq_out->write_seq($seq);
}}
Unfortunetely every exon is written as separate sequence. What do I do wrong?
Marek