public void Test2()
        {
            string copyToFolder = @"D:\Data\TopDown";

            string outputFolder = @"\\protoapps\UserData\Slysz\DeconTools_TestFiles\TargetedWorkflowTesting\Output";

            var executorParameters = new TopDownTargetedWorkflowExecutorParameters();

            executorParameters.CopyRawFileLocal = true;
            executorParameters.FolderPathForCopiedRawDataset = copyToFolder;
            executorParameters.OutputFolderBase = @"\\protoapps\UserData\Slysz\DeconTools_TestFiles\TargetedWorkflowTesting\Output";

            executorParameters.TargetType            = Globals.TargetType.LcmsFeature;
            executorParameters.WorkflowParameterFile =
                @"\\proto-7\VOrbiETD01\2012_1\CPTAC_Peptidome_Test1_P1_Poroshell_03Feb12_Frodo_Poroshell300SB\MSA201202231748_Auto796395\MSAlign_Quant_Workflow_2012-07-25.xml";


            executorParameters.TargetsFilePath =
                @"\\proto-7\VOrbiETD01\2012_1\CPTAC_Peptidome_Test1_P1_Poroshell_03Feb12_Frodo_Poroshell300SB\MSA201202231748_Auto796395\CPTAC_Peptidome_Test1_P1_Poroshell_03Feb12_Frodo_Poroshell300SB_MSAlign_ResultTable.txt";

            const string testDatasetPath =
                @"\\proto-7\VOrbiETD01\2012_1\CPTAC_Peptidome_Test1_P1_Poroshell_03Feb12_Frodo_Poroshell300SB\CPTAC_Peptidome_Test1_P1_Poroshell_03Feb12_Frodo_Poroshell300SB.raw";



            var executor = new TopDownTargetedWorkflowExecutor(executorParameters, testDatasetPath);

            executor.Execute();
        }
Esempio n. 2
0
        public void TopDownWorkflowTest1()
        {
            //see https://jira.pnnl.gov/jira/browse/OMCR-98

            string baseFolder =
                @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\Topdown_standard_testing\Test1_MSAlign_ProteusPeriIntact";

            const string executorParameterFile =
                @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\Topdown_standard_testing\Test1_MSAlign_ProteusPeriIntact\Parameters\topdownExecutorParameters1.xml";
            var executorParameters = new TopDownTargetedWorkflowExecutorParameters();

            executorParameters.LoadParameters(executorParameterFile);
            executorParameters.ExportChromatogramData = false;
            executorParameters.OutputFolderBase       =
                @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\Topdown_standard_testing\Test1_MSAlign_ProteusPeriIntact";


            const string testDatasetPath =
                @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\Topdown_standard_testing\Test1_MSAlign_ProteusPeriIntact\RawData\Proteus_Peri_intact_ETD.raw";


            string testDatasetName = RunUtilities.GetDatasetName(testDatasetPath);

            string expectedResultsFilename = executorParameters.OutputFolderBase + "\\IqResults" + "\\" + testDatasetName + "_quant.txt";

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

            var executor = new TopDownTargetedWorkflowExecutor(executorParameters, testDatasetPath);

            string proteinSeq =
                @"A.VDKTNPYALMEDAAQKTFDKLKTEQPEIRKNPELLREIVQQELLPYVHIKYAGALVLGPYYRNATPAQRDAYFAAFKDYLAQVYGQALAMYEGQEYRIEPAKPFADKSNLTIRVTIIDKNGRPPVRLDFQWRKNSKTGEWQAYDMIAEGVSMITTKQNEWSDILSAKGVDGLTKQLEISAKTPITLDEKK.";

            executor.Targets.TargetList = executor.Targets.TargetList.Where(p => p.Code == proteinSeq).ToList();
            executor.Execute();

            Assert.IsNotNull(executor.TargetedWorkflow.Run);

            Console.WriteLine("Num targetedResults in Run = " + executor.TargetedWorkflow.Run.ResultCollection.MassTagResultList.Count);

            Assert.IsTrue(File.Exists(expectedResultsFilename), "Results file does not exist!");


            //TODO: fix _quant.txt output column headers
            TopDownTargetedResultFromTextImporter importer = new TopDownTargetedResultFromTextImporter(expectedResultsFilename);
            var results = importer.Import();

            Assert.IsNotNull(results);
            Assert.IsTrue(results.HasResults);
            Assert.AreEqual(1, results.Results.Count);

            //foreach (var r in results.Results)
            //{
            //    Console.WriteLine(r.TargetID + "\t" + r.ScanLC + "\t" + r.Intensity);
            //}
        }
