[Biojava-l] order of circular and compound location

Schreiber, Mark mark.schreiber at agresearch.co.nz
Mon Apr 14 14:27:26 EDT 2003


Hi -
 
The problem could be solved if we could come up with a way to retain the coordinates in the order they where used to form the union. I'm guessing that CircularLocation may need it's own block iterator which can guarentee order. Probably need some trickiness in the LocationTools.union() method to deal with this.
 
Another possibility would be for a CircularSequence to have a flag that determined the 5' end...
 
These locations are very tricky and problematic, give me a few days to think about it.
 
- Mark
 

	-----Original Message----- 
	From: Yasumasa Shigemoto [mailto:yshigemo at genes.nig.ac.jp] 
	Sent: Mon 14/04/2003 12:07 p.m. 
	To: Schreiber, Mark 
	Cc: biojava-l at biojava.org 
	Subject: Re: [Biojava-l] order of circular and compound location
	
	

	Hi,
	
	In the following case, the location should be 'join(13..14,18..20,1..4)'.
	So I would like to get each contiguous locations in order
	13..14, 18..20 and 1..4.
	
	If the location has a CDS Feature, 5'end and 3'end of the location
	is very important for me.
	
	Thanks,
	Yasumasa Shigemoto
	
	"Schreiber, Mark" wrote:
	
	> Hi -
	>
	> I'm not sure I follow why you want to have any particular location first. The locations are by nature circular so the location you want is simply a circular permutation of the one reported so unless I'm mistaken they are the same thing aren't they?
	>
	> - Mark
	>
	>
	>         -----Original Message-----
	>         From: Yasumasa Shigemoto [mailto:yshigemo at genes.nig.ac.jp]
	>         Sent: Fri 11/04/2003 1:23 p.m.
	>         To: biojava-l at biojava.org
	>         Cc:
	>         Subject: [Biojava-l] order of circular and compound location
	>
	>
	>
	>         Hi,
	>
	>         I am using CircularLocation and LocationTools.union(Location a, Location b).
	>         I would like to build a compound location including CircularLocation
	>         but the order of sublocation seems to miss in this case.
	>
	>         The details are as folllows.
	>
	>         A sample program
	>         ---
	>         import org.biojava.bio.symbol.*;
	>         import java.util.*;
	>
	>         public class CircularTest2 {
	>                 public static void main(String[] args) throws Exception {
	>                         CircularLocation[] locs = new CircularLocation[3];
	>                         locs[0] = LocationTools.makeCircularLocation(13,14,20);
	>                         locs[1] = LocationTools.makeCircularLocation(18,4,20);
	>                         locs[2] = (CircularLocation)LocationTools.union(locs[0], locs[1]
	>         );
	>                         System.out.println(locs[2].toString());
	>                         for(Iterator it = locs[2].blockIterator(); it.hasNext();) {
	>                                 System.out.println(((Location)it.next()).toString());
	>                         }
	>                 }
	>         }
	>         ---
	>
	>         Result
	>         ---
	>         1, 20 {([1,4]), ([13,14]), ([18,20])}  (circular)
	>         [1,4]
	>         [13,14]
	>         [18,20]
	>         ---
	>
	>         I would like to get a sublocation [13,14] at first.
	>         How do I get a correct order in this case?
	>         Does anyone have any suggestion?
	>
	>         Regards,
	>         Yasumasa Shigemoto
	>
	>         _______________________________________________
	>         Biojava-l mailing list  -  Biojava-l at biojava.org
	>         http://biojava.org/mailman/listinfo/biojava-l
	>
	>
	> =======================================================================
	> 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.
	> =======================================================================
	
	


=======================================================================
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-l mailing list