public void TestInitialize() { mockServiceLocator = new Mock<IServiceLocator>(); mockEventAggregator = new Mock<IEventAggregator>(); experiment = TestHelper.GetTestExperiment(mockServiceLocator); run = new Run(Path.GetFileName(Properties.Settings.Default.mzXMLTestFile1), Properties.Settings.Default.mzXMLTestFile1, new ProteinState(experiment), new Labeling(experiment), experiment, new ProteoWizardDataProvider(mockEventAggregator.Object)); }
public void TestInitialize() { IXYData xyData = new XYData(new double[] { 1, 2 }, new double[] { 3, 4 }); mockServiceLocator = new Mock<IServiceLocator>(); mockEventAggregator = new Mock<IEventAggregator>(); mockDataProvider = new Mock<IDataProvider>(); mockDataProvider.Setup(mock => mock.GetTotalIonChromatogram(TimeUnit.Seconds)).Returns(xyData); mockDataProvider.Setup(mock => mock.GetExtractedIonChromatogram(2, 2, 0.5, TimeUnit.Seconds)).Returns(xyData); mockDataProvider.Setup(mock => mock.GetSpectrum(2, 3, 3, 6, 0)).Returns(xyData); experiment = Test.TestHelper.GetTestExperiment(mockServiceLocator); run = new Run(Path.GetFileName(Properties.Settings.Default.mzXMLTestFile1), Properties.Settings.Default.mzXMLTestFile1, new ProteinState(experiment), new Labeling(experiment), experiment, mockDataProvider.Object); }
public RunResult(FragmentIon fragmentIon, Run run) : this() { this.fragmentIon = fragmentIon; this.peptide = fragmentIon.Peptide; this.run = run; this.ActualPeaksInCalculation = fragmentIon.PeaksInCalculation; this.ActualDeutDistThreshold = fragmentIon.DeutDistThreshold; this.ActualDeutDistRightPadding = fragmentIon.DeutDistRightPadding; this.IsResultBasedOnFragment = true; }
public RunResult(Peptide peptide, Run run) : this() { this.peptide = peptide; this.run = run; this.ActualPeaksInCalculation = peptide.PeaksInCalculation; this.ActualDeutDistThreshold = peptide.DeuteriumDistributionThreshold; this.ActualDeutDistRightPadding = peptide.DeuteriumDistributionRightPadding; this.ActualXicAdjustment = peptide.XicAdjustment; this.ActualXicSelectionWidth = peptide.XicSelectionWidth; ActualPeaksInCalculation = peptide.PeaksInCalculation; }
private static Hydra.Core.Domain.Run CreateRun(string filename, ProteinState proteinState, Labeling labeling, Experiment experiment, Mock<IEventAggregator> mockEventAggregator) { string runFileName = Path.GetFileName(filename); File.Copy(filename, Path.Combine(TestExperimentDirectory, "Data", runFileName), true); Hydra.Core.Domain.Run run = new Hydra.Core.Domain.Run( @"Data\" + runFileName, Path.Combine(TestExperimentDirectory, "Data", runFileName), proteinState, labeling, experiment, new ProteoWizardDataProvider(mockEventAggregator.Object)); return run; }
private Experiment CreateTestExperiment() { Experiment experiment = hydraExperimentType.CreateExperiment(project, TestExperimentName) as Experiment; ProteinState proteinState = new ProteinState(experiment); Labeling labeling = new Labeling(experiment); string runFileName = Path.GetFileName(Properties.Settings.Default.mzXMLTestFile1); File.Copy(Properties.Settings.Default.mzXMLTestFile1, Path.Combine(TestExperimentDirectory, "Data", runFileName), true); Run run = new Run( @"Data\" + runFileName, Path.Combine(TestExperimentDirectory, "Data", runFileName), proteinState, labeling, experiment, new ProteoWizardDataProvider(mockEventAggregator.Object)); experiment.Save(); return experiment as Experiment; }
public RunResult GetRunResult(Result result, Run run, Peptide peptide) { return (from data in result.RunResults where data.Run.FileName == run.FileName && (data.Peptide.MonoIsotopicMass == peptide.MonoIsotopicMass && data.Peptide.RT == peptide.RT && data.Peptide.ChargeState == peptide.ChargeState) select data).FirstOrDefault(); }