public void TestUniqueCount() { var protein = new IdentifiedProtein(); var spectrum = new IdentifiedSpectrum(); var peptides = new List <IIdentifiedPeptide>(); peptides.Add(new IdentifiedPeptide(spectrum) { Sequence = "ILLLAR" }); peptides.Add(new IdentifiedPeptide(spectrum) { Sequence = "LILIAR" }); Assert.AreEqual(1, IdentifiedPeptideUtils.GetUniquePeptideCount(peptides)); peptides.Add(new IdentifiedPeptide(new IdentifiedSpectrum()) { Sequence = "LIIIAR" }); Assert.AreEqual(1, IdentifiedPeptideUtils.GetUniquePeptideCount(peptides)); }
private void DoInitUniquePeptideCount(IEnumerable <IIdentifiedPeptide> peps) { this.uniquePeptideCount = IdentifiedPeptideUtils.GetUniquePeptideCount(peps); this.peptideCount = IdentifiedSpectrumUtils.GetSpectrumCount(from p in peps select p.Spectrum); }
public static HashSet <string> GetUniquePeptide <T>(IEnumerable <T> spectra) where T : IIdentifiedSpectrum { return(IdentifiedPeptideUtils.GetUniquePeptides(from spec in spectra from pep in spec.Peptides select pep)); }