コード例 #1
0
        public void O16O18_onBruker15T()
        {
            string executorParametersFile =
                @"\\protoapps\DataPkgs\Public\2012\641_Alz_O16O18_dataprocessing2\Parameters\ExecutorParameters1 - Copy.xml";

            BasicTargetedWorkflowExecutorParameters executorParameters = new BasicTargetedWorkflowExecutorParameters();

            executorParameters.LoadParameters(executorParametersFile);

            executorParameters.TargetsFilePath =
                @"\\protoapps\DataPkgs\Public\2012\641_Alz_O16O18_dataprocessing2\Targets\MT_Human_ALZ_O18_P852\MassTags_PMT2.txt";


            string testDatasetPath = @"D:\Data\From_Vlad\2013_01_29_ALZ_CTRL_5_0p05_1_01_224.d";


            TargetedWorkflowExecutor executor = new BasicTargetedWorkflowExecutor(executorParameters, testDatasetPath);

            int testTarget = 7673789;

            //executor.Targets.TargetList =executor.Targets.TargetList.Where(p => p.ID == testTarget && p.ChargeState==3).ToList();

            executor.Targets.TargetList = executor.Targets.TargetList.Take(50).ToList();


            executor.Execute();
        }
コード例 #2
0
        public void AlternateConstructor_targetedWorkflowNoAlignment()
        {
            var executorParameterFile = baseFolder + @"\Parameters\QCShew_OrbiStandard_workflowExecutorParameters.xml";
            var executorParameters    = new BasicTargetedWorkflowExecutorParameters();

            executorParameters.LoadParameters(executorParameterFile);
            var resultsFolderLocation = Path.Combine(executorParameters.OutputFolderBase, "Results");
            var testDatasetPath       = baseFolder + @"\QC_Shew_08_04-pt5-2_11Jan09_Sphinx_08-11-18.RAW";
            var testDatasetName       = "QC_Shew_08_04-pt5-2_11Jan09_Sphinx_08-11-18";

            var expectedResultsFilename = Path.Combine(resultsFolderLocation, testDatasetName + "_results.txt");

            if (File.Exists(expectedResultsFilename))
            {
                File.Delete(expectedResultsFilename);
            }

            var basicTargetedWorkflowParameters = new BasicTargetedWorkflowParameters();
            var workflow = new BasicTargetedWorkflow(basicTargetedWorkflowParameters);

            TargetedWorkflowExecutor executor = new BasicTargetedWorkflowExecutor(executorParameters,
                                                                                  workflow, testDatasetPath);

            executor.Execute();

            Assert.IsTrue(File.Exists(expectedResultsFilename));
        }
コード例 #3
0
        public void TestUIMFTargetedMSMSWorkflow()
        {
            var datasetPath = uimfMsMsFile;

            var executorParameterFilename =
                @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\UIMF_Targeted_MSMS_Testing\Parameters\UIMFTargetedMSMSWorkflowExecutorParametersMostConfidentMassTags.xml";

            var executorParameters = new BasicTargetedWorkflowExecutorParameters();

            executorParameters.LoadParameters(executorParameterFilename);

            var executor = new BasicTargetedWorkflowExecutor(executorParameters, datasetPath);

            executor.Execute();

            //List<TargetedResultBase> resultList = executor.TargetedWorkflow.Run.ResultCollection.GetMassTagResults();
            //foreach (var targetedResultBase in resultList)
            //{
            //    Console.WriteLine("*******************************************************");
            //    Console.WriteLine(targetedResultBase.Target.Code + "\t" + targetedResultBase.Target.ChargeState);

            //    foreach (var peakQualityData in targetedResultBase.ChromPeakQualityList)
            //    {
            //        peakQualityData.Display();
            //    }
            //}

            //TestUtilities.DisplayXYValues(executor.TargetedWorkflow.ChromatogramXYData);
        }
コード例 #4
0
        public void ProcessSangTaeStuff()
        {
            string executorParametersFile =
                @"\\protoapps\UserData\Sangtae\ToSlysz\IQ\ExecutorParameters1.xml";

            BasicTargetedWorkflowExecutorParameters executorParameters = new BasicTargetedWorkflowExecutorParameters();

            executorParameters.LoadParameters(executorParametersFile);
            executorParameters.TargetType = Globals.TargetType.LcmsFeature;

            executorParameters.TargetsFilePath = @"\\protoapps\UserData\Sangtae\ToSlysz\IQ\Target_TD.txt";

            string testDatasetPath = @"\\protoapps\UserData\Sangtae\ToSlysz\IQ\QC_Shew_12_02_2_1Aug12_Cougar_12-06-11.raw";

            TargetedWorkflowExecutor executor = new BasicTargetedWorkflowExecutor(executorParameters, testDatasetPath);

            int testTarget = 7673789;
            //executor.Targets.TargetList =executor.Targets.TargetList.Where(p => p.ID == testTarget && p.ChargeState==3).ToList();

            string testTargetSeq = "SEVIAVVSSDTFVRPIYAGNALATVQSHDAVK";

            testTargetSeq = "ILQGYGAGHQFAAGGDGTAINQGGIAEQVTSAALNYR";
            executor.Targets.TargetList = executor.Targets.TargetList.Where(p => p.Code == testTargetSeq).ToList();


            //executor.Targets.TargetList = executor.Targets.TargetList.Take(50).ToList();
            executor.Execute();

            TestUtilities.DisplayXYValues(executor.TargetedWorkflow.ChromatogramXYData);
        }
