[Biojava-l] order of circular and compound location

Schreiber, Mark mark.schreiber at agresearch.co.nz
Sun Apr 13 19:53:15 EDT 2003


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



More information about the Biojava-l mailing list