public PeptideDistribution ComputeTracerAmounts(Peaks peaks, out IList <double> observedIntensities, out IDictionary <TracerFormula, IList <double> > predictedIntensities) { if (peaks.GetChildCount() == 0) { observedIntensities = null; predictedIntensities = null; return(null); } observedIntensities = peaks.GetAverageIntensities(); var result = new PeptideDistribution(this, PeptideQuantity.tracer_count) { Parent = this }; PeptideFileAnalysis.TurnoverCalculator.GetTracerAmounts( result, peaks.GetAverageIntensitiesExcludedAsNaN(), out predictedIntensities); if (result.ChildCount > 2) { double turnover; IDictionary <TracerFormula, double> bestMatch; result.PrecursorEnrichmentFormula = PeptideFileAnalysis.TurnoverCalculator.ComputePrecursorEnrichmentAndTurnover(result.ToDictionary(), out turnover, out bestMatch); if (result.PrecursorEnrichmentFormula != null) { result.PrecursorEnrichment = result.PrecursorEnrichmentFormula.Values.Sum() / 100.0; } result.Turnover = turnover; } return(result); }
public PeptideDistribution ComputePrecursorEnrichments( Peaks peaks, out IList <double> observedIntensities, out IDictionary <TracerPercentFormula, IList <double> > predictedIntensities) { if (peaks.ChildCount == 0) { observedIntensities = null; predictedIntensities = null; return(null); } observedIntensities = peaks.GetAverageIntensities(); var result = new PeptideDistribution(this, PeptideQuantity.precursor_enrichment) { Parent = this }; PeptideFileAnalysis.TurnoverCalculator.GetEnrichmentAmounts(result, peaks.GetAverageIntensitiesExcludedAsNaN(), PeptideFileAnalysis.PeptideAnalysis.IntermediateLevels, out predictedIntensities); return(result); }