Exemplo n.º 1
0
        public void getSmoothedFramePressuresTest1()
        {
            var uimfRun    = new UIMFRun(FileRefs.RawDataMSFiles.UIMFStdFile3);
            var startFrame = 1000;
            var stopFrame  = 1175;

            var pressuresBeforeAveraging = new List <double>();

            for (var frame = startFrame; frame <= stopFrame; frame++)
            {
                pressuresBeforeAveraging.Add(uimfRun.GetFramePressure(frame));
            }

            uimfRun.ScanSetCollection.Create(uimfRun, startFrame, stopFrame, 1, 1);

            uimfRun.GetFrameDataAllFrameSets();

            uimfRun.SmoothFramePressuresInFrameSets();


            var pressuresAfterAveraging = new List <double>();

            for (var frame = startFrame; frame <= stopFrame; frame++)
            {
                var lcScanset = (LCScanSetIMS)uimfRun.ScanSetCollection.ScanSetList.First(p => p.PrimaryScanNumber == frame);
                pressuresAfterAveraging.Add(lcScanset.FramePressureSmoothed);
            }

            var testScanset1 = (LCScanSetIMS)uimfRun.ScanSetCollection.ScanSetList.First(p => p.PrimaryScanNumber == 1079);

            var testScanset2 = (LCScanSetIMS)uimfRun.ScanSetCollection.ScanSetList.First(p => p.PrimaryScanNumber == 1175);

            Assert.AreEqual(4.0091461, (decimal)testScanset1.FramePressureSmoothed);
            Assert.AreEqual(4.008275, (decimal)testScanset2.FramePressureSmoothed);
        }
Exemplo n.º 2
0
        public void GetNumBinsTest1()
        {
            var uimfRun = new UIMFRun(FileRefs.RawDataMSFiles.UIMFStdFile3);
            var numBins = uimfRun.GetNumBins();

            Assert.AreEqual(148000, numBins);
        }
        public void getDriftProfileFromRawDataMZ_771_Test1()
        {
            Run run = TestUtilities.GetStandardUIMFRun();

            UIMFRun uimfRun = (UIMFRun)run;
            DriftTimeProfileExtractor profileExtractor = new DriftTimeProfileExtractor();

            FrameSet frameset = new FrameSet(805, 804, 806);

            double targetMZ1 = 746.3842;
            double targetMZ2 = 771.6894;


            ScanSetCollectionCreator ssc = new ScanSetCollectionCreator(run, 200, 350, 1, 1);

            ssc.Create();

            System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
            sw.Start();
            XYData xydata = profileExtractor.ExtractProfileFromRawData(uimfRun, frameset, run.ScanSetCollection, targetMZ2, 10d);

            sw.Stop();

            TestUtilities.DisplayXYValues(xydata);
            Console.WriteLine(sw.ElapsedMilliseconds);
        }
        public void getDriftProfileFromRawDataMZ_967_Test1()
        {
            Run run = TestUtilities.GetStandardUIMFRun();

            UIMFRun uimfRun = (UIMFRun)run;
            DriftTimeProfileExtractor profileExtractor = new DriftTimeProfileExtractor();

            FrameSet frameset = new FrameSet(804, 803, 805);

            uimfRun.CurrentFrameSet = frameset;

            double targetMZ = 967.26;


            ScanSetCollectionCreator ssc = new ScanSetCollectionCreator(run, 200, 350, 9, 1);

            ssc.Create();

            //XYData xydata = profileExtractor.ExtractProfileFromRawData(uimfRun, frameset, run.ScanSetCollection, targetMZ, 30d);

            createPeaks(run);
            XYData xydata = profileExtractor.ExtractProfileFromPeakData(uimfRun, frameset, run.ScanSetCollection, targetMZ, 30d);


            TestUtilities.DisplayXYValues(xydata);
        }
        public void uimfTest1()
        {
            UIMFRun            run          = new UIMFRun(uimfFile1);
            MSGeneratorFactory msgenFactory = new MSGeneratorFactory();
            Task msgen           = msgenFactory.CreateMSGenerator(run.MSFileType);
            Task peakDetector    = new DeconToolsPeakDetector();
            Task decon           = new HornDeconvolutor();
            Task suspPeakFlagger = new LeftOfMonoPeakLooker();

            run.CurrentFrameSet = new FrameSet(501, 500, 502);
            run.CurrentScanSet  = new ScanSet(250, 246, 254);


            msgen.Execute(run.ResultCollection);
            peakDetector.Execute(run.ResultCollection);
            decon.Execute(run.ResultCollection);

            foreach (var result in run.ResultCollection.ResultList)
            {
                ((LeftOfMonoPeakLooker)suspPeakFlagger).CurrentResult = result;
                suspPeakFlagger.Execute(run.ResultCollection);
            }


            Assert.AreEqual(38, run.ResultCollection.ResultList.Count);

            List <IsosResult> flaggedResults = run.ResultCollection.ResultList.Where(p => p.Flags.Count > 0).ToList();

            Assert.AreEqual(13, flaggedResults.Count);

            TestUtilities.DisplayIsotopicProfileData(flaggedResults[0].IsotopicProfile);
            Console.WriteLine();
            TestUtilities.DisplayIsotopicProfileData(flaggedResults[1].IsotopicProfile);
        }
        public void getDriftProfileMZ_796_Test1()      //**
        {
            Run run = TestUtilities.GetStandardUIMFRun();

            UIMFRun uimfRun = (UIMFRun)run;
            DriftTimeProfileExtractor profileExtractor = new DriftTimeProfileExtractor();

            FrameSet frameset = new FrameSet(616, 615, 617);

            uimfRun.CurrentFrameSet = frameset;

            double targetMZ = 1004.1987;


            ScanSetCollectionCreator ssc = new ScanSetCollectionCreator(run, 200, 350, 1, 1);

            ssc.Create();

            XYData xydata = profileExtractor.ExtractProfileFromRawData(uimfRun, frameset, run.ScanSetCollection, targetMZ, 30d);

            TestUtilities.DisplayXYValues(xydata);

            Console.WriteLine("-------------------------------------------------------------------------------------");

            createPeaks(run);
            xydata = profileExtractor.ExtractProfileFromPeakData(uimfRun, frameset, run.ScanSetCollection, targetMZ, 30d);


            TestUtilities.DisplayXYValues(xydata);
        }
