[Biojava-dev] AlphabetManager and Sequence serialization

Schreiber, Mark mark.schreiber at agresearch.co.nz
Mon Oct 27 21:18:02 EST 2003


Hi all -
 
There has been problems for a while with the AlphabetManager and serialization of protein Sequences. This now appears to be fixed.
 
The solution involved using LifeScienceIdentifiers to uniquely identify Symbols. There should be no noticable changes for most people. Developers will notice that the AlphabetManager.xml file now uses LSIDs to name symbols. No change is made to Symbol.getName() return values. Users who supply custom alphabets as XML will need to use an LSID. The use of LSID's now avoids the possibility of name colisions. Maybe we should use them for other things we register (eg Alphabets which have no protection against name colisions).
 
Other changes. AlphabetManager.symbolForName(String name) is now deprecated, hey it never worked properly anyway. Actually it works better now than it ever did but is only gaurenteed to work now for symbols of with LSID domains of biojava.org which should only be the core ones, don't name custom symbols with that domain. The new method of choice is symbolForLifeScienceID(LifeScienceIdentifier lsid). Only serious developers will ever really need these methods though.
 
All the relevant tests seem to pass, most importantly serialization works with all the core alphabets and they all behave as expected. I will be committing some more unit tests over the next few days to ensure this continues.
 
One last note. DNATools.a() == RNATools.a(). I'm not sure if this was ever the desrired behaivour but that is how it works in biojava1.3 If it isn't it shouldn't be too hard to fix but we should put in a unit test one way or the other to define the behaivour. DNA still doesn't contain RNATools.u() and RNA doesn't contain DNATools.t() which is desirable.
 
The changes are now in CVS for biojava-live and will be on the biojava1.3 branch shortly.
 
Please yell if you notice strangeness.
 
- Mark
 
 
 
 
 

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