コード例 #5
0
        public void ChaoChaoPeptidomicsTesting1()
        {
            var executorParameters =
                @"\\protoapps\DataPkgs\Public\2013\727_IQ_analysis_of_Peptidomics_data_First_attempts\Parameters\ExecutorParameters1.xml";

            var alignmentParametersFile =
                @"\\protoapps\DataPkgs\Public\2013\727_IQ_analysis_of_Peptidomics_data_First_attempts\Parameters\TargetedAlignmentWorkflowParameters1.xml";

            var rawDatafile = @"D:\Data\From_ChaoChao\CPTAC_OT_Pep_JB_5439_60min_4May12_Legolas_11-07-64.raw";

            var parameters = new BasicTargetedWorkflowExecutorParameters();

            parameters.LoadParameters(executorParameters);

            parameters.TargetedAlignmentIsPerformed = true;

            var targetedAlignerWorkflowParameters = new TargetedAlignerWorkflowParameters();

            targetedAlignerWorkflowParameters.LoadParameters(alignmentParametersFile);

            var alignmentParametersOutputfile = alignmentParametersFile.Replace(".xml", "_autoGenerated.xml");

            targetedAlignerWorkflowParameters.SaveParametersToXML(alignmentParametersOutputfile);

            TargetedWorkflowExecutor executor = new BasicTargetedWorkflowExecutor(parameters, rawDatafile);

            executor.Execute();
        }
コード例 #6
0
        public void Test1()
        {
            string executorParametersFile =
                @"D:\Data\From_Vlad\Bruker\Parameters\ExecutorParameters1 - Copy.xml";

            BasicTargetedWorkflowExecutorParameters executorParameters = new BasicTargetedWorkflowExecutorParameters();

            executorParameters.LoadParameters(executorParametersFile);

            string testDatasetPath =
                @"D:\Data\From_Vlad\Bruker\2013_01_29_ALZ_CTRL_5_0p5_1_01_228.d";

            Run run      = new RunFactory().CreateRun(testDatasetPath);
            int numScans = run.GetNumMSScans();

            TargetedWorkflowExecutor executor = new BasicTargetedWorkflowExecutor(executorParameters, testDatasetPath);

            int testTarget = 206675561;   //beta amyloid

            executor.Targets.TargetList =
                executor.Targets.TargetList.Where(p => p.ID == testTarget && p.ChargeState == 2).ToList();

            executor.Execute();

            //TestUtilities.DisplayXYValues(executor.TargetedWorkflow.ChromatogramXYData);
            executor.TargetedWorkflow.Result.DisplayToConsole();

            Console.WriteLine("expected mz= " + executor.TargetedWorkflow.Result.Target.MZ);

            double expectedNET  = executor.TargetedWorkflow.Result.Target.NormalizedElutionTime;
            double expectedScan = expectedNET * numScans;

            Console.WriteLine("Expected NET= " + expectedNET + "; Corresponds to scan: " + expectedScan);
        }
コード例 #7
0
        public void LoadExecutorParametersTest1()
        {
            var inputFilename      = baseFolder + @"\Parameters\BasicTargetedWorkflowExecutorParameters_forImport.xml";
            var executorParameters = new BasicTargetedWorkflowExecutorParameters();

            executorParameters.LoadParameters(inputFilename);

            Assert.AreEqual(1500, (int)executorParameters.MaxMzForDefiningChargeStateTargets);
            Assert.AreEqual(100, executorParameters.MaxNumberOfChargeStateTargetsToCreate);
        }
コード例 #8
0
        public void issue0725_targetedAlignmentProblems()
        {
            var executorParameterFile = @"D:\Data\Orbitrap\Issue0725_badAlignment\Issue0725_executorWorkflow.xml";
            var datasetPath           = @"D:\Data\Orbitrap\Issue0725_badAlignment\QC_Shew_10_03-2_100min_06May10_Tiger_10-04-08.RAW";

            var executorParameters = new BasicTargetedWorkflowExecutorParameters();

            executorParameters.LoadParameters(executorParameterFile);

            TargetedWorkflowExecutor executor = new BasicTargetedWorkflowExecutor(executorParameters, datasetPath);

            executor.Execute();
        }
コード例 #9
0
        public void issue0705_completelyFailedAlignment_multialignErrors()
        {
            var executorParameterFile = @"\\protoapps\UserData\Slysz\Data\Redmine_Issues\Issue0705_failedAlignment\workflowExecutorParameters.xml";
            var datasetPath           = @"\\proto-3\LTQ_Orb_3\2010_1\QC_Shew_10_01-pt5-4_12Feb10_Doc_09-12-26\QC_Shew_10_01-pt5-4_12Feb10_Doc_09-12-26.raw";

            var executorParameters = new BasicTargetedWorkflowExecutorParameters();

            executorParameters.LoadParameters(executorParameterFile);

            TargetedWorkflowExecutor executor = new BasicTargetedWorkflowExecutor(executorParameters, datasetPath);

            executor.Execute();
        }
コード例 #10
0
        public void ExecutorTest2()
        {
            var executorParamFile = baseFolder + @"\Parameters" + "\\" + @"QCShew_OrbiStandard_workflowExecutorParameters.xml";

            var testDatasetPath = baseFolder + "\\" + "QC_Shew_08_04-pt5-2_11Jan09_Sphinx_08-11-18.RAW";

            var executorParameters = new BasicTargetedWorkflowExecutorParameters();

            executorParameters.LoadParameters(executorParamFile);

            TargetedWorkflowExecutor executor = new BasicTargetedWorkflowExecutor(executorParameters, testDatasetPath);

            executor.Execute();
        }