Exemplo n.º 7
0
        public void weirdZeroValuesForMZsAtEarlyFramesTest1()
        {
            UIMFRun run = new UIMFRun(uimfTestfile1);

            FrameSetCollectionCreator framecreator = new FrameSetCollectionCreator(run, 1, 10, 5, 1);

            framecreator.Create();

            ScanSetCollectionCreator scanCreator = new ScanSetCollectionCreator(run, 1, 1);

            scanCreator.Create();

            Task msgen   = new UIMF_MSGenerator(0, 5000);
            Task peakDet = new DeconToolsPeakDetector();


            int scanstop  = 599;
            int scanstart = 0;

            for (int i = scanstart; i < scanstop; i++)
            {
                run.CurrentFrameSet = run.FrameSetCollection.GetFrameSet(1);
                run.CurrentScanSet  = run.ScanSetCollection.GetScanSet(i);
                msgen.Execute(run.ResultCollection);

                if (run.XYData != null && run.XYData.Xvalues != null && run.XYData.Xvalues[0] == 0)
                {
                    reportXYValues(run);
                }
            }
        }
Exemplo n.º 8
0
        public void GetMassSpectrumWithSummingTest1()
        {
            var run = new UIMFRun(FileRefs.RawDataMSFiles.UIMFStdFile3);

            var frame = new ScanSet(163, 162, 164);
            var scan  = new IMSScanSet(121);

            var xydata = run.GetMassSpectrum(frame, scan, 0, 50000);

            var testMZ = 627.2655682;
            var maxIntensityForTestMZ = 0;


            for (var i = 0; i < xydata.Xvalues.Length; i++)
            {
                if (xydata.Xvalues[i] > (testMZ - 0.1) && xydata.Xvalues[i] < (testMZ + 0.1))
                {
                    if (xydata.Yvalues[i] > maxIntensityForTestMZ)
                    {
                        maxIntensityForTestMZ = (int)xydata.Yvalues[i];
                    }
                }
            }

            Assert.AreEqual(126568, maxIntensityForTestMZ);
        }
