public IDictionary <IdentityPath, PeptideQuantifier.Quantity> GetTransitionQuantities(CalibrationPoint calibrationPoint) { IDictionary <IdentityPath, PeptideQuantifier.Quantity> result; if (!_replicateQuantities.TryGetValue(calibrationPoint, out result)) { if (calibrationPoint.LabelType == null) { result = PeptideQuantifier.GetTransitionIntensities(SrmSettings, calibrationPoint.ReplicateIndex, false); } else { result = new Dictionary <IdentityPath, PeptideQuantifier.Quantity> { { IdentityPath.ROOT, new PeptideQuantifier.Quantity(PeptideQuantifier.GetIsotopologArea(SrmSettings, calibrationPoint.ReplicateIndex, calibrationPoint.LabelType), 1) } }; } _replicateQuantities.Add(calibrationPoint, result); } return(result); }
public IDictionary <IdentityPath, PeptideQuantifier.Quantity> GetTransitionQuantities(int replicateIndex) { IDictionary <IdentityPath, PeptideQuantifier.Quantity> result; if (!_replicateQuantities.TryGetValue(replicateIndex, out result)) { result = PeptideQuantifier.GetTransitionIntensities(SrmSettings, replicateIndex, false); _replicateQuantities.Add(replicateIndex, result); } return(result); }
public void TestRatioToStandard() { var doc = LoadTestDocument(); foreach (var peptideGroup in doc.MoleculeGroups) { foreach (var peptide in peptideGroup.Peptides) { var peptideQuantifier = new PeptideQuantifier(null, peptideGroup, peptide, QuantificationSettings.DEFAULT.ChangeNormalizationMethod(NormalizationMethod.GetNormalizationMethod(IsotopeLabelType.heavy))); for (int replicateIndex = 0; replicateIndex < doc.Settings.MeasuredResults.Chromatograms.Count; replicateIndex++) { var expected = peptide.Results[replicateIndex].First().LabelRatios.First().Ratio.Ratio; var actual = PeptideQuantifier.SumQuantities( peptideQuantifier.GetTransitionIntensities(doc.Settings, replicateIndex, false).Values, peptideQuantifier.NormalizationMethod).Value; Assert.AreEqual(expected, actual, .0001, "Error on replicate {0}", replicateIndex); } } } }