コード例 #11
0
        public void ExecuteSipperOnMSGFOutputTest1()
        {
            var paramFile =
                @"\\protoapps\DataPkgs\Public\2013\788_Sipper_C13_Analysis_Hot_Lake_SNC_Ana_preliminary\Parameters\ExecutorParameters1.xml";


            var parameters = new BasicTargetedWorkflowExecutorParameters();

            parameters.LoadParameters(paramFile);
            parameters.CopyRawFileLocal = false;
            parameters.FolderPathForCopiedRawDataset = @"D:\Data\Sipper\HLP_Ana";


            var testDataset =
                @"D:\Data\Sipper\HLP_Ana\HLP_Ana_SIP_02_19APR13_Frodo_12-12-04.raw";


            var outputParameterFile = Path.Combine(Path.GetDirectoryName(paramFile),
                                                   Path.GetFileNameWithoutExtension(paramFile) + " - copy.xml");

            parameters.SaveParametersToXML(outputParameterFile);



            var executor = new BasicTargetedWorkflowExecutor(parameters, testDataset);

            executor.Targets.TargetList = executor.Targets.TargetList.Take(10).ToList();

            executor.Execute();

            var workflow = executor.TargetedWorkflow as SipperTargetedWorkflow;
            var result   = workflow.Result as SipperLcmsTargetedResult;

            Assert.IsNotNull(result);
            Assert.IsNotNull(result.ChromCorrelationData);
            Assert.IsNotNull(result.ChromCorrelationData.CorrelationDataItems);

            Assert.IsTrue(result.ChromCorrelationData.CorrelationDataItems.Count > 0);


            //foreach (var dataItem in result.ChromCorrelationData.CorrelationDataItems)
            //{
            //    Console.WriteLine(dataItem.CorrelationRSquaredVal);
            //}

            //foreach (var fitScoreDataItem in workflow.FitScoreData)
            //{
            //    Console.WriteLine(fitScoreDataItem.Key + "\t" + fitScoreDataItem.Value);
            //}
        }
コード例 #12
0
        public void Bruker9T_N14N15_executorTest1()
        {
            var testfile      = @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\N14N15_standard_testing\RawData\RSPH_PtoA_L_28_rep1_28Feb08_Raptor_08-01-01";
            var parameterFile =
                @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\N14N15_standard_testing\Parameters\ExecutorParameters1 - forTesting.xml";

            var executorParameters = new BasicTargetedWorkflowExecutorParameters();

            executorParameters.LoadParameters(parameterFile);
            executorParameters.CopyRawFileLocal = false;

            var executor = new BasicTargetedWorkflowExecutor(executorParameters, testfile);

            executor.Execute();
        }
コード例 #13
0
        public void TestUIMFTargetedMSMSWorkflowLotsOfTargets()
        {
            var datasetPath = uimfMsMsFile;

            var executorParameterFilename =
                @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\UIMF_Targeted_MSMS_Testing\Parameters\UIMFTargetedMSMSWorkflowExecutorParametersLotsOfMassTags.xml";

            var executorParameters = new BasicTargetedWorkflowExecutorParameters();

            executorParameters.LoadParameters(executorParameterFilename);

            var executor = new BasicTargetedWorkflowExecutor(executorParameters, datasetPath);

            executor.Execute();
        }
コード例 #14
0
        public void Test1()
        {
            string executorParameterFileName = @"D:\Data\IQ_testing\From_SangTae\ExecutorParameters1.xml";

            BasicTargetedWorkflowExecutorParameters executorParameters = new BasicTargetedWorkflowExecutorParameters();

            executorParameters.LoadParameters(executorParameterFileName);

            string testDataFile = @"D:\Data\IQ_testing\From_SangTae\QC_Shew_12_02_2_1Aug12_Cougar_12-06-11.raw";

            TargetedWorkflowExecutor executor = new BasicTargetedWorkflowExecutor(executorParameters, testDataFile);

            executor.Targets.TargetList = executor.Targets.TargetList.Take(10).ToList();

            executor.Execute();
        }
コード例 #15
0
        public void InvestigateIQFailures()
        {
            var executorParamFile =
                @"\\protoapps\DataPkgs\Public\2013\743_Mycobacterium_tuberculosis_Cys_and_Ser_ABP\IQ_Analysis\Parameters\ExecutorParameters1 - Copy.xml";

            var executorParameters =
                new BasicTargetedWorkflowExecutorParameters();

            executorParameters.LoadParameters(executorParamFile);

            var testFile =
                @"\\protoapps\DataPkgs\Public\2013\743_Mycobacterium_tuberculosis_Cys_and_Ser_ABP\IQ_Analysis\Testing\LNA_A_Expo_Sample_SC_9_LNA_ExpA_Expo_Stat_SeattleBioMed_15Feb13_Cougar_12-12-35.raw";
            var run = new RunFactory().CreateRun(testFile);


            var iqparameterFile =
                @"\\protoapps\DataPkgs\Public\2013\743_Mycobacterium_tuberculosis_Cys_and_Ser_ABP\IQ_Analysis\Testing\IQWorkflowParameters1.xml";

            var workflowParameters = new BasicTargetedWorkflowParameters();

            workflowParameters.LoadParameters(iqparameterFile);
            workflowParameters.MSToleranceInPPM          = 10;
            workflowParameters.ChromPeakDetectorPeakBR   = 0.25;
            workflowParameters.ChromPeakDetectorSigNoise = 2;

            var targetedWorkflow = new BasicTargetedWorkflow(run, workflowParameters);
            var executor         = new BasicTargetedWorkflowExecutor(executorParameters, targetedWorkflow, testFile);

            //int[] testTargets = {349959971, 349951038,349954483 };
            //int[] testTargets = { 349951038 };

            //int[] testTargets = { 349954483 };
            //int[] testTargets = { 2911730 };

            int[] testTargets = { 349946881 };
            var   chargeState = 3;

            executor.Targets.TargetList = (from n in executor.Targets.TargetList where testTargets.Contains(n.ID) select n).ToList();
            executor.Targets.TargetList = (from n in executor.Targets.TargetList where n.ChargeState == chargeState select n).ToList();

            executor.Execute();

            //Results of investiga  tion!  -  349959971 was being missed because the MSTolerance was too narrow. When changed from 5 to 6, it was found. I think we can safely set this at 10.
            //Results of investigation!  -  349951038 was being missed because it was being flagged (peak to the left) problem.

            TestUtilities.DisplayXYValues(executor.TargetedWorkflow.ChromatogramXYData);
        }
