public void importParametersTest1() { var importedParametersFile = Path.Combine(FileRefs.ImportedData, "importedBasicTargetedWorkflowParameters.xml"); var parameters = new BasicTargetedWorkflowParameters(); parameters.LoadParameters(importedParametersFile); Assert.AreEqual("O16O18_TARGETED_RESULT", parameters.ResultType.ToString()); }
public void findFeatureIn_dataset_with_bad_massCalibration_test1() { //mass error in this dataset is typically ~50ppm. var datasetFile = @"D:\Data\Orbitrap\Subissue01\QC_Shew_10_01-pt5-1_8Feb10_Doc_09-12-24.RAW"; var massTagFile = @"\\protoapps\UserData\Slysz\Data\QCShew_MassiveTargeted\MassTags\QCShew_Formic_MassTags_Bin10_first10.txt"; var workflowParameterFile = @"\\protoapps\UserData\Slysz\Data\QCShew_MassiveTargeted\WorkflowParameterFiles\UnlabelledTargeted_WorkflowParameters_noSum.xml"; var run = RunUtilities.CreateAndLoadPeaks(datasetFile, datasetFile.Replace(".RAW", "_peaks.txt")); RunUtilities.AlignRunUsingAlignmentInfoInFiles(run); Assert.IsTrue(run.MassIsAligned); Assert.IsTrue(run.NETIsAligned); var parameters = new BasicTargetedWorkflowParameters(); parameters.LoadParameters(workflowParameterFile); var workflow = new BasicTargetedWorkflow(parameters); workflow.Run = run; var mtc = new TargetCollection(); var mtimporter = new MassTagFromTextFileImporter(massTagFile); mtc = mtimporter.Import(); var mt1 = (from n in mtc.TargetList where n.ID == 24702 && n.ChargeState == 4 select n).First(); run.CurrentMassTag = mt1; workflow.Execute(); var repo = new TargetedResultRepository(); repo.AddResult(workflow.Result); Console.WriteLine("theor mono mass = " + mt1.MonoIsotopicMass); Console.WriteLine("theorMZ = " + mt1.MZ); Console.WriteLine("theorNET = " + mt1.NormalizedElutionTime); Console.WriteLine("obsScan = " + repo.Results[0].ScanLC); Console.WriteLine("obsNET = " + repo.Results[0].NET); Console.WriteLine("NETError = " + repo.Results[0].NETError); Console.WriteLine("obsMZ = " + repo.Results[0].MonoMZ); Console.WriteLine("monoMass = " + repo.Results[0].MonoMass); Console.WriteLine("obsMonoMassCalibrated = " + repo.Results[0].MonoMassCalibrated); Console.WriteLine("MassErrorBeforeAlignment = " + (mt1.MZ - repo.Results[0].MonoMZ) / mt1.MZ * 1e6); Console.WriteLine("MassErrorAfterAlignment = " + repo.Results[0].MassErrorBeforeCalibration); }
public void importParametersTest2() { var importedParametersFile = Path.Combine(FileRefs.ImportedData, "importedParameters_MostIntenseChromPeakSelection.xml"); var parameters = new BasicTargetedWorkflowParameters(); parameters.LoadParameters(importedParametersFile); Assert.AreEqual("BASIC_TARGETED_RESULT", parameters.ResultType.ToString()); Assert.AreEqual("MostIntense", parameters.ChromPeakSelectorMode.ToString()); }
public void parameterFileImportTest1() { var parameters = new BasicTargetedWorkflowParameters(); var importTestFile = @"\\protoapps\UserData\Slysz\Standard_Testing\Targeted_FeatureFinding\Unlabelled\Parameters\BasicTargetedWorkflowParameters1_forImportTesting.xml"; parameters.LoadParameters(importTestFile); //TODO: complete testing of other values Assert.AreEqual(parameters.ChromGenToleranceUnit, Globals.ToleranceUnit.MZ); Assert.AreEqual(0.01, parameters.ChromGenTolerance); }
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); }
public void ProblemTesting_correlationProb1() { //see JIRA https://jira.pnnl.gov/jira/browse/OMCS-628 var executorParameters = new BasicTargetedWorkflowExecutorParameters(); var testDatasetPath = @"D:\Data\O16O18\Vlad_Mouse\mhp_plat_test_1B_8Apr13_Cougar_13-03-25.raw"; executorParameters.IsMassAlignmentPerformed = true; executorParameters.IsNetAlignmentPerformed = true; executorParameters.ReferenceTargetsFilePath = @"\\protoapps\DataPkgs\Public\2013\795_Iq_analysis_of_mouse_O16O18\Targets\MT_Mouse_MHP_O18_Set3_P892_targets.txt"; var run = new RunFactory().CreateRun(testDatasetPath); var executor = new IqExecutor(executorParameters, run); var targetsFile = @"\\protoapps\DataPkgs\Public\2013\795_Iq_analysis_of_mouse_O16O18\Targets\MT_Mouse_MHP_O18_Set3_P892_targets.txt"; executor.LoadAndInitializeTargets(targetsFile); executor.SetupMassAndNetAlignment(); var testTarget = 6955012; executor.Targets = (from n in executor.Targets where n.ID == testTarget select n).ToList(); var targetedWorkflowParameters = new BasicTargetedWorkflowParameters(); targetedWorkflowParameters.LoadParameters(@"\\protoapps\DataPkgs\Public\2013\795_Iq_analysis_of_mouse_O16O18\Parameters\O16O18WorkflowParameters_2011_08_23_sum5.xml"); //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(); }