}
}
StringBuilder dScore = new StringBuilder();
Collections.sort(modifications);
PSPtmScores ptmScores = new PSPtmScores();
for (String mod : modifications) {
if (spectrumMatch.getUrParam(ptmScores) != null) {
if (dScore.length() > 0) {
dScore.append(", ");
}
ptmScores = (PSPtmScores) spectrumMatch.getUrParam(new PSPtmScores());
dScore.append(mod).append(" (");
if (ptmScores != null && ptmScores.getPtmScoring(mod) != null) {
PtmScoring ptmScoring = ptmScores.getPtmScoring(mod);
boolean firstSite = true;
ArrayList<Integer> sites = new ArrayList<Integer>(ptmScoring.getDSites());
Collections.sort(sites);
for (int site : sites) {
if (firstSite) {
firstSite = false;
} else {
dScore.append(", ");
}
dScore.append(site).append(": ").append(ptmScoring.getDeltaScore(site));
}
} else {
dScore.append("Not Scored");
}
dScore.append(")");
}
}
StringBuilder probabilisticScore = new StringBuilder();
if (ptmScoringPreferences.isProbabilitsticScoreCalculation()) {
for (String mod : modifications) {
if (spectrumMatch.getUrParam(ptmScores) != null) {
if (probabilisticScore.length() > 0) {
probabilisticScore.append(", ");
}
ptmScores = (PSPtmScores) spectrumMatch.getUrParam(new PSPtmScores());
probabilisticScore.append(mod).append(" (");
if (ptmScores != null && ptmScores.getPtmScoring(mod) != null) {
PtmScoring ptmScoring = ptmScores.getPtmScoring(mod);
boolean firstSite = true;
ArrayList<Integer> sites = new ArrayList<Integer>(ptmScoring.getProbabilisticSites());
Collections.sort(sites);
for (int site : sites) {
if (firstSite) {