Exemplo n.º 9
0
        public void outputToSqlite_uimf_test1()
        {
            List <Run> runcoll = new List <Run>();
            Run        run     = new UIMFRun(uimfFile1);

            runcoll.Add(run);


            FrameSetCollectionCreator fsc = new FrameSetCollectionCreator(run, 800, 809, 3, 1);

            fsc.Create();

            ScanSetCollectionCreator sscc = new ScanSetCollectionCreator(run, 200, 220, 9, 1);

            sscc.Create();


            Task msgen              = new UIMF_MSGenerator();
            Task peakDetector       = new DeconToolsPeakDetector();
            Task decon              = new RapidDeconvolutor();
            Task driftTimeExtractor = new DeconTools.Backend.ProcessingTasks.UIMFDriftTimeExtractor();
            Task origIntensExtr     = new DeconTools.Backend.ProcessingTasks.OriginalIntensitiesExtractor();
            Task ticExtractor       = new DeconTools.Backend.ProcessingTasks.UIMF_TICExtractor();

            Task scanResultUpdater = new ScanResultUpdater();


            Task sqliteExporter = new DeconTools.Backend.ProcessingTasks.ResultExporters.ScanResultExporters.UIMFScanResult_SqliteExporter(uimf_Sqlite_ScanResultOutputFile1);

            Stopwatch sw;

            foreach (FrameSet frame in ((UIMFRun)run).FrameSetCollection.FrameSetList)
            {
                ((UIMFRun)run).CurrentFrameSet = frame;
                foreach (ScanSet scan in run.ScanSetCollection.ScanSetList)
                {
                    run.CurrentScanSet = scan;
                    msgen.Execute(run.ResultCollection);
                    peakDetector.Execute(run.ResultCollection);

                    decon.Execute(run.ResultCollection);
                    ticExtractor.Execute(run.ResultCollection);
                    scanResultUpdater.Execute(run.ResultCollection);


                    driftTimeExtractor.Execute(run.ResultCollection);
                    origIntensExtr.Execute(run.ResultCollection);

                    sw = new Stopwatch();
                    sw.Start();

                    sqliteExporter.Execute(run.ResultCollection);
                    sw.Stop();
                    if (sw.ElapsedMilliseconds > 10)
                    {
                        Console.WriteLine("SqliteExporter execution time = \t" + sw.ElapsedMilliseconds);
                    }
                }
            }
        }
        public void serializeUIMFDataTest1()
        {
            Run        run           = new UIMFRun(uimfFilepath2);
            List <Run> runCollection = new List <Run>();

            runCollection.Add(run);

            int startFrame = 1200;
            int stopFrame  = 1205;

            int numFramesSummed = 3;
            int numScansSummed  = 3;


            FrameSetCollectionCreator framesetCreator = new FrameSetCollectionCreator(run, startFrame, stopFrame, numFramesSummed, 1);

            framesetCreator.Create();

            ScanSetCollectionCreator scanSetCreator = new ScanSetCollectionCreator(run, numScansSummed, 1);

            scanSetCreator.Create();

            Task msgen = new UIMF_MSGenerator();

            DeconToolsV2.Peaks.clsPeakProcessorParameters detectorParams = new DeconToolsV2.Peaks.clsPeakProcessorParameters();
            detectorParams.PeakBackgroundRatio    = 3;
            detectorParams.PeakFitType            = DeconToolsV2.Peaks.PEAK_FIT_TYPE.QUADRATIC;
            detectorParams.SignalToNoiseThreshold = 3;
            detectorParams.ThresholdedData        = true;

            Task peakdetector = new DeconToolsPeakDetector(detectorParams);

            Task decon = new RapidDeconvolutor();

            TaskCollection taskcollection = new TaskCollection();

            taskcollection.TaskList.Add(msgen);
            taskcollection.TaskList.Add(peakdetector);
            taskcollection.TaskList.Add(decon);


            TaskController taskcontroller = new UIMF_TaskController(taskcollection);

            taskcontroller.IsosResultThresholdNum = 50;
            taskcontroller.Execute(runCollection);


            ResultCollection       results;
            IsosResultDeSerializer deserializer = new IsosResultDeSerializer(run.Filename + "_tmp.bin");
            int counter = 0;

            do
            {
                counter++;
                results = deserializer.GetNextSetOfResults();
            } while (results != null);

            Assert.AreEqual(8, counter);
        }