コード例 #16
0
        public void importParametersTest1()
        {
            var importedParametersFile = Path.Combine(FileRefs.ImportedData, "importedBasicTargetedWorkflowExecutorParameters_defaults.xml");

            var parameters = new BasicTargetedWorkflowExecutorParameters();

            parameters.LoadParameters(importedParametersFile);

            Assert.AreEqual(true, parameters.CopyRawFileLocal);
            Assert.AreEqual(true, parameters.DeleteLocalDatasetAfterProcessing);

            Assert.AreEqual(@"d:\temp\rawdata", parameters.FolderPathForCopiedRawDataset);
            Assert.AreEqual(@"d:\temp\MassTags\massTagsToBeTargeted.txt", parameters.TargetsFilePath);
            Assert.AreEqual(@"d:\temp\Parameters\targetedAlignmentParameters.xml", parameters.TargetedAlignmentWorkflowParameterFile);
            Assert.AreEqual(@"d:\temp\Parameters\WorkflowParameters.xml", parameters.WorkflowParameterFile);
            Assert.AreEqual(@"d:\temp", parameters.TargetsBaseFolder);
        }
コード例 #17
0
        public void TestUIMFTargetedMSMSWorkflowSingleTarget()
        {
            var datasetPath = uimfMsMsFile;

            var executorParameterFilename =
                @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\UIMF_Targeted_MSMS_Testing\Parameters\UIMFTargetedMSMSWorkflowExecutorParameters.xml";

            var executorParameters = new BasicTargetedWorkflowExecutorParameters();

            executorParameters.LoadParameters(executorParameterFilename);

            var executor = new BasicTargetedWorkflowExecutor(executorParameters, datasetPath);

            executor.Execute();

            //TestUtilities.DisplayXYValues(executor.TargetedWorkflow.ChromatogramXYData);
        }
コード例 #18
0
        public void copyToLocalTest1()
        {
            var executorParameterFile =
                @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\basicTargetedWorkflowExecutorParameters_CopyToLocalTestCase2.xml";
            var datasetPath     = @"\\protoapps\UserData\Slysz\DeconTools_TestFiles\QC_Shew_08_04-pt5-2_11Jan09_Sphinx_08-11-18.RAW";
            var testDatasetName = "QC_Shew_08_04-pt5-2_11Jan09_Sphinx_08-11-18";



            var executorParameters = new BasicTargetedWorkflowExecutorParameters();

            executorParameters.LoadParameters(executorParameterFile);



            var expectedResultsFilename = Path.Combine(executorParameters.OutputFolderBase, "Results", testDatasetName + "_results.txt");

            if (File.Exists(expectedResultsFilename))
            {
                File.Delete(expectedResultsFilename);
            }

            TargetedWorkflowExecutor executor = new BasicTargetedWorkflowExecutor(executorParameters, datasetPath);

            executor.Execute();

            Assert.IsTrue(File.Exists(expectedResultsFilename));

            var importer   = new UnlabelledTargetedResultFromTextImporter(expectedResultsFilename);
            var repository = importer.Import();

            Assert.AreEqual(10, repository.Results.Count);

            var result1 = repository.Results[2];


            Assert.AreEqual(24702, result1.TargetID);
            Assert.AreEqual(3, result1.ChargeState);
            Assert.AreEqual(8112, result1.ScanLC);



            //Dataset	MassTagID	ChargeState	Scan	ScanStart	ScanEnd	NET	NumChromPeaksWithinTol	NumQualityChromPeaksWithinTol	MonoisotopicMass	MonoMZ	IntensityRep	FitScore	IScore	FailureType

            //QC_Shew_08_04-pt5-2_11Jan09_Sphinx_08-11-18	24702	3	8119	8112	8124	0.4172	2	1	2920.53082	974.51755	1379489	0.1136	0.0000
        }
