MzIdentMLWriter.cpp is using following formula to write calculated mass to charge:
siip->calculatedMassToCharge = FLOAT_T((peptide->getPeptideMass()+MASS_PROTON)/(double)zstate.getCharge());
Suggested Fix:
siip->calculatedMassToCharge = FLOAT_T((peptide->getPeptideMass() + ((FLOAT_T)zstate.getCharge() * MASS_PROTON)) / ((FLOAT_T)zstate.getCharge()));
MzIdentMLReader.cpp is using following formula to set peptide neutral mass.
FLOAT_T calc_mass = (calc_mz - MASS_PROTON ) * (FLOAT_T)charge;
Suggested Fix:
FLOAT_T calc_mass = (calc_mz * (FLOAT_T)charge) - ((FLOAT_T)charge * MASS_PROTON);
Hi ALice,
Your proposed fix for the first formula looks correct. Please implement.
The second formula (peptide neutral mass) is already correct. Your suggested fix is just a rearrangement of terms and is unnecessary.
Best,
Jeff
On Tue, 3 Feb 2015, Alice Cheng wrote:
Related
Issues:
#239Jeff, Alice,
Maybe we should use/write a macro or inline function for this if it already doesn't exist in crux.
Thanks,
Sean
On Feb 3, 2015, at 6:32 PM, Jeff Howbert howbert@users.sf.net wrote:
Related
Issues:
#239