Esempio n. 1
0
        public virtual void AddSelectedChromPeakAndScanSet(ChromPeak bestPeak, ScanSet scanSet, Globals.IsotopicProfileType isotopicProfileType)
        {
            if (isotopicProfileType == Globals.IsotopicProfileType.UNLABELED)
            {
                ChromPeakSelected = bestPeak;
                ScanSet           = scanSet;

                if (ScanSet != null)
                {
                    NumMSScansSummed = ScanSet.IndexValues.Count;
                }

                var failedChromPeakSelection = (ChromPeakSelected == null || Math.Abs(ChromPeakSelected.XValue) < double.Epsilon);
                if (failedChromPeakSelection)
                {
                    FailedResult = true;
                    FailureType  = Globals.TargetedResultFailureType.ChrompeakNotFoundWithinTolerances;
                }
                else
                {
                    FailedResult = false;
                    FailureType  = Globals.TargetedResultFailureType.None;
                }
            }
            else
            {
                throw new NotSupportedException("Cannot add data for a labeled result in this base class");
            }
        }
Esempio n. 2
0
 public virtual void ResetResult()
 {
     Flags.Clear();
     ErrorDescription  = "";
     Score             = 1;
     InterferenceScore = 1;
     IsotopicProfile   = null;
     ChromPeakSelected = null;
     FailedResult      = false;
     FailureType       = Globals.TargetedResultFailureType.None;
 }