コード例 #19
0
        public void ExecutorTest3Temp()
        {
            var executorParamFile =
                @"\\protoapps\DataPkgs\Public\2012\601_Sipper_paper_data_processing_and_analysis\Parameters\ExecutorParameters1 - Copy.xml";

            var testDatasetPath =
                @"\\protoapps\DataPkgs\Public\2012\601_Sipper_paper_data_processing_and_analysis\RawData\Yellow_C13_070_23Mar10_Griffin_10-01-28.raw";


            var executorParameters = new BasicTargetedWorkflowExecutorParameters();

            executorParameters.LoadParameters(executorParamFile);
            executorParameters.TargetType = Globals.TargetType.LcmsFeature;

            TargetedWorkflowExecutor executor = new BasicTargetedWorkflowExecutor(executorParameters, testDatasetPath);

            executor.Execute();
        }
コード例 #20
0
        public void O16O18Workflow_ProblemCaseTesting1()
        {
            //This is a nice case where the O16 is quite low and can be missed. In the current settings
            //the O16Chrom is null (by itself), so the chrom correlation fails.
            //Thus quant based on chrom corr fails, but quant based on O16O18 feature finding succeeds.


            //7673789

            var executorParametersFile =
                @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\O16O18_standard_testing\Test1_VladAlz\Parameters\ExecutorParameters1.xml";

            var executorParameters = new BasicTargetedWorkflowExecutorParameters();

            executorParameters.LoadParameters(executorParametersFile);

            var testDatasetPath =
                @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\O16O18_standard_testing\Test1_VladAlz\RawData\Alz_P01_A01_097_26Apr12_Roc_12-03-15.RAW";

            var autoSavedExecutorParametersFile =
                @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\O16O18_standard_testing\Test1_VladAlz\Parameters\ExecutorParameters1_autosaved.xml";

            executorParameters.SaveParametersToXML(autoSavedExecutorParametersFile);

            TargetedWorkflowExecutor executor = new BasicTargetedWorkflowExecutor(executorParameters, testDatasetPath);

            var testTarget = 7415;

            executor.Targets.TargetList =
                executor.Targets.TargetList.Where(p => p.ID == testTarget).ToList();

            executor.Execute();

            var expectedResultsFilename = Path.Combine(executorParameters.OutputFolderBase,
                                                       "Results",
                                                       executor.TargetedWorkflow.Run.DatasetName + "_results.txt");

            var importer = new O16O18TargetedResultFromTextImporter(expectedResultsFilename);
            var results  = importer.Import().Results;
            var result1  = results.First();

            Console.WriteLine(result1.ToStringWithDetailsAsRow());
        }
コード例 #21
0
        public void orbitrap_N14N15_executorTest2()
        {
            var testfile =
                @"\\protoapps\UserData\Slysz\Data\N14N15\2012_07_09_VelosOrbi Ponly datasets\RawData\RSPH_Ponly_28_A_8May12_Earth_12-03-11.raw";
            var parameterFile =
                @"\\protoapps\UserData\Slysz\Data\N14N15\2012_07_09_VelosOrbi Ponly datasets\Parameters\ExecutorParameters1 - forTesting.xml";

            var executorParameters = new BasicTargetedWorkflowExecutorParameters();

            executorParameters.LoadParameters(parameterFile);
            executorParameters.CopyRawFileLocal = false;

            var executor = new BasicTargetedWorkflowExecutor(executorParameters, testfile);

            executor.Execute();

            //TestUtilities.DisplayXYValues(executor.TargetedWorkflow.ChromatogramXYData);

            foreach (var chromPeak in executor.TargetedWorkflow.ChromPeaksDetected)
            {
                Console.WriteLine(chromPeak.XValue + "\t" + chromPeak.Height + "\t" + chromPeak.Width);
            }
        }
コード例 #22
0
        public void O16O18Workflow_ProblemCaseTesting2()
        {
            var executorParametersFile =
                @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\O16O18_standard_testing\Test1_VladAlz\Parameters\ExecutorParameters1.xml";

            var executorParameters = new BasicTargetedWorkflowExecutorParameters();

            executorParameters.LoadParameters(executorParametersFile);

            executorParameters.TargetsFilePath =
                @"\\protoapps\DataPkgs\Public\2012\641_Alz_O16O18_dataprocessing2\Targets\MT_Human_ALZ_O18_P852\MassTags_PMT2.txt";


            var testDatasetPath =
                @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\O16O18_standard_testing\Test1_VladAlz\RawData\Alz_P01_A01_097_26Apr12_Roc_12-03-15.RAW";

            var autoSavedExecutorParametersFile =
                @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\O16O18_standard_testing\Test1_VladAlz\Parameters\ExecutorParameters1_autosaved.xml";

            executorParameters.SaveParametersToXML(autoSavedExecutorParametersFile);

            TargetedWorkflowExecutor executor = new BasicTargetedWorkflowExecutor(executorParameters, testDatasetPath);

            //int testTarget = 7673789;
            //executor.Targets.TargetList =executor.Targets.TargetList.Where(p => p.ID == testTarget && p.ChargeState==3).ToList();

            executor.Execute();

            var expectedResultsFilename = Path.Combine(executorParameters.OutputFolderBase, "Results",
                                                       executor.TargetedWorkflow.Run.DatasetName + "_results.txt");

            var importer = new O16O18TargetedResultFromTextImporter(expectedResultsFilename);
            var results  = importer.Import().Results;
            var result1  = results.First();

            Console.WriteLine(result1.ToStringWithDetailsAsRow());
        }
