[Bioperl-l] Split locations

Ewan Birney birney@ebi.ac.uk
Mon, 30 Apr 2001 15:40:13 +0100 (BST)


On Sun, 29 Apr 2001, Hilmar Lapp wrote:

> Elia Stupka wrote:
> > 
> > I have changed the sub_Location method on split locations. It used to
> > order locations even if the order parameter was not defined. This screwed
> > EMBL/Genbank dumping majorly because if an mRNA was defined as being made
> > of 300..400 on accession A and then 30..70 on the sequence itself (master
> > seq), the order was reversed. Why is the ordering necessary at all? Is it
> > just for the min_start and max_start methods to work?
> > 
> 
> More or less, yes. min_start() for SplitLocationI implementors is
> supposed to return the minimum start position among its
> sublocations (but obviously only among those on the same
> sequence!), and the other min/max methods respectively. The
> present implementation expects the sublocations to be sorted in
> order to avoid a sort on every call to min/max_something. Right,
> Jason? I'm actually not even sure it handles remote locations
> properly, I have to check.

We'll have to have a different implementation here than sorting these
things because the order in the Split Location is obviously really
important.


Alot of this relies on whether the split location is read-only. My view
would be this ----

  have a _valid_cache getset (set to 0 by default)

  when a set method (eg, add subLocation), _valid_cache is set to zero

  when $split->start is asked for, check _valid_cache - if zero -
calculate start/end points and set _valid_cache to 1.

  


  
  

 > 
> 	Hilmar
> -- 
> -----------------------------------------------------------------
> Hilmar Lapp                              email: hilmarl@yahoo.com
> GNF, San Diego, Ca. 92122                phone: +1 858 812 1757
> -----------------------------------------------------------------
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
> 

-----------------------------------------------------------------
Ewan Birney. Mobile: +44 (0)7970 151230, Work: +44 1223 494420
<birney@ebi.ac.uk>. 
-----------------------------------------------------------------