public PrecursorMatcherByBinSearchOnGlycansTemplate(List <IPeptide> peptides, List <IGlycan> glycans, double tol) { matcher = new BinarySearch(); parameter = new PrecursorParameter(tol); glycanPoints = new List <Point>(); calculator = UtilMass.Instance; option = UtilMassOption.Instance; this.peptides = peptides; // build points on glycans Dictionary <double, PrecursorPoint <IGlycan> > seen = new Dictionary <double, PrecursorPoint <IGlycan> >(); foreach (IGlycan glycan in glycans) { double mass = calculator.CalcGlycanMass(glycan, option); if (!seen.ContainsKey(mass)) { PrecursorPoint <IGlycan> pt = new PrecursorPoint <IGlycan>(mass); seen[mass] = pt; glycanPoints.Add(pt); } seen[mass].Add(glycan); } matcher.SetPoints(glycanPoints); }
public PrecursorMatcherByBinSearchOnPeptidesTemplate(List <IPeptide> peptides, List <IGlycan> glycans, PrecursorParameter parameter) { matcher = new BinarySearch(); this.parameter = parameter; peptidePoints = new List <Point>(); calculator = UtilMass.Instance; option = UtilMassOption.Instance; this.glycans = glycans; // build points on peptides Dictionary <double, PrecursorPoint <IPeptide> > seen = new Dictionary <double, PrecursorPoint <IPeptide> >(); foreach (IPeptide peptide in peptides) { double mass = calculator.CalcPeptideMass(peptide, option); if (!seen.ContainsKey(mass)) { PrecursorPoint <IPeptide> pt = new PrecursorPoint <IPeptide>(mass); seen[mass] = pt; peptidePoints.Add(pt); } seen[mass].Add(peptide); } matcher.SetPoints(peptidePoints); }
public GlycoPeptidePrecursorMatcher(List <IPeptide> peptides, List <IGlycan> glycans, PrecursorParameter parameter) : base(peptides, glycans, parameter) { }