ClassNotFoundException, InterruptedException, MzMLUnmarshallerException {
switch (psmFeature) {
case probabilistic_score:
if (spectrumMatch.getBestPeptideAssumption() != null) {
PSPtmScores ptmScores = new PSPtmScores();
ptmScores = (PSPtmScores) spectrumMatch.getUrParam(ptmScores);
if (ptmScores != null) {
StringBuilder result = new StringBuilder();
ArrayList<String> modList = new ArrayList<String>(ptmScores.getScoredPTMs());
Collections.sort(modList);
for (String mod : modList) {
PtmScoring ptmScoring = ptmScores.getPtmScoring(mod);
ArrayList<Integer> sites = new ArrayList<Integer>(ptmScoring.getProbabilisticSites());
if (!sites.isEmpty()) {
Collections.sort(sites);
if (result.length() > 0) {
result.append(", ");
}
result.append(mod).append(" (");
boolean firstSite = true;
for (int site : sites) {
if (firstSite) {
firstSite = false;
} else {
result.append(", ");
}
result.append(site).append(": ").append(ptmScoring.getProbabilisticScore(site));
}
result.append(")");
}
}
return result.toString();
}
}
return "";
case d_score:
if (spectrumMatch.getBestPeptideAssumption() != null) {
StringBuilder result = new StringBuilder();
PSPtmScores ptmScores = new PSPtmScores();
ptmScores = (PSPtmScores) spectrumMatch.getUrParam(ptmScores);
if (ptmScores != null) {
ArrayList<String> modList = new ArrayList<String>(ptmScores.getScoredPTMs());
Collections.sort(modList);
for (String mod : modList) {
PtmScoring ptmScoring = ptmScores.getPtmScoring(mod);
ArrayList<Integer> sites = new ArrayList<Integer>(ptmScoring.getDSites());
if (!sites.isEmpty()) {
Collections.sort(sites);
if (result.length() > 0) {
result.append(", ");
}
result.append(mod).append(" (");
boolean firstSite = true;
for (int site : sites) {
if (firstSite) {
firstSite = false;
} else {
result.append(", ");
}
result.append(site).append(": ").append(ptmScoring.getDeltaScore(site));
}
result.append(")");
}
}
}
return result.toString();
}
return "";
case localization_confidence:
if (spectrumMatch.getBestPeptideAssumption() != null) {
PSPtmScores ptmScores = new PSPtmScores();
ptmScores = (PSPtmScores) spectrumMatch.getUrParam(ptmScores);
if (ptmScores != null) {
StringBuilder result = new StringBuilder();
ArrayList<String> modList = ptmScores.getScoredPTMs();
Collections.sort(modList);
for (String mod : modList) {
PTM ptm = PTMFactory.getInstance().getPTM(mod);
if (ptm.getType() == PTM.MODAA) {
if (result.length() > 0) {
result.append(", ");
}
result.append(mod);
result.append(" (");
PtmScoring ptmScoring = ptmScores.getPtmScoring(mod);
boolean firstSite = true;
ArrayList<Integer> sites = ptmScoring.getOrderedPtmLocations();
if (sites.isEmpty()) {
result.append("Not Scored");