示例#1
0
        public void PlotAnotatedSpectrum(MSLight msExperimental, double ppm, string peptide)
        {
            //Predict the spectrum
            //Find PTMs

            List <ModificationItem>      mods = SpectraPredictor.GetVMods(peptide);
            SpectralPredictionParameters spp  = new SpectralPredictionParameters(false, true, false, false, true, false, true, true, 2, true, mods);
            SpectraPredictor             sp   = new SpectraPredictor(spp);
            List <PredictedIon>          theoreticalSpectrum = sp.PredictPeaks(peptide, 2, 1950, msExperimental, 500);

            DataGridResultTable.ItemsSource = theoreticalSpectrum;



            SpectrumEye1.Plot(msExperimental.Ions, msExperimental.Ions[0].MZ, msExperimental.Ions.Last().MZ, ppm, theoreticalSpectrum);
        }
示例#2
0
        private void buttonPlot_Click(object sender, RoutedEventArgs e)
        {
            Plot();

            //Evaluate the spectrum quality
            PatternTools.SpectraPrediction.SpectralPredictionParameters spm = new SpectralPredictionParameters(
                true,
                true,
                true,
                true,
                true,
                true,
                false,
                false,
                1,
                true,
                Modifications
                );

            PatternTools.SpectraPrediction.SpectraPredictor sp = new SpectraPredictor(spm);
            List <PredictedIon> theoretical = sp.PredictPeaks(textBoxSequence.Text, ChargeState, TheoreticalMH);

            List <Ion> filteredList = myMS.FindAll(a => a.Intensity > double.Parse(textBoxRelativeIntensityThreshold.Text));

            List <SpectralMatchEvaluator.TheTests> evaluationTests = new List <SpectralMatchEvaluator.TheTests>()
            {
                SpectralMatchEvaluator.TheTests.AllTests
            };

            PatternTools.SpectralMatchEvaluator.SpectrumComparisonResult spectrumEvaluationResult =
                PatternTools.SpectralMatchEvaluator.Compare.Do(
                    evaluationTests,
                    theoretical,
                    filteredList,
                    double.Parse(textBoxPPM.Text),
                    textBoxSequence.Text.Length,
                    RelativeIntensityThreshold
                    );

            PatternTools.SpectralMatchEvaluator.Compare.PrintResults(spectrumEvaluationResult);
        }