psParameter = (PSParameter) peptideAssumption.getUrParam(psParameter);
psParameter.resetQcResults();
if (sequenceFactory.concatenatedTargetDecoy()) {
TargetDecoyMap targetDecoyMap = inputMap.getTargetDecoyMap(peptideAssumption.getAdvocate());
TargetDecoyResults targetDecoyResults = targetDecoyMap.getTargetDecoyResults();
double seThreshold = targetDecoyResults.getScoreLimit();
double confidenceThreshold = targetDecoyResults.getConfidenceLimit() + targetDecoyMap.getResolution();
if (confidenceThreshold > 100) {
confidenceThreshold = 100;
}
boolean noValidated = targetDecoyResults.noValidated();
if (!noValidated && peptideAssumption.getScore() <= seThreshold) { //@TODO: include ascending/descending scores
String reasonDoubtful = null;
boolean filterPassed = true;
for (AssumptionFilter filter : inputMap.getDoubtfulMatchesFilters()) {
boolean validated = filter.isValidated(spectrumKey, peptideAssumption, searchParameters, annotationPreferences, peptideSpectrumAnnotator);
psParameter.setQcResult(filter.getName(), validated);
if (!validated) {
filterPassed = false;
if (reasonDoubtful == null) {
reasonDoubtful = "";
} else {
reasonDoubtful += ", ";
}
reasonDoubtful += filter.getDescription();
}
}
boolean confidenceThresholdPassed = psParameter.getSearchEngineConfidence() >= confidenceThreshold; //@TODO: not sure whether we should include all 100% confidence hits by default?
if (!confidenceThresholdPassed) {
if (reasonDoubtful == null) {
reasonDoubtful = "";
} else {
reasonDoubtful += ", ";
}
reasonDoubtful += "Low confidence";
}
boolean enoughHits = targetDecoyMap.getnTargetOnly() > 100;
if (!enoughHits) {
if (reasonDoubtful == null) {
reasonDoubtful = "";
} else {