Exemplo n.º 1
0
 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));
 }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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;
        }
Exemplo n.º 4
0
        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;
        }
Exemplo n.º 5
0
 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;
 }
Exemplo n.º 6
0
        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;
        }
Exemplo n.º 7
0
 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();
 }