public IXYData Execute(Sample sample, double rt, double mz)
        {
            IXYData spectrum = sample.GetMsMsSpectrum(rt, LCPeakElutionWidth, mz, mzVariability);
            spectrum.Title = "MSMS (RT=" + rt.ToString("N2") + " LCPeakElutionWidth=" + LCPeakElutionWidth.ToString("N2") + " mz=" + mz.ToString("N2") + " MZ Range=" + mzVariability.ToString("N2") + ") - " + Path.GetFileName(sample.FileName);

            ClickableOutputEvent clickableOutput = new ClickableOutputEvent();
            clickableOutput.Click = new DelegateCommand<IXYData>(OnViewXIC);
            clickableOutput.Text = "     MSMS Spectrum found (sample=" + sample.FileName + ", x values=" + spectrum.XValues.Count + ",  y values=" + spectrum.YValues.Count + ")";
            clickableOutput.Parameter = spectrum;
            this.clickableOutput.Publish(clickableOutput);
            return spectrum;
        }
Esempio n. 2
0
        public IXYData Execute(Sample sample, double mass1)
        {
            IXYData xicData = sample.GetExtractedIonChromatogram(mass1, mass1, _mzVar, Core.TimeUnit.Seconds);
            xicData.Title = "XIC (" + mass1.ToString("N4") + " mzTol=" + _mzVar + ") - " + Path.GetFileName(sample.FileName);

            ClickableOutputEvent clickableOutput = new ClickableOutputEvent();
            clickableOutput.Click = new DelegateCommand<IXYData>(OnViewXIC);
            clickableOutput.Text = "     XIC found (sample=" + sample.FileName + ", x values=" + xicData.XValues.Count + ",  y values=" + xicData.YValues.Count + ", time unit=" + xicData.TimeUnit + ")";
            clickableOutput.Parameter = xicData;
            _clickableOutput.Publish(clickableOutput);
            return xicData;
        }
Esempio n. 3
0
        public void Execute()
        {
            mockDataProvider.Setup(mock => mock.GetExtractedIonChromatogram(200, 200, 2.5, TimeUnit.Seconds)).Returns(new XYData(new double[] { 1, 2 }, new double[] { 3, 4 }));
            clickableOutputEvent.Subscribe(OnPublish);

            Sample sample = new Sample("test.mzxml", "test.mzxml", mockDataProvider.Object);
            xicSelection.MzVar = 2.5;
            IXYData xyData = xicSelection.Execute(sample, 200);

            Assert.AreEqual("XIC (200.0000 mzTol=2.5) - test.mzxml", xyData.Title);
            Assert.AreEqual(true, publishCalled);
        }
        public void Execute()
        {
            mockDataProvider.Setup(mock => mock.GetSpectrum(2.25, 2.75, 250.5, 251.5, 0)).Returns(new XYData(new double[] { 1, 2 }, new double[] { 3, 4 }));
            clickableOutputEvent.Subscribe(OnPublish);

            Sample sample = new Sample("test.mzxml", "test.mzxml", mockDataProvider.Object);
            spectrumSelection.MZLowerOffset = 0.5;
            spectrumSelection.MZUpperOffset = 1.5;
            IXYData xyData = spectrumSelection.Execute(sample, 2.25, 2.75, 250);

            Assert.AreEqual("MS (RT=2.25-2.75 Mass=250.0000) - test.mzxml", xyData.Title);
            Assert.AreEqual(true, publishCalled);
        }
        public void Execute()
        {
            mockDataProvider.Setup(mock => mock.GetMsMsSpectrum(7.3, 0.5, 210.2, 1.5)).Returns(new XYData(new double[] { 1, 2 }, new double[] { 3, 4 }));
            clickableOutputEvent.Subscribe(OnPublish);

            Sample sample = new Sample("test.mzxml", "test.mzxml", mockDataProvider.Object);
            msmsSpectrumSelection.LCPeakElutionWidth = 0.5;
            msmsSpectrumSelection.MZVariablility = 1.5;
            IXYData xyData = msmsSpectrumSelection.Execute(sample, 7.3, 210.2);

            Assert.AreEqual("MSMS (RT=7.30 LCPeakElutionWidth=0.50 mz=210.20 MZ Range=1.50) - test.mzxml", xyData.Title);
            Assert.AreEqual(true, publishCalled);
        }
Esempio n. 6
0
        public IXYData Execute(Sample sample, double startTime, double stopTime, double monoIsotopicMass)
        {
            IXYData spectrum = sample.GetSpectrum(startTime, stopTime, monoIsotopicMass + MZLowerOffset, monoIsotopicMass + MZUpperOffset, 0);
            spectrum.Title = "MS (RT=" + startTime.ToString("N2") + "-" + stopTime.ToString("N2") + " Mass=" + monoIsotopicMass.ToString("N4") + ") - " + Path.GetFileName(sample.FileName);

            ClickableOutputEvent clickableOutput = new ClickableOutputEvent();
            clickableOutput.Click = new DelegateCommand<IXYData>(OnViewXIC);
            clickableOutput.Text = "     Spectrum found (sample=" + sample.FileName + ", x values=" + spectrum.XValues.Count + ",  y values=" + spectrum.YValues.Count + ")";
            clickableOutput.Parameter = spectrum;
            _clickableOutput.Publish(clickableOutput);
            return spectrum;
        }