コード例 #1
0
        public void ExecutePeakDetectorTest1()
        {
            var testChromatogramDataFile = @"\\protoapps\UserData\Slysz\DeconTools_TestFiles\TargetedWorkflowStandards\massTag635428_chromatogramData.txt";

            var xydata = TestUtilities.LoadXYDataFromFile(testChromatogramDataFile);

            Assert.IsNotNull(xydata);

            Run run = new ConcreteXYDataRun(xydata.Xvalues, xydata.Yvalues);

            var peakDetector = new ChromPeakDetector();

            peakDetector.PeakToBackgroundRatio  = 0.5;
            peakDetector.SignalToNoiseThreshold = 0.5;
            peakDetector.IsDataThresholded      = true;

            run.XYData = xydata;
            peakDetector.Execute(run.ResultCollection);

            Assert.IsTrue(run.PeakList.Count > 0);
            Assert.AreEqual(8, run.PeakList.Count);

            var mostAbundantPeak = run.PeakList.OrderByDescending(p => p.Height).First();

            Assert.IsTrue(mostAbundantPeak is ChromPeak);
            Assert.AreEqual(2498682m, (decimal)mostAbundantPeak.Height);
            Assert.AreEqual(10065.52418m, (decimal)Math.Round(mostAbundantPeak.XValue, 5));
            Assert.AreEqual(92.27364m, (decimal)Math.Round(mostAbundantPeak.Width, 5));
        }
コード例 #2
0
        public void getIsotopicProfile()
        {
            Check.Require(this.data != null, "Data has not been loaded. 'CalculateDistribution' should first be executed");

            Run run = new ConcreteXYDataRun(this.data.Xvalues, this.data.Yvalues);

            run.CurrentScanSet = new ScanSet(0);

            ResultCollection tempResults = new ResultCollection(run);

            peakDetector.PeakBackgroundRatio = 0.5;
            peakDetector.SigNoiseThreshold   = 1;
            peakDetector.PeakFitType         = Globals.PeakFitType.QUADRATIC;
            peakDetector.IsDataThresholded   = true;
            peakDetector.Execute(run.ResultCollection);

            this.IsotopicProfile             = new IsotopicProfile();
            this.IsotopicProfile.ChargeState = this.chargeState;
            this.IsotopicProfile.Peaklist    = run.MSPeakList;
        }
コード例 #3
0
        public void getIsotopicProfile()
        {
            Check.Require(Data != null, "Data has not been loaded. 'CalculateDistribution' should first be executed");

            Run run = new ConcreteXYDataRun(Data.Xvalues, Data.Yvalues);

            run.CurrentScanSet = new ScanSet(0);

            var tempResults = new ResultCollection(run);

            peakDetector.PeakToBackgroundRatio  = 0.5;
            peakDetector.SignalToNoiseThreshold = 1;
            peakDetector.PeakFitType            = Globals.PeakFitType.QUADRATIC;
            peakDetector.IsDataThresholded      = true;
            peakDetector.Execute(run.ResultCollection);

            IsotopicProfile = new IsotopicProfile
            {
                ChargeState = ChargeState,
                Peaklist    = Converters.PeakTypeConverter.ConvertToMSPeaks(run.PeakList)
            };
        }