コード例 #23
0
        public void Test1()
        {
            var testDatasetPath = uimfTestfile1;

            var executorParameterFilename =
                @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\UIMF_O16O18Testing\Parameters\WorkflowExecutorParameters.xml";

            var executorParameters = new BasicTargetedWorkflowExecutorParameters();

            executorParameters.LoadParameters(executorParameterFilename);

            var outputExecutorParameterFilename = executorParameterFilename.Replace(".xml", "_autoGen.xml");

            executorParameters.SaveParametersToXML(outputExecutorParameterFilename);


            var testTarget = 7563580;

            var executor = new BasicTargetedWorkflowExecutor(executorParameters, testDatasetPath);

            executor.Targets.TargetList = executor.Targets.TargetList.Where(p => p.ID == testTarget).ToList();

            executor.Execute();
        }
コード例 #24
0
        public void IqExecutor_StandardO16O18Testing_VladAlz()
        {
            //see JIRA https://jira.pnnl.gov/jira/browse/OMCS-628

            var executorParametersFile =
                @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\O16O18_standard_testing\Test1_VladAlz\Parameters\ExecutorParameters1.xml";

            var executorParameters = new BasicTargetedWorkflowExecutorParameters();

            executorParameters.LoadParameters(executorParametersFile);

            executorParameters.OutputFolderBase =
                @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\O16O18_standard_testing\Test1_VladAlz";

            var testDatasetPath =
                @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\O16O18_standard_testing\Test1_VladAlz\RawData\Alz_P01_A01_097_26Apr12_Roc_12-03-15.RAW";

            executorParameters.IsMassAlignmentPerformed = true;
            executorParameters.IsNetAlignmentPerformed  = true;

            executorParameters.ReferenceTargetsFilePath =
                @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\O16O18_standard_testing\Test1_VladAlz\Targets\MT_Human_ALZ_O18_P836\MassTags_PMT2.txt";


            var expectedResultsFilename = Path.Combine(executorParameters.OutputFolderBase, "IqResults", RunUtilities.GetDatasetName(testDatasetPath) + "_iqResults.txt");

            if (File.Exists(expectedResultsFilename))
            {
                File.Delete(expectedResultsFilename);
            }



            var autoSavedExecutorParametersFile =
                @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\O16O18_standard_testing\Test1_VladAlz\Parameters\ExecutorParameters1_autosaved.xml";

            executorParameters.SaveParametersToXML(autoSavedExecutorParametersFile);

            var run      = new RunFactory().CreateRun(testDatasetPath);
            var executor = new IqExecutor(executorParameters, run);

            var targetsFile =
                @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\O16O18_standard_testing\Test1_VladAlz\Targets\MT_Human_ALZ_O18_P836\MassTags_PMT2_First60.txt";

            targetsFile = @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\O16O18_standard_testing\Test1_VladAlz\Targets\MT_Human_ALZ_O18_P836\MassTags_PMT2.txt";


            executor.LoadAndInitializeTargets(targetsFile);
            executor.SetupMassAndNetAlignment();

            var testTarget = 9282;

            executor.Targets = (from n in executor.Targets where n.ID == testTarget select n).ToList();

            var targetedWorkflowParameters = new BasicTargetedWorkflowParameters();

            targetedWorkflowParameters.ChromNETTolerance  = 0.025;
            targetedWorkflowParameters.ChromGeneratorMode = Globals.ChromatogramGeneratorMode.O16O18_THREE_MONOPEAKS;

            //define workflows for parentTarget and childTargets
            var parentWorkflow = new O16O18ParentIqWorkflow(run, targetedWorkflowParameters);
            var childWorkflow  = new O16O18IqWorkflow(run, targetedWorkflowParameters);

            var workflowAssigner = new IqWorkflowAssigner();

            workflowAssigner.AssignWorkflowToParent(parentWorkflow, executor.Targets);
            workflowAssigner.AssignWorkflowToChildren(childWorkflow, executor.Targets);

            executor.DoAlignment();
            executor.Execute();

            IqResultImporter importer = new IqResultImporterBasic(expectedResultsFilename);
            var allResults            = importer.Import();

            var result1 = allResults.First(p => p.Target.ID == 9282 && p.Target.ChargeState == 2);

            Assert.AreEqual(9282, result1.Target.ID);
            Assert.AreEqual(0.32678m, (decimal)result1.ElutionTimeObs);
            Assert.AreEqual(4545, result1.LcScanObs);
            Assert.AreEqual(0.02, (decimal)result1.FitScore);
        }