Exemplo n.º 11
0
        public void GetMSLevelTest1()
        {
            Run run = new UIMFRun(FileRefs.RawDataMSFiles.UIMFStdFile3);

            Assert.AreEqual(1, run.GetMSLevel(233));
            Assert.AreEqual(1, run.GetMSLevel(234));
            Assert.AreEqual(1, run.GetMSLevel(1173));
        }
        public void uimfTest2()       //ScanSets are created based on the number of scans per frame
        {
            Run run = new UIMFRun(uimfFilepath);

            ScanSetCollectionCreator creator = new ScanSetCollectionCreator(run, 700, 800, 3, 1, false);

            creator.Create();
        }
Exemplo n.º 13
0
        public void InitializeUIMFContainingMSMSDataTest1()
        {
            // var runContainsMSMS = new UIMFRun(FileRefs.RawDataMSFiles.UIMFFileContainingMSMSLevelData);
            var runNoMSMS = new UIMFRun(FileRefs.RawDataMSFiles.UIMFStdFile3);

            //Assert.IsTrue(runContainsMSMS.ContainsMSMSData);
            Assert.IsFalse(runNoMSMS.ContainsMSMSData);
        }
Exemplo n.º 14
0
        public void uimf_data_preLoaded()        // in this case, data is preloaded, preventing re-accessing the same drifttimes over and over
        {
            Run run = new UIMFRun(uimfFilepath);

            FrameSetCollectionCreator fscc = new FrameSetCollectionCreator(run, 800, 801, 3, 1);

            fscc.Create();

            ScanSetCollectionCreator sscc = new ScanSetCollectionCreator(run, 220, 270, 9, 1);

            sscc.Create();

            ((UIMFRun)run).GetFrameDataAllFrameSets();    // this is the key line... loads data necessary for drift time calc and correction



            UIMF_MSGenerator       msgen   = new UIMF_MSGenerator();
            DeconToolsPeakDetector peakDet = new DeconToolsPeakDetector();

            peakDet.PeakBackgroundRatio = 6;
            peakDet.SigNoiseThreshold   = 3;

            HornDeconvolutor       decon = new HornDeconvolutor();
            UIMFDriftTimeExtractor driftTimeExtractor = new UIMFDriftTimeExtractor();

            StringBuilder sb = new StringBuilder();

            foreach (var frame in ((UIMFRun)run).FrameSetCollection.FrameSetList)
            {
                ((UIMFRun)run).CurrentFrameSet = frame;

                foreach (var scan in run.ScanSetCollection.ScanSetList)
                {
                    run.CurrentScanSet = scan;

                    msgen.Execute(run.ResultCollection);
                    peakDet.Execute(run.ResultCollection);
                    decon.Execute(run.ResultCollection);
                    driftTimeExtractor.Execute(run.ResultCollection);
                }
            }

            foreach (var item in run.ResultCollection.ResultList)
            {
                UIMFIsosResult isosresult = (UIMFIsosResult)item;

                sb.Append(isosresult.FrameSet.PrimaryFrame);
                sb.Append("\t");
                sb.Append(isosresult.ScanSet.PrimaryScanNumber);
                sb.Append("\t");
                sb.Append(isosresult.IsotopicProfile.MonoPeakMZ.ToString("0.000"));
                sb.Append("\t");
                sb.Append(isosresult.DriftTime.ToString("0.000"));
                sb.Append(Environment.NewLine);
            }

            Console.Write(sb.ToString());
        }
Exemplo n.º 15
0
        public void GetMSLevelInfoTest1()
        {
            var uimfRun = new UIMFRun(FileRefs.RawDataMSFiles.UIMFStdFile4);

            Assert.IsTrue(uimfRun.MS1Frames.Count > 0);
            Assert.AreEqual(1175, uimfRun.MS1Frames.Count);
            Assert.IsTrue(!uimfRun.MS1Frames.Contains(26));    //frame 26 is FrameType 3 - calibration frame
            Assert.IsTrue(uimfRun.MS2Frames.Count == 0);
        }
