[Bioperl-l] Location bug for features with sub_SeqFeatures?
Hilmar Lapp
lapp@gnf.org
Tue, 17 Apr 2001 12:55:25 -0700
"Gosink, Mark (SEA)" wrote:
>
> Thanks for the suggestion, unfortunately it didn't seem to work for more
> than 1 sub_feature. Here is the script with multiple sub_features:
>
> use Bio::SeqFeature::Generic;
> use Bio::Seq;
> use Bio::SeqIO;
>
> my $feat = Bio::SeqFeature::Generic->new(-primary => "test");
> my $seq = Bio::Seq->new(-seq => "agctacgaccttgatcgcta", -id =>"test01");
>
> # add sub-features to the feature
> $feat->add_sub_SeqFeature(Bio::SeqFeature::Generic->new(-start => 2, -end =>
> 4, -primary => "sub1"), EXPAND);
> $feat->add_sub_SeqFeature(Bio::SeqFeature::Generic->new(-start => 6, -end =>
> 8, -primary => "sub2"), EXPAND);
> # could add more
>
> # attach to sequence
> $seq->add_SeqFeature($feat);
>
> # print in GenBank format (note that there is lots of stuff missing, like
> species etc)
> my $seqout = Bio::SeqIO->new(-fh => \*STDOUT, -format => "genbank");
>
> $seqout->write_seq($seq);
>
> $seqout->close();
>
> And here's the results:
>
> LOCUS test01 20 bp DNA UNK
> DEFINITION
> ACCESSION unknown
> FEATURES Location/Qualifiers
> sub1 2..4
> sub2 6..8
> test Bio::SeqFeature::Generic=HASH(0xd58d0)..4
This looks like a Location bug. Maybe because of the 'EXPAND'. Hmm.
Jason, any idea? Anyway, I've submitted it as a bug report.
Hilmar
--
-------------------------------------------------------------
Hilmar Lapp email: lapp@gnf.org
GNF, San Diego, Ca. 92121 phone: +1-858-812-1757
-------------------------------------------------------------