Esempio n. 3
0
        public void TopDownWorkflowFullTargetSet()
        {
            var executorParameters = new TopDownTargetedWorkflowExecutorParameters();

            executorParameters.CopyRawFileLocal = false;
            executorParameters.DeleteLocalDatasetAfterProcessing = false;
            executorParameters.TargetsFilePath        = @"\\protoapps\UserData\Fujimoto\TopDownTesting\Targets\fullTargetSet\Proteus_Peri_intact_ETD_MSAlign_ResultTable.Filtered05FDR.txt";
            executorParameters.TargetType             = Globals.TargetType.LcmsFeature;
            executorParameters.ExportChromatogramData = true;

            var workflowParameters = new TopDownTargetedWorkflowParameters();

            workflowParameters.AreaOfPeakToSumInDynamicSumming    = 2;
            workflowParameters.ChromatogramCorrelationIsPerformed = false;
            workflowParameters.ChromGeneratorMode             = Globals1.ChromatogramGeneratorMode.MOST_ABUNDANT_PEAK;
            workflowParameters.ChromGenSourceDataPeakBR       = 4;
            workflowParameters.ChromGenSourceDataSigNoise     = 3;
            workflowParameters.ChromNETTolerance              = 0.025;
            workflowParameters.ChromPeakDetectorPeakBR        = 0.1;
            workflowParameters.ChromPeakDetectorSigNoise      = 0.1;
            workflowParameters.ChromPeakSelectorMode          = Globals1.PeakSelectorMode.Smart;
            workflowParameters.ChromSmootherNumPointsInSmooth = 9;
            workflowParameters.MaxScansSummedInDynamicSumming = 100;
            workflowParameters.MSPeakDetectorPeakBR           = 1.3;
            workflowParameters.MSPeakDetectorSigNoise         = 2;
            workflowParameters.ChromGenTolerance              = 15;
            workflowParameters.MSToleranceInPPM = 25;
            workflowParameters.MultipleHighQualityMatchesAreAllowed = true;
            workflowParameters.NumChromPeaksAllowedDuringSelection  = 10;
            workflowParameters.NumMSScansToSum = 5;
            workflowParameters.ResultType      = Globals1.ResultType.TOPDOWN_TARGETED_RESULT;
            workflowParameters.SummingMode     = SummingModeEnum.SUMMINGMODE_STATIC;

            const string testDatasetPath =
                @"\\protoapps\UserData\Fujimoto\TopDownTesting\RawData\Proteus_Peri_intact_ETD.raw";


            string resultsFolderLocation = Path.Combine(executorParameters.OutputFolderBase, "Results");

            string testDatasetName = RunUtilities.GetDatasetName(testDatasetPath);

            string expectedResultsFilename = Path.Combine(resultsFolderLocation, testDatasetName + "_quant.txt");

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

            var executor = new TopDownTargetedWorkflowExecutor(executorParameters, workflowParameters, testDatasetPath);

            executor.Execute();

            Assert.IsNotNull(executor.TargetedWorkflow.Run);
            Assert.IsTrue(File.Exists(expectedResultsFilename), "Results file does not exist!");
        }
