[Biojava-dev] Location Unions

Schreiber, Mark mark.schreiber@agresearch.co.nz
Wed, 9 Oct 2002 11:35:03 +1300


> at all. Surely if you're looking for overlapping genes, you 
> really want to keep track of the IDs, and for this you really 
> need to use Features.
> 

You'd think that wouldn't you ;-) Currently the only meaningful ID and
annotation of the location is the location itself 

> But if you're really keen to do this just using Locations,
> how about:
> 
>     - Put the Locations for all your genes into a List
>     - Sort it on Location.naturalOrder
>     - Traverse the list checking for overlaps between
>       neighbouring entries.
> 

That would work too.

> > I think my second proposal of subclassing RangeLocation 
> might be the 
> > nicer solution. It would encapsulate the 'inner' locations, provide 
> > accessor methods (if you want to see them) but not change how the 
> > block iterator behaves.
> 
> Yes, contract-wise that's much better.  But it still seems 
> over- complicated to me, and adding some meaning that 
> Locations were never meant to have.
> 
> Anyone else have views on this?
> 

Probably all of this came about cause the blockIterator didn't do what I
expected it to do (although it did do what it was supposed to do) so I
wanted a way to recover the subcomponents of that block. The merging
behaivour of the union method just seems to produce locations that are
correct and efficient but obliterate all knowledge of how they where
made. I guess it's a philosophical debate about whether the product of a
union is a single location or a set of locations that look like a single
location.

- 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.
=======================================================================