public void DemoParameterTest1() { var outputFileName = baseFolder + @"\BasicTargetedWorkflowExecutorParameters_autoGenerated.xml"; var executorParameters = new BasicTargetedWorkflowExecutorParameters(); executorParameters.SaveParametersToXML(outputFileName); }
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); //} }
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()); }
public void saveExecutorParameterFileTest1() { var targetsFilePath = @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\N14N15_standard_testing\Targets\POnly_MassTagsMatchingInHalfOfDatasets_Filtered0.45-0.47NET_first18.txt"; var workflowFilePath = @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\N14N15_standard_testing\Parameters\N14N15WorkflowParameters1.xml"; var targetedAlignmentParameterFile = @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\N14N15_standard_testing\Parameters\TargetedAlignmentWorkflowParameters1.xml"; var exportedExecutorParametersFilePath = @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\N14N15_standard_testing\Parameters\ExecutorParameters1.xml"; var executorParameters = new BasicTargetedWorkflowExecutorParameters(); executorParameters.CopyRawFileLocal = false; executorParameters.DeleteLocalDatasetAfterProcessing = false; executorParameters.TargetType = Globals.TargetType.DatabaseTarget; executorParameters.TargetedAlignmentIsPerformed = true; executorParameters.TargetedAlignmentWorkflowParameterFile = targetedAlignmentParameterFile; executorParameters.TargetsFilePath = targetsFilePath; executorParameters.WorkflowParameterFile = workflowFilePath; executorParameters.SaveParametersToXML(exportedExecutorParametersFilePath); }
public void ParameterTest1() { var outputFileName = @"\\protoapps\UserData\Slysz\IQDemo\Parameters" + @"\IQExecutorParameters.xml"; var executorParameters = new BasicTargetedWorkflowExecutorParameters(); executorParameters.CopyRawFileLocal = false; executorParameters.DeleteLocalDatasetAfterProcessing = true; executorParameters.FolderPathForCopiedRawDataset = @"\\protoapps\UserData\Slysz\IQ_Demo\RawData"; executorParameters.TargetType = Globals.TargetType.DatabaseTarget; executorParameters.TargetsBaseFolder = ""; executorParameters.TargetedAlignmentIsPerformed = false; executorParameters.TargetedAlignmentWorkflowParameterFile = @"\\protoapps\UserData\Slysz\IQ_Demo\Parameters\TargetedAlignmentWorkflowParameters1.xml"; executorParameters.TargetsFilePath = @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\Unlabelled\Targets\QCShew_Formic_MassTags_Bin10_first10.txt"; executorParameters.WorkflowParameterFile = @"\\protoapps\UserData\Slysz\IQ_Demo\Parameters\IQParameters1.xml"; executorParameters.SaveParametersToXML(outputFileName); }
public void exportParametersTest1() { var exportedParametersFile = Path.Combine(FileRefs.OutputFolderPath, "exportedBasicTargetedWorkflowExecutorParameters.xml"); var parameters = new BasicTargetedWorkflowExecutorParameters(); parameters.CopyRawFileLocal = true; parameters.DeleteLocalDatasetAfterProcessing = true; parameters.FolderPathForCopiedRawDataset = @"d:\temp\rawdata"; parameters.TargetsFilePath = @"d:\temp\MassTags\massTagsToBeTargeted.txt"; parameters.TargetsBaseFolder = @"d:\temp"; parameters.TargetedAlignmentWorkflowParameterFile = @"d:\temp\Parameters\targetedAlignmentParameters.xml"; parameters.WorkflowParameterFile = @"d:\temp\Parameters\WorkflowParameters.xml"; parameters.TargetsBaseFolder = @"d:\temp"; parameters.SaveParametersToXML(exportedParametersFile); }
public void TargetedWorkflowUsingMsgfInputsTest1() { var executorParameters = new BasicTargetedWorkflowExecutorParameters(); executorParameters.TargetsFilePath = @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\Unlabelled\Targets\Yellow_C13_070_23Mar10_Griffin_10-01-28_msgfplus.tsv"; executorParameters.TargetedAlignmentIsPerformed = false; executorParameters.SaveParametersToXML( @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\IQConsoleDemo\IqExecutorParameters.xml"); var workflowParameters = new BasicTargetedWorkflowParameters(); workflowParameters.ChromSmootherNumPointsInSmooth = 9; workflowParameters.ChromPeakDetectorPeakBR = 1; workflowParameters.ChromPeakDetectorSigNoise = 3; workflowParameters.ChromGenTolerance = 20; workflowParameters.ChromNETTolerance = 0.025; workflowParameters.MSToleranceInPPM = 20; workflowParameters.SaveParametersToXML( @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\IQConsoleDemo\IqWorkflowParameters.xml"); var workflow = new BasicTargetedWorkflow(workflowParameters); var testDatasetPath = @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\SIPPER_standard_testing\Yellow_C13_070_23Mar10_Griffin_10-01-28.raw"; TargetedWorkflowExecutor executor = new BasicTargetedWorkflowExecutor(executorParameters, workflow, testDatasetPath); executor.Targets.TargetList = executor.Targets.TargetList.Take(10).ToList(); executor.Execute(); }
public void LocalQCShewProcessingTest1() { var parameterFileName = @"C:\Users\d3x720\Documents\Data\QCShew\IQ\IQExecutorParameterFile1.xml"; var executorParameters = new BasicTargetedWorkflowExecutorParameters(); executorParameters.TargetsFilePath = @"C:\Users\d3x720\Documents\Data\QCShew\IQ\QCShew_Formic_MassTags_Bin10_first10.txt"; executorParameters.SaveParametersToXML(parameterFileName); var workflowParameters = new BasicTargetedWorkflowParameters(); var workflow = new BasicTargetedWorkflow(workflowParameters); var testDatasetPath = @"C:\Users\d3x720\Documents\Data\QCShew\QC_Shew_08_04-pt5-2_11Jan09_Sphinx_08-11-18.RAW"; TargetedWorkflowExecutor executor = new BasicTargetedWorkflowExecutor(executorParameters, workflow, testDatasetPath); var testTargetID = 24749; var testTargetZ = 3; executor.Targets.TargetList = executor.Targets.TargetList.Where(p => p.ID == testTargetID && p.ChargeState == testTargetZ).ToList(); executor.Execute(); //TestUtilities.DisplayXYValues(executor.TargetedWorkflow.ChromatogramXYData); foreach (var chrompeak in executor.TargetedWorkflow.ChromPeaksDetected) { Console.WriteLine(chrompeak.XValue.ToString("0.0000") + "\t" + chrompeak.Height.ToString("0") + "\t" + chrompeak.Width.ToString("0.000") + "\n"); } }
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()); }
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(); }
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); }
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()); }
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); //} }