[Biojava-l] introducing a location-less feature into BioJava
Gerald Loeffler
Gerald.Loeffler@vienna.at
Tue, 09 May 2000 22:02:30 +0200
Hi!
i'd like to argue for the removal of the Location-property (method
getLocation()) from org.biojava.bio.seq.Feature, so that features are
location-less, and in turn for the introduction of a new type
(interface) org.biojava.bio.seq.LocatedFeature that has a
Location-property (method getLocation()) as well as a Feature-property
(method getFeature()).
Rationale:
Imagine that sequences A and B (which naturally are FeatureHolders) both
have a feature in common, say a SET-domain. Currently, i see no other
way to represent this in BioJava than to associate a distinct Feature
object with sequence A and another, distinct Feature object with
sequence B. The reason for this is that in order for a feature to be
useful i have to give its location with respect to the FeatureHolder
(the sequences) - and the location of the SET-domain in sequence A will
be different from that in sequence B. Apart from working with
Annotation-conventions on the features, i've no way of making explicit
the fact that these two features are really the same domain.
If, on the other hand, Feature would not contain a Location-property, i
could create a Feature object for the SET-domain (in general). A
distinct LocatedFeature object must then be constructed to link sequence
A to the SET-domain Feature, giving the location of the domain in
sequence A; and the same must be done for sequence B. But the so-created
distinct LocatedFeature objects would explicitly share (hold a reference
to) the same Feature object (for the SET-domain).
What do you think? Am i missing something?
cheers,
gerald
--
Gerald.Loeffler@vienna.at _________________ Software Architect
http://www.imp.univie.ac.at ____ http://www.daemonstration.com
OOA&D, Java, J2EE, JSP, Servlets, JavaBeans, ODBMS, RDBMS, XML