Exemplo n.º 16
0
        public void getFrameStartTimeTest1()
        {
            var run = new UIMFRun(FileRefs.RawDataMSFiles.UIMFStdFile3);

            var frameNum   = 162;
            var frametime1 = run.GetTime(frameNum);

            Assert.AreEqual(474.3, (decimal)Math.Round(frametime1, 1));
        }
Exemplo n.º 17
0
        public void uimf_data_not_preLoaded()        // in this case the drift time is calculated every time by looking up sqlite data from uimf file
        {
            Run run = new UIMFRun(uimfFilepath);

            FrameSetCollectionCreator fscc = new FrameSetCollectionCreator(run, 800, 801, 3, 1);

            fscc.Create();

            ScanSetCollectionCreator sscc = new ScanSetCollectionCreator(run, 220, 270, 9, 1);

            sscc.Create();



            UIMF_MSGenerator       msgen   = new UIMF_MSGenerator();
            DeconToolsPeakDetector peakDet = new DeconToolsPeakDetector();

            peakDet.PeakBackgroundRatio = 6;
            peakDet.SigNoiseThreshold   = 3;

            HornDeconvolutor       decon = new HornDeconvolutor();
            UIMFDriftTimeExtractor driftTimeExtractor = new UIMFDriftTimeExtractor();

            StringBuilder sb = new StringBuilder();

            foreach (var frame in ((UIMFRun)run).FrameSetCollection.FrameSetList)
            {
                ((UIMFRun)run).CurrentFrameSet = frame;

                foreach (var scan in run.ScanSetCollection.ScanSetList)
                {
                    run.CurrentScanSet = scan;

                    msgen.Execute(run.ResultCollection);
                    peakDet.Execute(run.ResultCollection);
                    decon.Execute(run.ResultCollection);
                    driftTimeExtractor.Execute(run.ResultCollection);
                }
            }

            foreach (var item in run.ResultCollection.ResultList)
            {
                UIMFIsosResult isosresult = (UIMFIsosResult)item;

                sb.Append(isosresult.FrameSet.PrimaryFrame);
                sb.Append("\t");
                sb.Append(isosresult.ScanSet.PrimaryScanNumber);
                sb.Append("\t");
                sb.Append(isosresult.IsotopicProfile.MonoPeakMZ.ToString("0.000"));
                sb.Append("\t");
                sb.Append(isosresult.DriftTime.ToString("0.000"));
                sb.Append(Environment.NewLine);
            }

            Console.Write(sb.ToString());
        }
Exemplo n.º 18
0
        public void getFramePressureTest1()
        {
            var uimfRun = new UIMFRun(FileRefs.RawDataMSFiles.UIMFStdFile3);

            var testFrame     = 162;
            var framePressure = uimfRun.GetFramePressure(testFrame);

            Assert.AreNotEqual(0, framePressure);
            Assert.AreEqual(4.02672m, (Decimal)framePressure);
        }
        public void uimfTest1()       //ScanSets are created based on the number of scans per frame
        {
            Run run = new UIMFRun(uimfFilepath);

            ScanSetCollectionCreator creator = new ScanSetCollectionCreator(run, 3, 1);

            creator.Create();

            Assert.AreEqual(600, run.ScanSetCollection.ScanSetList.Count);
        }
Exemplo n.º 20
0
        public void getDriftTimeForScanZero()
        {
            //UIMF scan numbers are 0-based.  But first scan should have a drifttime above 0.

            var uimfRun = new UIMFRun(FileRefs.RawDataMSFiles.UIMFStdFile3);

            var driftTime = uimfRun.GetDriftTime(162, 0);

            Assert.Greater((decimal)driftTime, 0);
        }
        public void oldSchoolTest1()
        {
            string testFile  = @"D:\Data\UIMF\Problem_datasets\FPGA\QCSHEW_FPGA_99min_0003.UIMF";
            string paramFile = @"D:\Data\UIMF\Problem_datasets\FPGA\IMS_UIMF_PeakBR4_PeptideBR4_SN3_SumScansAll_SumFrames3_RAPID_2011-02-09_temp.xml";

            RunFactory rf  = new RunFactory();
            UIMFRun    run = (UIMFRun)rf.CreateRun(testFile);

            //OldSchoolProcRunner proc = new OldSchoolProcRunner(testFile, run.MSFileType, paramFile);
            //proc.Execute();
        }
