Example #1
0
        public virtual void Run(int scan)
        {
            ISpectrum spectrum = spectrumRunner.GetSpectrum(scan);

            if (spectrum.GetMSnOrder() == 1)
            {
                monoRunner.SetMS1Spectrum(spectrum);
            }
            else if ((spectrum as ISpectrumMSn).GetActivation() == TypeOfMSActivation.CID)
            {
                specProcessor.Process(spectrum);

                List <IGlycoPeptide> glycoPeptides = null;
                if (monoRunner.GetMS1Spectrum() == null)
                {
                    glycoPeptides = precursorMatcher.Match(spectrum);
                }
                else
                {
                    monoRunner.Run(spectrum as ISpectrumMSn);
                    glycoPeptides = precursorMatcher.Match(spectrum, monoRunner.GetMonoMass());
                }

                searchWorker.Search(spectrum, glycoPeptides);
                resultTable[scan] = searchWorker.GetResult();
            }
        }
Example #2
0
        public virtual void Run(int scan)
        {
            ISpectrum spectrum = spectrumRunner.GetSpectrum(scan);

            if (spectrum.GetMSnOrder() == 1)
            {
                monoRunner.SetMS1Spectrum(spectrum);
            }
            else if ((spectrum as ISpectrumMSn).GetActivation() == TypeOfMSActivation.ETD)
            {
                specProcessor.Process(spectrum);

                List <IGlycoPeptide> glycoPeptides = null;
                if (monoRunner.GetMS1Spectrum() == null)
                {
                    glycoPeptides = precursorMatcher.Match(spectrum);
                }
                else
                {
                    monoRunner.Run(spectrum as ISpectrumMSn);
                    glycoPeptides = precursorMatcher.Match(spectrum, monoRunner.GetMonoMass());
                }

                searchWorker.Search(spectrum, glycoPeptides);
                resultTable[scan] = searchWorker.GetResult();
                (discover as IGlycoPeptideScoreResultFDR).AddResult(resultTable[scan]);

                //fdr
                double mass = (spectrum as ISpectrumMSn).GetParentMZ() + pesudoMZ / (spectrum as ISpectrumMSn).GetParentCharge();
                glycoPeptides = precursorMatcher.Match(spectrum, mass);

                searchWorker.Search(spectrum, glycoPeptides);
                resultFDRTable[scan] = searchWorker.GetResult();
                (discover as IGlycoPeptideScoreResultFDR).AddFDRResult(resultFDRTable[scan]);
            }
        }
        public virtual void Search(int scan)
        {
            ISpectrum spectrum = spectrumFactory.GetSpectrum(scan);
            double    monoMass = monoMassSpectrumGetter.GetMonoMass(spectrum);  //assume read spectrum sequentially

            if (spectrum.GetMSnOrder() < 2)
            {
                return;
            }

            // filter spectrum
            if (spectrumFilter.Filter(spectrum))
            {
                return;
            }

            // precursor
            spectrumProcessing.Process(spectrum);
            List <IGlycoPeptide> glycoPeptides = precursorMatcher.Match(spectrum, monoMass);

            // search
            List <IScore> scores = new List <IScore>();

            foreach (IGlycoPeptide glycoPeptide in glycoPeptides)
            {
                IScore score = searchEThcDRunner.Search(spectrum, glycoPeptide);
                scores.Add(score);
            }

            // save results
            if (scores.Count > 0)
            {
                double maxScores = scores.Max(x => x.GetScore());
                results.Add(spectrum, scores.Where(x => x.GetScore() == maxScores).ToList());
            }
        }