Esempio n. 4
0
        public void TestTargetedWorkflowExecutorMod()
        {
            const string executorParameterFile = @"\\protoapps\UserData\Kaipo\TopDown\test2paramsmod.xml";
            var          executorParameters    = new TopDownTargetedWorkflowExecutorParameters();

            executorParameters.LoadParameters(executorParameterFile);

            string       resultsFolderLocation = Path.Combine(executorParameters.OutputFolderBase, "Results");
            const string testDatasetPath       = @"\\protoapps\UserData\Kaipo\TopDown\test2\Proteus_Peri_intact_ETD.raw";
            const string testDatasetName       = "Proteus_Peri_intact_ETD";

            string expectedResultsFilename = Path.Combine(resultsFolderLocation, testDatasetName + "_quant.txt");

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

            var executor = new TopDownTargetedWorkflowExecutor(executorParameters, testDatasetPath);

            executor.Execute();

            // Output chrom data
            var wf = executor.TargetedWorkflow as TopDownTargetedWorkflow;

            Console.Write("***** chrom data *****\n");
            foreach (var resultData in wf.TargetResults)
            {
                int id = resultData.Key;
                TargetedResultBase result            = resultData.Value;
                double             chromPeakSelected = (result.ChromPeakSelected != null) ? result.ChromPeakSelected.XValue : -1;

                Console.Write("TargetID=" + id + "; ChromPeakSelected=" + chromPeakSelected + "\n");
                for (int i = 0; i < result.ChromValues.Xvalues.Length; i++)
                {
                    Console.Write(result.ChromValues.Xvalues[i] + "\t" + result.ChromValues.Yvalues[i] + "\n");
                }
                Console.Write("\n");
            }
            Console.Write("**********************\n");

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

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

            Assert.AreEqual(9, repository.Results.Count);
        }
        public void Test1()
        {
            string copyToFolder = @"D:\Data\TopDown";

            string outputFolder = @"\\protoapps\UserData\Slysz\DeconTools_TestFiles\TargetedWorkflowTesting\Output";

            var executorParameters = new TopDownTargetedWorkflowExecutorParameters();

            executorParameters.CopyRawFileLocal = true;
            executorParameters.FolderPathForCopiedRawDataset = copyToFolder;

            executorParameters.TargetsFilePath =
                @"\\proto-7\VOrbiETD04\2012_1\CPTAC_Peptidome_Test2_P6-5_13Jan12_Polaroid_11-10-14\MSA201202231748_Auto796393\CPTAC_Peptidome_Test2_P6-5_13Jan12_Polaroid_11-10-14_MSAlign_ResultTable.txt";

            const string testDatasetPath =
                @"\\proto-7\VOrbiETD04\2012_1\CPTAC_Peptidome_Test2_P6-5_13Jan12_Polaroid_11-10-14\CPTAC_Peptidome_Test2_P6-5_13Jan12_Polaroid_11-10-14.raw";



            var executor = new TopDownTargetedWorkflowExecutor(executorParameters, testDatasetPath);

            executor.Execute();
        }
Esempio n. 6
0
        public void TopDownWorkflowTestNoChargeStateList()
        {
            //see https://jira.pnnl.gov/jira/browse/OMCR-101

            var executorParameters = new TopDownTargetedWorkflowExecutorParameters();

            executorParameters.CopyRawFileLocal = false;
            executorParameters.DeleteLocalDatasetAfterProcessing = false;
            executorParameters.TargetsFilePath        = @"\\protoapps\UserData\Fujimoto\TopDownTesting\Targets\noChargeStateList\Proteus_Peri_intact_ETD_MSAlign_ResultTable.txt";
            executorParameters.TargetType             = Globals.TargetType.LcmsFeature;
            executorParameters.ExportChromatogramData = true;

            var workflowParameters = new TopDownTargetedWorkflowParameters();

            workflowParameters.AreaOfPeakToSumInDynamicSumming    = 2;
            workflowParameters.ChromatogramCorrelationIsPerformed = false;
            workflowParameters.ChromGeneratorMode             = Globals1.ChromatogramGeneratorMode.MOST_ABUNDANT_PEAK;
            workflowParameters.ChromGenSourceDataPeakBR       = 4;
            workflowParameters.ChromGenSourceDataSigNoise     = 3;
            workflowParameters.ChromNETTolerance              = 0.025;
            workflowParameters.ChromPeakDetectorPeakBR        = 0.1;
            workflowParameters.ChromPeakDetectorSigNoise      = 0.1;
            workflowParameters.ChromPeakSelectorMode          = Globals1.PeakSelectorMode.Smart;
            workflowParameters.ChromSmootherNumPointsInSmooth = 9;
            workflowParameters.MaxScansSummedInDynamicSumming = 100;
            workflowParameters.MSPeakDetectorPeakBR           = 1.3;
            workflowParameters.MSPeakDetectorSigNoise         = 2;
            workflowParameters.ChromGenTolerance              = 15;
            workflowParameters.MSToleranceInPPM = 25;
            workflowParameters.MultipleHighQualityMatchesAreAllowed = true;
            workflowParameters.NumChromPeaksAllowedDuringSelection  = 10;
            workflowParameters.NumMSScansToSum = 5;
            workflowParameters.ResultType      = Globals1.ResultType.TOPDOWN_TARGETED_RESULT;
            workflowParameters.SummingMode     = SummingModeEnum.SUMMINGMODE_STATIC;

            const string testDatasetPath =
                @"\\protoapps\UserData\Fujimoto\TopDownTesting\RawData\Proteus_Peri_intact_ETD.raw";


            string resultsFolderLocation = Path.Combine(executorParameters.OutputFolderBase, "Results");

            string testDatasetName = RunUtilities.GetDatasetName(testDatasetPath);

            string expectedResultsFilename = Path.Combine(resultsFolderLocation, testDatasetName + "_quant.txt");

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

            var executor = new TopDownTargetedWorkflowExecutor(executorParameters, workflowParameters, testDatasetPath);

            executor.Execute();

            /*
             * var currentTarget = executor.TargetedWorkflow.Result.Target;
             * Console.WriteLine("Target info:");
             * Console.WriteLine(currentTarget.ID + "\t" + currentTarget.MonoIsotopicMass + "\t" + currentTarget.MZ + "\t" + currentTarget.ChargeState + "\t"+ currentTarget.EmpiricalFormula);
             * Console.WriteLine("Theor profile");
             * TestUtilities.DisplayIsotopicProfileData(executor.TargetedWorkflow.Result.Target.IsotopicProfile);
             * TestUtilities.DisplayXYValues(executor.TargetedWorkflow.MassSpectrumXYData);
             * TestUtilities.DisplayXYValues(executor.TargetedWorkflow.ChromatogramXYData);
             * TestUtilities.DisplayPeaks(executor.TargetedWorkflow.ChromPeaksDetected.Select(p=>(Peak)p).ToList());
             */

            Assert.IsNotNull(executor.TargetedWorkflow.Run);

            Console.WriteLine("Num targetedResults in Run = " + executor.TargetedWorkflow.Run.ResultCollection.MassTagResultList.Count);

            Assert.IsTrue(File.Exists(expectedResultsFilename), "Results file does not exist!");

            //var resultsfile = new StreamReader(@"\\protoapps\UserData\Fujimoto\TopDownTesting\Results\noChargeStateList\Proteus_Peri_intact_ETD_quant.txt");
            //string line = resultsfile.ReadLine();
            //line = resultsfile.ReadLine();
            //string[] chargestatelist = line.Split('\t');
            //Assert.AreEqual("10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22", chargestatelist[2]);
            //resultsfile.Close();
        }
