[Biojava-l] RE: Going in circles (again)!

Cox, Greg gcox@netgenics.com
Fri, 7 Sep 2001 10:17:42 -0400


Hi Mark, I'm glad to see someone else looking at this.  

I don't know what you mean by a "hospital pass," but handleDecorations() was
just a convenient way to encapsulate the decoration messiness.  It proably
doesn't make sense to keep that method around, but that's your call.  There
were bugs in how BioJava 1.1 handled circular locations, so I don't
reccommend cutting and pasting directly.  How do you plan to handle
operations on two circular sequences not in the same base?  For example,
intersecting 95..10 on a 100 pair plasmid and 100..10 on a 105 pair plasmid?
That's the case I'm not sure about, but don't have any use case for.

I like the idea for isDecorated changing.  I don't know enough about the
guts of Java to know if it saves cycles, but it's cleaner.

Greg

> -----Original Message-----
> From: Mark Schreiber [mailto:mark_s@sanger.otago.ac.nz]
> Sent: Thursday, September 06, 2001 11:44 PM
> To: biojava-l@biojava.org
> Cc: gcox@netgenics.com
> Subject: Going in circles (again)!
> 
> 
> Hi -
> 
> I am in the process of making CircularLocations more 
> compatible with the
> biojava 1.2 api. I have made good progress but I have run aground with
> LocationTools.handleDecorations() which doesn't.
> 
> Is this method intended as a hospital pass? or should it be used by
> decorated methods when performing logical operations?
> 
> In biojava 1.1 the old CircularRangeLocation and CircularPointLocation
> classes implemented the old requirements for 
> Union/Intersection methods
> etc, is there any reason why these could not be used in LocationTools.
> 
> Also would the LocationTools.isDecorated() method be more 
> efficient if it
> had the following signature
> 
> protected static boolean isDecorated(Location loc){
>   return (loc instanceof AbstractLocationDecorator);
> }
> 
> Mark
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Mark Schreiber			Ph: 64 3 4797875
> Rm 218				email mark_s@sanger.otago.ac.nz
> Department of Biochemistry	email m.schreiber@clear.net.nz
> University of Otago		
> PO Box 56
> Dunedin
> New Zealand
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>