Exemplo n.º 22
0
        public void getPressureLastFrameTest1()
        {
            var uimfRun = new UIMFRun(FileRefs.RawDataMSFiles.UIMFStdFile3);

            var lastFrame = uimfRun.MaxLCScan;

            var pressureLastFrame = uimfRun.GetFramePressure(lastFrame);


            Console.WriteLine("pressure on last frame = " + pressureLastFrame);
        }
        public void test1_summing()
        {
            Project.Reset();
            Project project = Project.getInstance();

            UIMFRun run = new UIMFRun(uimfFilepath, 1201, 1201);

            project.RunCollection.Add(run);

            int numFramesSummed = 3;
            int numScansSummed  = 3;

            ScanSetCollectionCreator sscc = new ScanSetCollectionCreator(run, 250, 270, numScansSummed, 1);

            sscc.Create();

            FrameSetCollectionCreator fscc = new FrameSetCollectionCreator(run, run.MinFrame, run.MaxFrame, numFramesSummed, 1);

            fscc.Create();

            Task msGen = new UIMF_MSGenerator(200, 2000);

            DeconToolsV2.Peaks.clsPeakProcessorParameters detectorParams = new DeconToolsV2.Peaks.clsPeakProcessorParameters();
            detectorParams.PeakBackgroundRatio    = 3;
            detectorParams.PeakFitType            = DeconToolsV2.Peaks.PEAK_FIT_TYPE.QUADRATIC;
            detectorParams.SignalToNoiseThreshold = 3;
            Task peakDetector = new DeconToolsPeakDetector(detectorParams);

            Task decon = new HornDeconvolutor();

            Task scanResultsUpdater = new ScanResultUpdater();

            Task originalIntensitiesExtractor = new OriginalIntensitiesExtractor();


            project.TaskCollection.TaskList.Add(msGen);
            project.TaskCollection.TaskList.Add(peakDetector);
            project.TaskCollection.TaskList.Add(decon);
            project.TaskCollection.TaskList.Add(scanResultsUpdater);
            project.TaskCollection.TaskList.Add(originalIntensitiesExtractor);

            TaskController controller = new UIMF_TaskController(project.TaskCollection);

            controller.Execute(project.RunCollection);

            ResultCollection rc = project.RunCollection[0].ResultCollection;

            Assert.AreEqual(180, rc.ResultList.Count);

            StringBuilder sb = new StringBuilder();

            IsosResultUtilities.DisplayResults(sb, rc.ResultList);
            Console.Write(sb.ToString());
        }
Exemplo n.º 24
0
        public void GetFrameParameters_Test1()
        {
            var uimfRun         = new UIMFRun(FileRefs.RawDataMSFiles.UIMFStdFile3);
            var frameStart      = 162;
            var frameStop       = 172;
            var numFramesSummed = 3;


            uimfRun.ScanSetCollection.Create(uimfRun, frameStart, frameStop, numFramesSummed, 1);

            uimfRun.GetFrameDataAllFrameSets();
        }