Esempio n. 7
0
        public void TopDownWorkflowTestMissingChargeState()
        {
            //see https://jira.pnnl.gov/jira/browse/OMCR-102

            var executorParameters = new TopDownTargetedWorkflowExecutorParameters();

            executorParameters.CopyRawFileLocal = false;
            executorParameters.DeleteLocalDatasetAfterProcessing = false;
            executorParameters.TargetsFilePath        = @"\\protoapps\UserData\Fujimoto\TopDownTesting\Targets\missingChargeState\Proteus_Peri_intact_ETD_MSAlign_ResultTable.txt";
            executorParameters.TargetType             = Globals.TargetType.LcmsFeature;
            executorParameters.ExportChromatogramData = true;

            var workflowParameters = new TopDownTargetedWorkflowParameters();

            workflowParameters.AreaOfPeakToSumInDynamicSumming    = 2;
            workflowParameters.ChromatogramCorrelationIsPerformed = false;
            workflowParameters.ChromGeneratorMode             = Globals1.ChromatogramGeneratorMode.MOST_ABUNDANT_PEAK;
            workflowParameters.ChromGenSourceDataPeakBR       = 4;
            workflowParameters.ChromGenSourceDataSigNoise     = 3;
            workflowParameters.ChromNETTolerance              = 0.025;
            workflowParameters.ChromPeakDetectorPeakBR        = 0.1;
            workflowParameters.ChromPeakDetectorSigNoise      = 0.1;
            workflowParameters.ChromPeakSelectorMode          = Globals1.PeakSelectorMode.Smart;
            workflowParameters.ChromSmootherNumPointsInSmooth = 9;
            workflowParameters.MaxScansSummedInDynamicSumming = 100;
            workflowParameters.MSPeakDetectorPeakBR           = 1.3;
            workflowParameters.MSPeakDetectorSigNoise         = 2;
            workflowParameters.ChromGenTolerance              = 15;
            workflowParameters.MSToleranceInPPM = 25;
            workflowParameters.MultipleHighQualityMatchesAreAllowed = true;
            workflowParameters.NumChromPeaksAllowedDuringSelection  = 10;
            workflowParameters.NumMSScansToSum = 5;
            workflowParameters.ResultType      = Globals1.ResultType.TOPDOWN_TARGETED_RESULT;
            workflowParameters.SummingMode     = SummingModeEnum.SUMMINGMODE_STATIC;

            const string testDatasetPath =
                @"\\protoapps\UserData\Fujimoto\TopDownTesting\RawData\Proteus_Peri_intact_ETD.raw";


            string resultsFolderLocation = executorParameters.OutputFolderBase + "\\Results";

            string testDatasetName = RunUtilities.GetDatasetName(testDatasetPath);

            string expectedResultsFilename = Path.Combine(resultsFolderLocation, testDatasetName + "_quant.txt");

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

            var executor = new TopDownTargetedWorkflowExecutor(executorParameters, workflowParameters, testDatasetPath);

            string proteinSeq1 =
                @"A.AENVVHHKLDGMPISEAVEINAGNNLVFLSGKVPTKKSADAPEGELASYGNTEEQTINVLEQIKTNLNNLGLDMKDVVKMQVFLVGGEENNGTMDFKGFMNGYSKFYDASKTNQLPARSAFQVAKLANPAWRVEIEVIAVRPAK.";

            executor.Targets.TargetList = executor.Targets.TargetList.Where(p => (p.Code == proteinSeq1)).ToList();
            executor.Execute();

            Assert.IsNotNull(executor.TargetedWorkflow.Run);

            Console.WriteLine("Num targetedResults in Run = " + executor.TargetedWorkflow.Run.ResultCollection.MassTagResultList.Count);

            Assert.IsTrue(File.Exists(expectedResultsFilename), "Results file does not exist!");

            var    resultsfile = new StreamReader(@"\\protoapps\UserData\Fujimoto\TopDownTesting\Results\missingChargeState\Proteus_Peri_intact_ETD_quant.txt");
            string line        = resultsfile.ReadLine();

            line = resultsfile.ReadLine();
            string[] chargestatelist = line.Split('\t');
            Assert.AreEqual("10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22", chargestatelist[2]);
            resultsfile.Close();
        }
