public void compareTomIsotopicDist_with_Mercury() { double mz = 1154.98841279744; //mono MZ int chargestate = 2; double fwhm = 0.0290254950523376; //from second peak of isotopic profile double monoMass = 1154.98841279744 * chargestate - chargestate * 1.00727649; double resolution = mz / fwhm; MercuryDistributionCreator distcreator = new MercuryDistributionCreator(); distcreator.CreateDistribution(monoMass, chargestate, resolution); distcreator.getIsotopicProfile(); Assert.AreEqual(8, distcreator.IsotopicProfile.GetNumOfIsotopesInProfile()); StringBuilder sb = new StringBuilder(); TestUtilities.ReportIsotopicProfileData(sb, distcreator.IsotopicProfile); IsotopicProfile cluster = TomIsotopicPattern.GetAvnPattern(monoMass, false); sb.Append(Environment.NewLine); TestUtilities.ReportIsotopicProfileData(sb, cluster); Console.Write(sb.ToString()); }
public void getpeaksFromDistributionTest1() { double mz = 1154.98841279744; //mono MZ int chargestate = 2; double fwhm = 0.0290254950523376; //from second peak of isotopic profile double monoMass = 1154.98841279744 * chargestate - chargestate * 1.00727649; double resolution = mz / fwhm; MercuryDistributionCreator distcreator = new MercuryDistributionCreator(); distcreator.CreateDistribution(monoMass, chargestate, resolution); distcreator.getIsotopicProfile(); Assert.AreEqual(8, distcreator.IsotopicProfile.GetNumOfIsotopesInProfile()); StringBuilder sb = new StringBuilder(); TestUtilities.ReportIsotopicProfileData(sb, distcreator.IsotopicProfile); Console.Write(sb.ToString()); }
public void test1() { MassTag mt = new MassTag(); mt.ID = 56488; mt.MonoIsotopicMass = 2275.1694779; mt.PeptideSequence = "TTPSIIAYTDDETIVGQPAKR"; mt.NETVal = 0.3520239f; mt.CreatePeptideObject(); mt.ChargeState = 2; Run run = new XCaliburRun(); ResultCollection rc = new ResultCollection(run); rc.Run.CurrentMassTag = mt; Task theorGen = new TomTheorFeatureGenerator(); theorGen.Execute(rc); mt.CalculateMassesForIsotopicProfile(mt.ChargeState); MercuryDistributionCreator distcreator = new MercuryDistributionCreator(); distcreator.CreateDistribution(mt.MonoIsotopicMass, mt.ChargeState, 40000); distcreator.getIsotopicProfile(); TestUtilities.DisplayIsotopicProfileData(mt.IsotopicProfile); //TestUtilities.DisplayIsotopicProfileData(distcreator.IsotopicProfile); Assert.AreEqual(7, mt.IsotopicProfile.Peaklist.Count); Assert.AreEqual(1138.59201544m, (decimal)mt.IsotopicProfile.Peaklist[0].XValue); Assert.AreEqual((1138.59201544m + 1.00235m / 2m), (decimal)mt.IsotopicProfile.Peaklist[1].XValue); }