/* * Returns the protein accessions which are uniquely found in this class (and * not found in the passed in protein prophet file). */ public List <String> compareProteins(ProteinProphetFile ppf) { List <String> uniqueProteins = new List <String>(); foreach (String proteinAccession in proteinsToPeptides.Keys) { bool notFoundInOtherPPF = ppf.containsProtein(proteinAccession); if (notFoundInOtherPPF) { uniqueProteins.Add(proteinAccession); } } return(uniqueProteins); }
/* * Returns the set of peptides (mapping to a protein accession) found in this * protein prophet file but not in the other. */ public Dictionary <String, List <String> > comparePeptides(ProteinProphetFile ppf) { Dictionary <String, List <String> > uniqueProteinToPeptides = new Dictionary <String, List <String> >(); foreach (String proteinAccession in proteinsToPeptides.Keys) { List <String> peptides = proteinsToPeptides[proteinAccession]; List <String> uniquePeptides = new List <String>(); foreach (String peptideSequence in peptides) { bool notFoundInOtherPPF = ppf.containsPeptide(proteinAccession, peptideSequence); if (notFoundInOtherPPF) { uniquePeptides.Add(peptideSequence); } } if (uniquePeptides.Count != 0) { uniqueProteinToPeptides.Add(proteinAccession, uniquePeptides); } } return(uniqueProteinToPeptides); }