Esempio n. 8
0
        public void TestTargetedWorkflowExecutor()
        {
            const string executorParameterFile = @"\\protoapps\UserData\Kaipo\TopDown\test2params.xml";
            var          executorParameters    = new TopDownTargetedWorkflowExecutorParameters();

            executorParameters.LoadParameters(executorParameterFile);

            string       resultsFolderLocation = Path.Combine(executorParameters.OutputFolderBase, "IqResults");
            const string testDatasetPath       = @"\\protoapps\UserData\Kaipo\TopDown\test2\Proteus_Peri_intact_ETD.raw";
            const string testDatasetName       = "Proteus_Peri_intact_ETD";

            string expectedResultsFilename = Path.Combine(resultsFolderLocation, testDatasetName + "_quant.txt");

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

            var executor = new TopDownTargetedWorkflowExecutor(executorParameters, testDatasetPath);

            string proteinSeq =
                @"A.VDKTNPYALMEDAAQKTFDKLKTEQPEIRKNPELLREIVQQELLPYVHIKYAGALVLGPYYRNATPAQRDAYFAAFKDYLAQVYGQALAMYEGQEYRIEPAKPFADKSNLTIRVTIIDKNGRPPVRLDFQWRKNSKTGEWQAYDMIAEGVSMITTKQNEWSDILSAKGVDGLTKQLEISAKTPITLDEKK.";

            executor.Targets.TargetList = executor.Targets.TargetList.Where(p => p.Code == proteinSeq).ToList();
            executor.Execute();

            // Output chrom data
            //var wf = executor.TargetedWorkflow as TopDownTargetedWorkflow;
            //Console.Write("***** chrom data *****\n");
            //foreach (var resultData in wf.TargetResults)
            //{
            //    int id = resultData.Key;
            //    TargetedResultBase result = resultData.Value;
            //    double chromPeakSelected = (result.ChromPeakSelected != null) ? result.ChromPeakSelected.XValue : -1;

            //    Console.Write("TargetID=" + id + "; ChromPeakSelected=" + chromPeakSelected + "\n");
            //    for (int i = 0; i < result.ChromValues.Xvalues.Length; i++)
            //    {
            //        //Console.Write(result.ChromValues.Xvalues[i] + "\t" + result.ChromValues.Yvalues[i] + "\n");
            //    }
            //    //Console.Write("\n");
            //}
            Console.Write("**********************\n");

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

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

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

            //// expected results as tuples in format: <target id, charge state, scan lc>
            //var expectedResults = new HashSet<Tuple<long, int, int>>
            //{
            //    new Tuple<long, int, int>(1, 8, 1583),
            //    new Tuple<long, int, int>(2, 23, 2643),
            //    new Tuple<long, int, int>(3, 21, 1853),
            //    new Tuple<long, int, int>(4, 14, 2303),
            //    new Tuple<long, int, int>(5, 17, 2339),
            //    new Tuple<long, int, int>(6, 26, 4630),
            //    new Tuple<long, int, int>(7, 26, 3583),
            //    new Tuple<long, int, int>(8, 7, 3709),
            //    new Tuple<long, int, int>(9, 42, 3439),
            //};

            //foreach (TargetedResultDTO result in repository.Results)
            //{
            //    expectedResults.Remove(new Tuple<long, int, int>(result.TargetID, result.ChargeState, result.ScanLC));
            //}

            //Assert.IsEmpty(expectedResults);
        }