if (progressDialog.isRunCanceled()) {
break;
}
double value = 0;
PeptideMatch peptideMatch = peptideShakerGUI.getIdentification().getPeptideMatch(peptideKey);
peptideShakerGUI.getIdentification().loadSpectrumMatchParameters(peptideMatch.getSpectrumMatches(), spectrumParameter, null);
for (String spectrumKey : peptideMatch.getSpectrumMatches()) {
if (progressDialog.isRunCanceled()) {
break;
}
spectrumParameter = (PSParameter) peptideShakerGUI.getIdentification().getSpectrumMatchParameter(spectrumKey, spectrumParameter);
if (spectrumParameter.getMatchValidationLevel().isValidated() && !spectrumParameter.isHidden()) {
value = value + 1;
}
}
if (value > maxValue) {
maxValue = value;
}
peptideParameter = (PSParameter) peptideShakerGUI.getIdentification().getPeptideMatchParameter(peptideKey, peptideParameter);
if (!peptideParameter.isHidden()) {
if (!peptideMatch.getTheoreticPeptide().isDecoy(peptideShakerGUI.getSequenceMatchingPreferences())) {
if (peptideParameter.getMatchValidationLevel().isValidated()) {
if (peptideParameter.getMatchValidationLevel() == MatchValidationLevel.confident) {
validatedValues.add(value);
} else {
validatedDoubtfulValues.add(value);
}
} else {
nonValidatedValues.add(value);
}
} else {
if (peptideParameter.getMatchValidationLevel().isValidated()) {
validatedDecoyValues.add(value);
} else {
nonValidatedDecoyValues.add(value);
}
}
}
progressDialog.increasePrimaryProgressCounter();
}
} else if (peptideMissedCleavagesJRadioButton.isSelected()) {
// Values for the missed cleavages
validatedValues = new ArrayList<Double>();
validatedDoubtfulValues = new ArrayList<Double>();
nonValidatedValues = new ArrayList<Double>();
validatedDecoyValues = new ArrayList<Double>();
nonValidatedDecoyValues = new ArrayList<Double>();
Enzyme enzyme = peptideShakerGUI.getSearchParameters().getEnzyme();
for (String peptideKey : peptideShakerGUI.getIdentification().getPeptideIdentification()) {
if (progressDialog.isRunCanceled()) {
break;
}
PeptideMatch peptideMatch = peptideShakerGUI.getIdentification().getPeptideMatch(peptideKey);
peptideParameter = (PSParameter) peptideShakerGUI.getIdentification().getPeptideMatchParameter(peptideKey, peptideParameter);
if (!peptideParameter.isHidden()) {
double value = Peptide.getNMissedCleavages(Peptide.getSequence(peptideKey), enzyme);
if (value > 0) {
if (value > maxValue) {
maxValue = value;
}
}
if (!peptideMatch.getTheoreticPeptide().isDecoy(peptideShakerGUI.getSequenceMatchingPreferences())) {
if (peptideParameter.getMatchValidationLevel().isValidated()) {
if (peptideParameter.getMatchValidationLevel() == MatchValidationLevel.confident) {
validatedValues.add(value);
} else {
validatedDoubtfulValues.add(value);
}
} else {
nonValidatedValues.add(value);
}
} else {
if (peptideParameter.getMatchValidationLevel().isValidated()) {
validatedDecoyValues.add(value);
} else {
nonValidatedDecoyValues.add(value);
}
}
}
progressDialog.increasePrimaryProgressCounter();
}
} else if (peptideLengthJRadioButton.isSelected()) {
// Values for the peptide length
validatedValues = new ArrayList<Double>();
validatedDoubtfulValues = new ArrayList<Double>();
nonValidatedValues = new ArrayList<Double>();
validatedDecoyValues = new ArrayList<Double>();
nonValidatedDecoyValues = new ArrayList<Double>();
for (String peptideKey : peptideShakerGUI.getIdentification().getPeptideIdentification()) {
if (progressDialog.isRunCanceled()) {
break;
}
PeptideMatch peptideMatch = peptideShakerGUI.getIdentification().getPeptideMatch(peptideKey);
peptideParameter = (PSParameter) peptideShakerGUI.getIdentification().getPeptideMatchParameter(peptideKey, peptideParameter);
if (!peptideParameter.isHidden()) {
double length = Peptide.getSequence(peptideKey).length();
if (length > 0) {
if (length > maxValue) {
maxValue = length;
}
}
if (!peptideMatch.getTheoreticPeptide().isDecoy(peptideShakerGUI.getSequenceMatchingPreferences())) {
if (peptideParameter.getMatchValidationLevel().isValidated()) {
if (peptideParameter.getMatchValidationLevel() == MatchValidationLevel.confident) {
validatedValues.add(length);
} else {
validatedDoubtfulValues.add(length);