public void ChromPeakAnalyzerWorkflowTest() { //Reference JIRA: https://jira.pnnl.gov/jira/browse/OMCS-884 string testFile = UnitTesting2.FileRefs.RawDataMSFiles.OrbitrapStdFile1; string peaksTestFile = UnitTesting2.FileRefs.PeakDataFiles.OrbitrapPeakFile_scans5500_6500; Run run = new RunFactory().CreateRun(testFile); TargetedWorkflowParameters parameters = new BasicTargetedWorkflowParameters(); ChromPeakIqTarget testTarget = new ChromPeakIqTarget(); ITheorFeatureGenerator TheorFeatureGen = new JoshTheorFeatureGenerator(DeconTools.Backend.Globals.LabellingType.NONE, 0.005); ChromPeak testPeak = new ChromPeak(5184, 840963, 50, 0); testTarget.SetWorkflow(new ChromPeakAnalyzerIqWorkflow(run, parameters)); testTarget.Code = "NGIIMMENR"; testTarget.EmpiricalFormula = "C43H76N14O14S2"; testTarget.MonoMassTheor = 1076.510631; testTarget.ChromPeak = testPeak; testTarget.ChargeState = 1; testTarget.TheorIsotopicProfile = TheorFeatureGen.GenerateTheorProfile(testTarget.EmpiricalFormula, testTarget.ChargeState); testTarget.DoWorkflow(); IqResult result = testTarget.GetResult(); Console.WriteLine("Fit Score: " + result.FitScore + " Flagged: " + result.IsIsotopicProfileFlagged); }
public void ChromPeakAnalyzerWorkflowTest() { //Reference JIRA: https://jira.pnnl.gov/jira/browse/OMCS-884 var testFile = UnitTesting2.FileRefs.RawDataMSFiles.OrbitrapStdFile1; var peaksTestFile = UnitTesting2.FileRefs.PeakDataFiles.OrbitrapPeakFile_scans5500_6500; var run = new RunFactory().CreateRun(testFile); TargetedWorkflowParameters parameters = new BasicTargetedWorkflowParameters(); var testTarget = new ChromPeakIqTarget(); ITheorFeatureGenerator TheorFeatureGen = new JoshTheorFeatureGenerator(DeconTools.Backend.Globals.LabellingType.NONE, 0.005); var testPeak = new ChromPeak(5184, 840963, 50, 0); var executorBaseParameters = new BasicTargetedWorkflowExecutorParameters(); var executor = new TopDownMSAlignExecutor(executorBaseParameters, run); executor.ChromSourceDataFilePath = peaksTestFile; var workflow = new ChromPeakAnalyzerIqWorkflow(run, parameters); testTarget.SetWorkflow(workflow); testTarget.ID = 1; testTarget.Code = "NGIIMMENR"; testTarget.EmpiricalFormula = "C43H76N14O14S2"; testTarget.MonoMassTheor = 1076.510631; testTarget.ChromPeak = testPeak; testTarget.ChargeState = 1; testTarget.TheorIsotopicProfile = TheorFeatureGen.GenerateTheorProfile(testTarget.EmpiricalFormula, testTarget.ChargeState); var testTargetList = new List <IqTarget>(); IqTarget testParent = new IqChargeStateTarget(); testParent.AddTarget(testTarget); testTargetList.Add(testTarget); executor.Execute(testTargetList); var result = testTarget.GetResult(); Assert.NotNull(result.LCScanSetSelected); Assert.AreNotEqual(1, result.FitScore); Assert.AreEqual(true, result.IsotopicProfileFound); }