[Biojava-dev] Exception in MassCalc.getMass

mark.schreiber at novartis.com mark.schreiber at novartis.com
Fri Mar 30 05:43:05 UTC 2007


Hi George -

Sounds like a good idea. Can you check it in? And add a JUnit test???

You probably don't need to add ambiguity weights to the XML as you can 
decompose a basis symbol into it's components, look up each and get the 
average. Infact there are so many possible amino acid ambiguities it would 
be a very bad idea to list them all in the XML file. Although IUPAC only 
has about 3 amino acid ambiguities BioJava's BasisSymbols can infact 
represent any and every possible combination of ambiguity (although there 
is no obvious way to tokenize them to text) so you would need to allow for 
this in your getEstimated mass method. 

Thanks for spotting this,

- Mark

Mark Schreiber
Research Investigator (Bioinformatics)

Novartis Institute for Tropical Diseases (NITD)
10 Biopolis Road
#05-01 Chromos
Singapore 138670
www.nitd.novartis.com

phone +65 6722 2973
fax  +65 6722 2910





"george waldon" <gwaldon at geneinfinity.org>
Sent by: biojava-dev-bounces at lists.open-bio.org
03/30/2007 01:28 PM
Please respond to george waldon

 
        To:     biojava-dev at biojava.org
        cc:     (bcc: Mark Schreiber/GP/Novartis)
        Subject:        [Biojava-dev] Exception in MassCalc.getMass


I got a NullPointerException in MassCalc.getMass that I traced to the 
presence of an ambiguity symbol X in the peptide sequence. 
The origin lies in SimpleSymbolPropertyTable.getDoubleValue.  The 
ambiguity symbol is first validated (through its matches in 
AbstractAlphabet) and the exception is thrown when we try to find a value 
associated with a null key in the property map.
First I think we should redirect this exception to the checked 
IllegalSymbolException to tell the user that something is going wrong.
Concerning calculating masses, I see two needs: need to estimate the mass 
of polypeptides containing ambiguity symbols and need to obtain an exact 
mass or an IllegalSymbolException when ambiguity occurs.
I propose to add a new method MassCalc.getEstimatedMass to do the first 
part and to modify the existing method so that  an IllegalSymbolException 
is thrown whenever a non-atomic symbol is encounter. Mass values for 
ambiguity symbols would be added to the ResidueProperty.xml file and taken 
as simple average of the atomic match values.

- George
_______________________________________________
biojava-dev mailing list
biojava-dev at lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/biojava-dev






More information about the biojava-dev mailing list