Exemplo n.º 25
0
        public void GetClosestMS1SpectrumTest1()
        {
            var msmsDatafile =
                @"\\protoapps\UserData\Slysz\DeconTools_TestFiles\UIMF\MSMS_Testing\PepMix_MSMS_4msSA.UIMF";

            var uimfRun = new UIMFRun(msmsDatafile);

            var testFrame  = 5;
            var closestMS1 = uimfRun.GetClosestMS1Frame(testFrame);

            Assert.AreEqual(6, closestMS1);
        }
        public void multipleFrames_horn_test1()
        {
            Project.Reset();
            Project project = Project.getInstance();

            project.LoadOldDecon2LSParameters(uimfParameters1);

            UIMFRun run = new UIMFRun(uimfFilepath, 1201, 1203);

            project.RunCollection.Add(run);

            ScanSetCollectionCreator sscc = new ScanSetCollectionCreator(run, 9, 1);

            sscc.Create();

            FrameSetCollectionCreator fscc = new FrameSetCollectionCreator(run, run.MinFrame, run.MaxFrame, 1, 1);

            fscc.Create();

            Task msGen      = new UIMF_MSGenerator(0, 5000);
            Task zeroFiller = new DeconToolsZeroFiller(3);

            Task peakDetector = new DeconToolsPeakDetector(project.Parameters.OldDecon2LSParameters.PeakProcessorParameters);

            Task decon = new HornDeconvolutor(project.Parameters.OldDecon2LSParameters.HornTransformParameters);

            Task scanResultsUpdater = new ScanResultUpdater();

            project.TaskCollection.TaskList.Add(msGen);
            project.TaskCollection.TaskList.Add(zeroFiller);

            project.TaskCollection.TaskList.Add(peakDetector);
            project.TaskCollection.TaskList.Add(decon);
            project.TaskCollection.TaskList.Add(scanResultsUpdater);

            Stopwatch sw = new Stopwatch();

            sw.Start();
            TaskController controller = new UIMF_TaskController(project.TaskCollection);

            controller.Execute(project.RunCollection);
            sw.Stop();

            Console.WriteLine("Time required (ms) = " + sw.ElapsedMilliseconds);
            Console.WriteLine("Scans analyzed = " + project.RunCollection[0].ScanSetCollection.ScanSetList.Count);
            Console.WriteLine("Features found = " + project.RunCollection[0].ResultCollection.ResultList.Count);
            Console.WriteLine("Peaks found = " + project.RunCollection[0].ResultCollection.ScanResultList[0].NumPeaks);



            StringBuilder sb = new StringBuilder();
        }
        public void Test1()
        {
            string testFile = @"\\proto-5\IMS_DEV\Belov\QC_Shew_IMS4_QTOF3_45min_run3_4bit_0000\QC_Shew_IMS4_QTOF3_45min_run3_4bit_0000.uimf";

            UIMFRun run = new UIMFRun(testFile);


            Console.WriteLine("numframe = " + run.GetNumFrames());


            Console.WriteLine("minScan = " + run.MinLCScan);
            Console.WriteLine("maxScan = " + run.MaxLCScan);
        }
Exemplo n.º 28
0
        public void GetNumberOfFramesTest()
        {
            var test      = new UIMFRun();
            var uimfRun   = new UIMFRun(FileRefs.RawDataMSFiles.UIMFStdFile3);
            var numframes = uimfRun.GetNumFrames();
            var numScans  = uimfRun.GetNumMSScans();


            Console.WriteLine("Number of frames = " + numframes);
            Console.WriteLine("Number of scans = " + numScans);
            Assert.AreEqual(1175, numframes);
            Assert.AreEqual(423000, numScans);
        }
Exemplo n.º 29
0
        public void basicCreatorTest2()
        {
            Run run = new UIMFRun(uimfFilepath);

            FrameSetCollectionCreator creator = new FrameSetCollectionCreator(run, 1200, 1300, 3, 1);

            creator.Create();

            UIMFRun uimfRun = (UIMFRun)run;

            Assert.AreEqual(101, uimfRun.FrameSetCollection.FrameSetList.Count);
            Assert.AreEqual(1200, uimfRun.FrameSetCollection.FrameSetList[0].PrimaryFrame);
            Assert.AreEqual(new int[] { 1199, 1200, 1201 }, uimfRun.FrameSetCollection.FrameSetList[0].IndexValues.ToArray());
        }
Exemplo n.º 30
0
        public void test1()
        {
            Run run = new UIMFRun(uimfFilepath);
            ResultCollection results = new ResultCollection(run);

            run.CurrentScanSet             = new ScanSet(300);
            ((UIMFRun)run).CurrentFrameSet = new FrameSet(1000, 999, 1001);

            Task ticExtractor = new UIMF_TICExtractor();

            ticExtractor.Execute(results);

            Assert.AreEqual(47973, results.Run.CurrentScanSet.TICValue);
        }