예제 #1
0
        public PrecursorQuantificationResult GetPrecursorQuantificationResult(int replicateIndex, TransitionGroupDocNode transitionGroupDocNode)
        {
            PrecursorQuantificationResult result = null;

            if (IsotopologResponseCurve)
            {
                result = new PrecursorQuantificationResult();
                var calibrationPoint = new CalibrationPoint(replicateIndex, transitionGroupDocNode.LabelType);
                CalibrationCurve calibrationCurve = GetCalibrationCurve();
                result = (PrecursorQuantificationResult)result.ChangeNormalizedArea(GetNormalizedPeakArea(calibrationPoint));
                if (HasExternalStandards() || HasInternalStandardConcentration())
                {
                    double?calculatedConcentration = GetCalculatedConcentration(calibrationCurve, calibrationPoint);
                    result = (PrecursorQuantificationResult)result.ChangeCalculatedConcentration(calculatedConcentration);
                    double?expectedConcentration = transitionGroupDocNode.PrecursorConcentration;
                    result = (PrecursorQuantificationResult)result.ChangeAccuracy(calculatedConcentration / expectedConcentration);
                    result = (PrecursorQuantificationResult)result.ChangeUnits(QuantificationSettings.Units);
                }
            }

            var targetIonRatio = GetTargetIonRatio(transitionGroupDocNode);
            var ionRatio       = PeptideQuantifier.GetQualitativeIonRatio(SrmSettings, transitionGroupDocNode, replicateIndex);

            if (targetIonRatio.HasValue || ionRatio.HasValue)
            {
                result = result ?? new PrecursorQuantificationResult();
                var status = ValueStatus.GetStatus(ionRatio, GetTargetIonRatio(transitionGroupDocNode),
                                                   SrmSettings.PeptideSettings.Quantification.QualitativeIonRatioThreshold / 100);
                result = result.ChangeIonRatio(targetIonRatio, ionRatio, status);
            }
            return(result);
        }
예제 #2
0
 public PrecursorQuantificationResult ChangeIonRatio(double?targetIonRatio, double?ionRatio, ValueStatus ionRatioStatus)
 {
     return(ChangeProp(ImClone(this), im =>
     {
         im.TargetQualitativeIonRatio = targetIonRatio;
         im.QualitativeIonRatio = ionRatio;
         im.QualitativeIonRatioStatus = ionRatioStatus;
     }));
 }