[Biojava-dev] Calculation error in MassCalc.getMass()

Thomas, JR jrt4 at york.ac.uk
Tue Feb 18 09:14:48 EST 2003


Hi Lachlan, 

Lachlan Coin wrote:
> 
> Hi Jerry and Matthew,
> 
> I noticed also that MassCalc checks for a protein alphabet, and so will
> fall over if the alphabet is a PROTEIN-T alphabet - i.e. protein +
> termination symbols. It might be good to fix this at the same time:
> 
> Lachlan

Thanks, I didn't realize this.  I can ignore the termination symbol and
return the mass for the rest of the sequence, if that's acceptable. 
> >
> >
> > Hi Jerry,
> >
> > I don't know anything about masses. Could someone else from the list
> > seccond this? We should get this sort of thing right.
> >
> > Matthew
> > 

For those not familiar with the mass calculation, here is a summary. 

A generic amino acid in a peptide or protein looks like this (R is the
side-chain and ---- is the peptide bond): 

----NH-CH(R)-CO---- 

The average and monoisotopic masses for the internal residues are
correct in ResidueProperties.xml.  (Average mass is a weighted average
of all the isotopes, whereas monoisotopic only
includes the most abundant isotope, e.g. C12.) 

The whole peptide looks like this: 

    NH2-CH(R)-CO2H 

So, we need to add one H for the N-terminus and one OH for the
C-terminus to get the mass, and one final H to get the M+H mass.  (The
M+H+ ion is often the charged species seen in
mass spectrometry.) 

MassCalc.getMass() calculates (correctly) the OH mass based on whether
average of monoisotopic is selected, 

        if(isotopicType.equals(SymbolPropertyTable.AVG_MASS)){ 
           hydroxMass = Havg + Oavg; 
        } 
        else if(isotopicType.equals(SymbolPropertyTable.MONO_MASS)){ 
           hydroxMass = Hmono + Omono; 
        } 

then (incorrectly) adds two OHs for the mass and three OHs for M+H. 

                if (MH_PLUS) 
                { 
                   pepMass = pepMass + 3 * hydroxMass; 
                } 
                else 
                { 
                   pepMass = pepMass + 2 * hydroxMass; 
                } 

It should do this instead: 

        if(isotopicType.equals(SymbolPropertyTable.AVG_MASS)){ 
           hydroxMass = Havg + Oavg; 
           protonMass = Havg; 
        } 
        else if(isotopicType.equals(SymbolPropertyTable.MONO_MASS)){ 
           hydroxMass = Hmono + Omono; 
           protonMass = Hmono; 
        } 

                if (MH_PLUS) 
                { 
                   pepMass = pepMass + hydroxMass + (2 * protonMass); 
                } 
                else 
                { 
                   pepMass = pepMass + hydroxMass + protonMass; 
                } 

hope this helps, 

Jerry 

  > > Jerry Thomas wrote:
> > > I believe the masses returned by MassCalc.getMass() to be incorrect.
> > >
> > > The internal residue masses used for amino acids are correct, but the
> > > terminii are calculated incorrectly.  Instead of adding H for the
> > > N-terminus and OH for the C-terminus, the masses of two OHs are added.
> > > For M+H, instead of adding an extra H, the mass of a third hydroxyl is
> > > added!
> > >
> > > For example, MassCalc gives a monoisotopic M+H mass for angiotensin
> > > (DRVYIHPFHL) of 1328.6751, whereas the correct value is 1296.6853.  The
> > > difference is due to the two extra oxygens (2 * 15.9949 = 31.9898).
> > >
> > > If there are no objections, I will correct the code, and add a test app
> > > to demos.
> > >
> > > cheers,
> > >
> > > Jerry
> > >

-- 
Jerry Thomas, PhD
Manager, Analytical Biochemistry Lab

Technology Facility 
Department of Biology (Area 15)     
University of York         office: +44 (0)1904 328 733
PO Box 373                  lab:    +44 (0)1904 328 735
York YO10 5YW       mobile: +44 (0)7050 376 230
------------------------------------------------------


More information about the biojava-dev mailing list