コード例 #25
0
        public void StandardO16O18Testing_VladAlz()
        {
            //see JIRA https://jira.pnnl.gov/jira/browse/OMCS-628

            var executorParametersFile =
                @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\O16O18_standard_testing\Test1_VladAlz\Parameters\ExecutorParameters1.xml";

            var executorParameters = new BasicTargetedWorkflowExecutorParameters();

            executorParameters.LoadParameters(executorParametersFile);

            var testDatasetPath =
                @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\O16O18_standard_testing\Test1_VladAlz\RawData\Alz_P01_A01_097_26Apr12_Roc_12-03-15.RAW";

            var autoSavedExecutorParametersFile =
                @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\O16O18_standard_testing\Test1_VladAlz\Parameters\ExecutorParameters1_autosaved.xml";

            executorParameters.SaveParametersToXML(autoSavedExecutorParametersFile);
            executorParameters.OutputFolderBase =
                @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\O16O18_standard_testing\Test1_VladAlz";

            TargetedWorkflowExecutor executor = new BasicTargetedWorkflowExecutor(executorParameters, testDatasetPath);

            var testTarget = 9282;

            executor.Targets.TargetList =
                executor.Targets.TargetList.Where(p => p.ID == testTarget).ToList();


            //executor.InitializeRun(testDatasetPath);
            //executor.TargetedWorkflow.Run = executor.Run;

            //foreach (var targetBase in executor.Targets.TargetList)
            //{
            //    executor.Run.CurrentMassTag = targetBase;
            //    var workflow = (O16O18Workflow)executor.TargetedWorkflow;

            //    workflow.Execute();
            //    var result = workflow.Result as DeconTools.Backend.Core.Results.LcmsFeatureTargetedResult;


            //}

            executor.Execute();

            var expectedResultsFilename = Path.Combine(executorParameters.OutputFolderBase,
                                                       "Results",
                                                       executor.TargetedWorkflow.Run.DatasetName + "_Results.txt");

            var importer   = new O16O18TargetedResultFromTextImporter(expectedResultsFilename);
            var repository = importer.Import();

            Assert.AreEqual(3, repository.Results.Count);
            var result1 = repository.Results[1] as O16O18TargetedResultDTO;

            Assert.AreEqual(9282, result1.TargetID);
            Assert.AreEqual(2, result1.ChargeState);
            Assert.AreEqual(4537, result1.ScanLC);
            Assert.AreEqual(0.32514m, (decimal)Math.Round(result1.NET, 5));
            Assert.AreEqual(-0.001662m, (decimal)Math.Round(result1.NETError, 6));

            Assert.AreEqual(0.274m, (decimal)Math.Round(result1.Ratio, 3));
            Assert.IsTrue(result1.ChromCorrO16O18DoubleLabel > 0);

            Console.WriteLine(result1.ToStringWithDetailsAsRow());
        }
コード例 #26
0
        public void targetedWorkflow_noAlignment()
        {
            //TODO: fix test - it is using previous data for alignment
            //TODO: make JIRA issue so we can see chromatogram, etc.

            var executorParameterFile = baseFolder + @"\Parameters\QCShew_OrbiStandard_workflowExecutorParameters.xml";
            var executorParameters    = new BasicTargetedWorkflowExecutorParameters();

            executorParameters.LoadParameters(executorParameterFile);



            var resultsFolderLocation = executorParameters.OutputFolderBase + "\\Results";
            var testDatasetPath       = baseFolder + @"\QC_Shew_08_04-pt5-2_11Jan09_Sphinx_08-11-18.RAW";
            var testDatasetName       = "QC_Shew_08_04-pt5-2_11Jan09_Sphinx_08-11-18";

            var expectedResultsFilename = Path.Combine(resultsFolderLocation, testDatasetName + "_results.txt");

            if (File.Exists(expectedResultsFilename))
            {
                File.Delete(expectedResultsFilename);
            }


            var rawFileInfo = new FileInfo(testDatasetPath);


            //delete alignment files
            var mzalignmentFile  = Path.Combine(rawFileInfo.DirectoryName, testDatasetName + "_mzAlignment.txt");
            var netAlignmentFile = Path.Combine(rawFileInfo.DirectoryName, testDatasetName + "_netAlignment.txt");

            if (File.Exists(mzalignmentFile))
            {
                File.Delete(mzalignmentFile);
            }
            if (File.Exists(netAlignmentFile))
            {
                File.Delete(netAlignmentFile);
            }


            executorParameters.TargetedAlignmentIsPerformed = false;    //no targeted alignment

            TargetedWorkflowExecutor executor = new BasicTargetedWorkflowExecutor(executorParameters, testDatasetPath);

            executor.Execute();

            Assert.IsTrue(File.Exists(expectedResultsFilename));

            var importer   = new UnlabelledTargetedResultFromTextImporter(expectedResultsFilename);
            var repository = importer.Import();

            Assert.AreEqual(10, repository.Results.Count);

            var result1 = repository.Results[0];

            Assert.AreEqual(24702, result1.TargetID);
            Assert.AreEqual(3, result1.ChargeState);
            Assert.AreEqual(8637, result1.ScanLC);

            //TODO: confirm/fix this NET value
            //Assert.AreEqual(0.41724m, (decimal)Math.Round(result1.NET, 5));
            // Assert.AreEqual(0.002534m, (decimal)Math.Round(result1.NETError, 6));
            //Assert.AreEqual(974.52068m, (decimal)Math.Round(result1.MonoMZ, 5));
            //Assert.AreEqual(2920.53082m, (decimal)Math.Round(result1.MonoMass, 5));
            //Assert.AreEqual(2920.53733m, (decimal)Math.Round(result1.MonoMassCalibrated, 5));
            //Assert.AreEqual(-1.83m, (decimal)Math.Round(result1.MassErrorInPPM, 2));
        }
