private static void AssignSrmFileItemTo(SrmFileItem source, MzItem target) { target.ObjectName = source.PairedProductIon.ObjectName; target.PrecursurFormula = source.PairedProductIon.PrecursorFormula; target.PrecursurCharge = source.PairedProductIon.PrecursorCharge; target.LightMz = source.PairedPeptide.LightPrecursorMZ; target.HeavyMz = source.PairedPeptide.HeavyPrecursorMZ; }
public bool NameChargeEquals(SrmFileItem another) { if (string.IsNullOrEmpty(this.ObjectName) || string.IsNullOrEmpty(this.PrecursurFormula)) { return(false); } return(string.Equals(this.ObjectName, another.PairedProductIon.ObjectName) && string.Equals(this.PrecursurFormula, another.PairedPeptide.PrecursorFormula) && (this.PrecursurCharge == another.PairedPeptide.PrecursorCharge)); }
private bool IsSameCompound(MzItem a, SrmFileItem b) { if (a.HasName()) { return(a.NameChargeEquals(b)); } else { return(a.MzEquals(b.PrecursorMz, MzTolerance)); } }
public bool ProductEquals(SrmFileItem another, double mzTolerance) { return(MzEquals(this.ProductIonMz, another.ProductIonMz, mzTolerance)); }
public bool PrecursorEquals(SrmFileItem another, double mzTolerance) { return(MzEquals(this.PrecursorMz, another.PrecursorMz, mzTolerance)); }
public bool TransitionEquals(SrmFileItem lh, double mzTolerance) { return((Math.Abs(this.LightProductIon - lh.PairedProductIon.LightProductIon) <= mzTolerance) && (Math.Abs(this.HeavyProductIon - lh.PairedProductIon.HeavyProductIon) <= mzTolerance)); }