[Biojava-dev] Musings on Locations Features and Strands

Schreiber, Mark mark.schreiber at agresearch.co.nz
Thu Sep 4 19:23:33 EDT 2003


Hi all,
 
As some of you will know the CircularLocation has been problematics for a number of reasons. However, one thing that it has highlighted for me is that Locations can be polar. For example the compound CircularLocation [(1..10), (40..60)] is not the same as [(40..60), (1..10)]. There is some concept of the leftmost end which gives a kind of polarity.
 
Polarity in this case comes about because of the need to specify an arbitrary origin on a circular molecule. Polarity can also be caused by a Location being assigned to a particular strand. Currently in biojava the latter is handled by the StrandedFeature (ie the polarity of the Location is managed at the Feature level). This doesn't work in the case of CircularLocation and the lesson learned is that polarity is better managed at the Location level than the feature level.
 
In a future release of Biojava (or its descendant BioJava2 or what ever we call it), I think either Location or a subinterface should handle polarity. I personally prefer that Location does so you don't need to check object types all the time.
 
What then to do about StrandedLocation? I think that Strand could in many cases be derived from the Locations polarity except in the case of CircularLocations which are polar regardless. In that case an overloaded constructor (possibly hidden in a factory object?) could deal with CircularLocations.
 
Enough ranting. Does this sound sensible? Do you think we coudl roll it into bj1.4 or will it break lots of stuff?  in which case we should wait for BJ2.
 
- Mark

=======================================================================
Attention: The information contained in this message and/or attachments
from AgResearch Limited is intended only for the persons or entities
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipients is prohibited by AgResearch
Limited. If you have received this message in error, please notify the
sender immediately.
=======================================================================



More information about the biojava-dev mailing list