[Bioperl-l] sub_SeqFeature written

Hilmar Lapp hlapp@gnf.org
Fri, 30 Aug 2002 10:57:46 -0700


On Friday, August 30, 2002, at 07:24  AM, Ewan Birney wrote:

> On Fri, 30 Aug 2002, Michael Muratet wrote:
>
>> Greetings All
>>
>> I'm working on project in which a sub-feature would be very handy. 
>> I was
>> working with Bio::SeqFeature::Generic and using the add_sub_SeqFeature
>> method. It adds the subfeature and you can retrieve it, but when you
>> write the sequence object out via SeqIO(... -file => 'EMBL') the
>> subfeatures are not written to the file. Looking at embl.pm in 
>> SeqIO, it
>> appears as though the hash containing subfeatures is never referenced
>> and therefore never written. Did I miss something, or is this 
>> something
>> that is yet to be implemented?
>
>
> No ... it is a hang-up/screw up when we moved over to the location 
> view of
> composite features.
>
>
> Hmmm. The relevant lines are in embl.pm at 558-587 (main trunk 
> code). You
> will need to put in a sub_SeqFeatures() call and then call
> from_SeqFeature() code on each one. Easy enough to do, just a little
> frustrating.
>

Hmm. :)

The code you're mentioning loops over top_SeqFeatures() -- it is 
FTHelper::from_SeqFeature() that can't deal with hierarchical 
features.

Arrgh. This is not nice code.

In fact, how would you represent in embl/genbank FT format 
hierarchical features when the hierarchy is more than just a 
composite (split) location?

OTOH, if a composite location can readily capture the tree, what 
about having a method $feat->sub_SeqFeature_to_SplitLocation() on a 
SeqFeatureI object, which converts the tree into a SplitLocation? 
Then you'd just always call that (it wouldn't do anything for flat 
features) before handing off to FTHelper, regardless of parser.

My $0.02.

	-hilmar
--
-------------------------------------------------------------
Hilmar Lapp                            email: lapp at gnf.org
GNF, San Diego, Ca. 92121              phone: +1-858-812-1757
-------------------------------------------------------------