// update protein level PTM scoring
ArrayList<String> proteins = peptideMatch.getTheoreticPeptide().getParentProteins(peptideShakerGUI.getSequenceMatchingPreferences());
PSMaps psMaps = new PSMaps();
psMaps = (PSMaps) identification.getUrParam(psMaps);
PsmPTMMap psmPTMMap = psMaps.getPsmPTMMap();
PtmScorer ptmScorer = new PtmScorer(psmPTMMap);
for (String proteinKey : peptideShakerGUI.getIdentification().getProteinIdentification()) {
boolean candidate = false;
for (String protein : proteins) {
if (proteinKey.contains(protein)) {
candidate = true;
}
}
if (candidate) {
ProteinMatch proteinMatch = peptideShakerGUI.getIdentification().getProteinMatch(proteinKey);
if (proteins.contains(proteinMatch.getMainMatch())) {
try {
ptmScorer.scorePTMs(identification, proteinMatch, peptideShakerGUI.getSearchParameters(), peptideShakerGUI.getAnnotationPreferences(), false, peptideShakerGUI.getPtmScoringPreferences(), peptideShakerGUI.getSequenceMatchingPreferences());
} catch (Exception e) {
peptideShakerGUI.catchException(e);
}
}
}