Menu

#239 MzIdentMLWriter and Reader Calculated Mass To Charge Value Incorrect

post v2.0
closed
None
2015-06-11
2015-02-03
Alice Cheng
No

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);

Related

Issues: #239

Discussion

  • Jeff Howbert

    Jeff Howbert - 2015-02-04

    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:


    ** [issues:#239] MzIdentMLWriter and Reader Calculated Mass To Charge Value Incorrect**

    Status: open
    Milestone: post v2.0
    Created: Tue Feb 03, 2015 11:39 PM UTC by Alice Cheng
    Last Updated: Tue Feb 03, 2015 11:39 PM UTC
    Owner: nobody

    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);


    Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/cruxtoolkit/issues/239/

    To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

     

    Related

    Issues: #239

    • sjoemac

      sjoemac - 2015-02-04

      Jeff, 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:

      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:


      ** [issues:#239] MzIdentMLWriter and Reader Calculated Mass To Charge Value Incorrect**

      Status: open
      Milestone: post v2.0
      Created: Tue Feb 03, 2015 11:39 PM UTC by Alice Cheng
      Last Updated: Tue Feb 03, 2015 11:39 PM UTC
      Owner: nobody

      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);


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/cruxtoolkit/issues/239/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/


      ** [issues:#239] MzIdentMLWriter and Reader Calculated Mass To Charge Value Incorrect**

      Status: open
      Milestone: post v2.0
      Created: Tue Feb 03, 2015 11:39 PM UTC by Alice Cheng
      Last Updated: Tue Feb 03, 2015 11:39 PM UTC
      Owner: nobody

      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);


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/cruxtoolkit/issues/239/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       

      Related

      Issues: #239

  • William S Noble

    William S Noble - 2015-02-26
    • assigned_to: Alice Cheng
     
  • William S Noble

    William S Noble - 2015-06-11
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB
Gen AI apps are built with MongoDB Atlas
Atlas offers built-in vector search and global availability across 125+ regions. Start building AI apps faster, all in one place.
Try Free →