Exemplo n.º 1
0
        public List <T> MatchSpecific(ISpectrum spectrum)
        {
            List <T> glycoPeptides = new List <T>();

            if (spectrum.GetMSnOrder() > 1)
            {
                double mz            = (spectrum as ISpectrumMSn).GetParentMZ();
                int    charge        = (spectrum as ISpectrumMSn).GetParentCharge();
                double precursorMass = calculator.CalcChargeMass(mz, charge, option);

                MatchPrecursorMass(precursorMass, glycoPeptides);
                MatchPrecursorMass(precursorMass - Isotope, glycoPeptides);
            }

            return(glycoPeptides);
        }
        public List <IPeptide> PeptidesFilter(ISpectrum spectrum)
        {
            List <IPeptide> peptides     = new List <IPeptide>();
            List <double>   massList     = new List <double>();
            int             parentCharge = (spectrum as ISpectrumMSn).GetParentCharge();

            for (int i = 1; i <= parentCharge; i++)
            {
                foreach (IPeak peak in spectrum.GetPeaks())
                {
                    massList.Add(calcualtor.CalcChargeMass(peak.GetMZ(), i, option));
                }
            }
            if (massList.Count > 0)
            {
                massList.Sort();
            }

            foreach (IPeptide peptide in peptideDB)
            {
                double mass = calcualtor.CalcPeptideMass(peptide, option) + UtilMass.HexNAc;
                if (MassBinarySearch.FindPPM(mass, massList, matcher.GetTolerance()))
                {
                    peptides.Add(peptide);
                }
            }

            return(peptides);
        }
Exemplo n.º 3
0
        protected bool MatchPeakGlycoPeptideMass(IPeak peak, int charge, List <double> massList)
        {
            for (int i = 1; i <= charge; i++)
            {
                double mass = calculator.CalcChargeMass(peak.GetMZ(), i, option);; // peak.GetMZ() * charge;

                if (MassBinarySearch.Find(mass, massList, parameter.GetTolerance()))
                {
                    return(true);
                }
            }
            return(false);
        }
        protected List <IGlycoPeptide> MatchPoints(IPeak peak, int parentCharge)
        {
            HashSet <IGlycoPeptide> g = new HashSet <IGlycoPeptide>();

            for (int i = 1; i <= parentCharge; i++)
            {
                double mass = calculator.CalcChargeMass(peak.GetMZ(), i, option);
                BinSearchAnnotatedPoint p = new BinSearchAnnotatedPoint(mass);
                foreach (Point pt in matcher.GetSearchResult(p, parameter as BinarySearchParameter))
                {
                    g.UnionWith((pt as BinSearchAnnotatedPoint).GetGlycoPeptide());
                }
            }
            return(g.ToList());
        }