コード例 #27
0
        public void ExecuteSipperUsingStandardExecutorClass1()
        {
            var paramFile =
                @"\\protoapps\DataPkgs\Public\2012\601_Sipper_paper_data_processing_and_analysis\Parameters\ExecutorParameters1.xml";

            var parameters = new BasicTargetedWorkflowExecutorParameters();

            parameters.LoadParameters(paramFile);
            parameters.CopyRawFileLocal = false;
            //parameters.FolderPathForCopiedRawDataset = @"D:\data\temp";



            var testDataset =
                @"\\protoapps\DataPkgs\Public\2012\601_Sipper_paper_data_processing_and_analysis\RawData\Yellow_C13_070_23Mar10_Griffin_10-01-28.raw";


            var outputParameterFile = Path.Combine(Path.GetDirectoryName(paramFile),
                                                   Path.GetFileNameWithoutExtension(paramFile) + " - copy.xml");

            parameters.SaveParametersToXML(outputParameterFile);


            parameters.TargetType = Globals.TargetType.LcmsFeature;



            var executor = new BasicTargetedWorkflowExecutor(parameters, testDataset);


            var targetsOfInterest = new int[] { 5555 };

            //targetsOfInterest = new int[] { 5905 };   //throwing error in Chromcorr

            //targetsOfInterest = new int[]{6110};

            //targetsOfInterest = new int[]
            //                        {
            //                            5555, 5677, 5746, 5905, 6110, 6496, 7039, 7116, 7220, 7229, 7370, 7585, 8338, 8491, 8517, 8616, 8618,
            //                            8715, 8947, 8958, 8968, 9024, 9159, 9240, 9242, 9261, 9328, 9441, 9474, 9506, 9519, 9583, 9792, 9944,
            //                            9965, 10223, 10251, 10329, 10649, 10673, 11249, 11367, 11523, 11677, 11912, 12178, 12304, 12383, 12395,
            //                            12492, 12517, 12692, 12700, 12828, 13443, 13590, 13740, 14090, 14256
            //                        };

            executor.Targets.TargetList =
                (executor.Targets.TargetList.Where(n => targetsOfInterest.Contains(n.ID))).ToList();

            executor.Execute();

            var workflow = executor.TargetedWorkflow as SipperTargetedWorkflow;

            workflow.WorkflowParameters.SaveParametersToXML(
                @"\\protoapps\DataPkgs\Public\2012\601_Sipper_paper_data_processing_and_analysis\Parameters\SipperTargetedWorkflowParameters_Sum5 - copy.xml");



            var result = workflow.Result as SipperLcmsTargetedResult;

            Assert.IsNotNull(result);
            Assert.IsNotNull(result.ChromCorrelationData);
            Assert.IsNotNull(result.ChromCorrelationData.CorrelationDataItems);

            Assert.IsTrue(result.ChromCorrelationData.CorrelationDataItems.Count > 0);


            //foreach (var dataItem in result.ChromCorrelationData.CorrelationDataItems)
            //{
            //    Console.WriteLine(dataItem.CorrelationRSquaredVal);
            //}

            //foreach (var fitScoreDataItem in workflow.FitScoreData)
            //{
            //    Console.WriteLine(fitScoreDataItem.Key + "\t" + fitScoreDataItem.Value);
            //}
        }
コード例 #28
0
        public void targetedWorkflow_withTargetedAlignment_test()
        {
            var executorParameterFile = baseFolder + @"\Parameters\QCShew_OrbiStandard_workflowExecutorParameters.xml";
            var executorParameters    = new BasicTargetedWorkflowExecutorParameters();

            executorParameters.LoadParameters(executorParameterFile);

            var resultsFolderLocation = Path.Combine(executorParameters.OutputFolderBase, "Results");
            var testDatasetPath       = baseFolder + @"\QC_Shew_08_04-pt5-2_11Jan09_Sphinx_08-11-18.RAW";
            var testDatasetName       = "QC_Shew_08_04-pt5-2_11Jan09_Sphinx_08-11-18";

            var expectedResultsFilename = Path.Combine(resultsFolderLocation, testDatasetName + "_results.txt");

            if (File.Exists(expectedResultsFilename))
            {
                File.Delete(expectedResultsFilename);
            }


            var rawFileInfo = new FileInfo(testDatasetPath);

            var mzalignmentFile  = Path.Combine(rawFileInfo.DirectoryName, testDatasetName + "_mzAlignment.txt");
            var netAlignmentFile = Path.Combine(rawFileInfo.DirectoryName, testDatasetName + "_netAlignment.txt");

            if (File.Exists(mzalignmentFile))
            {
                File.Delete(mzalignmentFile);
            }
            if (File.Exists(netAlignmentFile))
            {
                File.Delete(netAlignmentFile);
            }



            TargetedWorkflowExecutor executor = new BasicTargetedWorkflowExecutor(executorParameters, testDatasetPath);

            executor.Execute();

            Assert.IsTrue(File.Exists(expectedResultsFilename));

            var importer   = new UnlabelledTargetedResultFromTextImporter(expectedResultsFilename);
            var repository = importer.Import();

            Assert.AreEqual(10, repository.Results.Count);

            var result1 = repository.Results[0];


            Assert.AreEqual(24702, result1.TargetID);
            Assert.AreEqual(3, result1.ChargeState);
            Assert.AreEqual(8627, result1.ScanLC);
            //Assert.AreEqual(0.41724m, (decimal)Math.Round(result1.NET, 5));
            //Assert.AreEqual(0.002534m, (decimal)Math.Round(result1.NETError, 6));
            //Assert.AreEqual(2920.53082m, (decimal)Math.Round(result1.MonoMass, 5));
            //Assert.AreEqual(2920.53879m, (decimal)Math.Round(result1.MonoMassCalibrated, 5));
            //Assert.AreEqual(-2.33m, (decimal)Math.Round(result1.MassErrorInPPM, 2));

            //Dataset	MassTagID	ChargeState	Scan	ScanStart	ScanEnd	NET	NumChromPeaksWithinTol	NumQualityChromPeaksWithinTol	MonoisotopicMass	MonoMZ	IntensityRep	FitScore	IScore	FailureType

            //QC_Shew_08_04-pt5-2_11Jan09_Sphinx_08-11-18	24702	3	8119	8112	8124	0.4172	2	1	2920.53082	974.51755	1379489	0.1136	0.0000
        }