[Biojava-l] Simple alignment

Emig, Robin Robin.Emig at maxygen.com
Mon Sep 15 11:18:34 EDT 2003


	Well, The problem is that the code in biojava is "safe", so it copies the Map first thing, but it copies it into a HashMap. So, since what I really need is the have the same order from an iterator that the file was read, all that needs to be done is to have all instances of HashMap in MSFAlignmentFormat, FastaAlignmentFormat and SimpleAlignment to be changed to LinkedHashMap. Then there should be no changes needed to any "interfaces". I think we should also have a unit test built to verify this as well.
-Robin

-----Original Message-----
From: Matthew Pocock [mailto:matthew_pocock at yahoo.co.uk]
Sent: Monday, September 15, 2003 2:13 AM
To: Schreiber, Mark
Cc: Emig, Robin; bio java
Subject: Re: [Biojava-l] Simple alignment


Doesn't TreeMap extend/implement Map? Is there a reason you can't just 
pass a TreeMap into the constructor?

Matthew

Schreiber, Mark wrote:

>Robin -
> 
>How about overloading the constructor?  That way if you provide a TreeMap the result is ordered. If not you get what you get. Many classes are dependent on SimpleAlignment so it may not pay to change it too much.
> 
>- Mark
> 
> 
> 
>-----Original Message----- 
>From: Emig, Robin [mailto:Robin.Emig at maxygen.com] 
>Sent: Mon 15/09/2003 3:04 p.m. 
>To: bio java 
>Cc: 
>Subject: [Biojava-l] Simple alignment
>
>
>
>	        Is there any objection to making SimpleAlignment take a TreeMap instead of a simple Map? The reason is that order of the sequences in the alignment is often of importance. I suppose the alternative is to create a new alignment called OrderedAlignment.
>	-Robin
>	
>	_______________________________________________
>	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.
>=======================================================================
>
>_______________________________________________
>Biojava-l mailing list  -  Biojava-l at biojava.org
>http://biojava.org/mailman/listinfo/biojava-l
>
>  
>





More information about the Biojava-l mailing list