int cpt = 0;
modifiedMaps.put(cpt, false);
((DefaultTableModel) groupSelectionTable.getModel()).addRow(new Object[]{cpt + 1, "Proteins"});
TargetDecoyMap targetDecoyMap = pSMaps.getProteinMap().getTargetDecoyMap();
TargetDecoyResults targetDecoyResults = targetDecoyMap.getTargetDecoyResults();
originalThresholdTypes.put(cpt, targetDecoyResults.getInputType());
originalThresholds.put(cpt, targetDecoyResults.getUserInput());
ArrayList<String> peptideKeys = pSMaps.getPeptideSpecificMap().getKeys();
if (peptideKeys.size() == 1) {
String key = peptideKeys.get(0);
peptideMap.put(++cpt, key);
modifiedMaps.put(cpt, false);
((DefaultTableModel) groupSelectionTable.getModel()).addRow(new Object[]{cpt + 1, "Peptides"});
targetDecoyMap = pSMaps.getPeptideSpecificMap().getTargetDecoyMap(key);
targetDecoyResults = targetDecoyMap.getTargetDecoyResults();
originalThresholdTypes.put(cpt, targetDecoyResults.getInputType());
originalThresholds.put(cpt, targetDecoyResults.getUserInput());
} else {
for (String peptideKey : peptideKeys) {
if (progressDialog.isRunCanceled()) {
break;
}
peptideMap.put(++cpt, peptideKey);
modifiedMaps.put(cpt, false);
String title = PeptideSpecificMap.getKeyName(peptideShakerGUI.getSearchParameters().getModificationProfile(), peptideKey);
((DefaultTableModel) groupSelectionTable.getModel()).addRow(new Object[]{cpt + 1, title + " Peptides"});
}
}
PsmSpecificMap psmSpecificMap = pSMaps.getPsmSpecificMap();
ArrayList<Integer> foundCharges = new ArrayList<Integer>();
HashMap<Integer, ArrayList<Integer>> groupedCharges = new HashMap<Integer, ArrayList<Integer>>();
for (Integer charge : psmSpecificMap.getPossibleCharges()) {
for (String file : psmSpecificMap.getFilesAtCharge(charge)) {
if (!psmSpecificMap.isFileGrouped(charge, file)) {
foundCharges.add(charge);
if (progressDialog.isRunCanceled()) {
break;
}
HashMap<Integer, String> psmKey = new HashMap<Integer, String>();
psmKey.put(charge, file);
psmMap.put(++cpt, psmKey);
modifiedMaps.put(cpt, false);
targetDecoyMap = pSMaps.getPsmSpecificMap().getTargetDecoyMap(charge, file);
targetDecoyResults = targetDecoyMap.getTargetDecoyResults();
originalThresholdTypes.put(cpt, targetDecoyResults.getInputType());
originalThresholds.put(cpt, targetDecoyResults.getUserInput());
}
}
}
for (int charge : psmSpecificMap.getChargesFromGroupedFiles()) {
int correctedCharge = psmSpecificMap.getCorrectedCharge(charge);
if (correctedCharge == charge) {
HashMap<Integer, String> psmKey = new HashMap<Integer, String>();
psmKey.put(charge, null);
psmMap.put(++cpt, psmKey);
modifiedMaps.put(cpt, false);
targetDecoyMap = pSMaps.getPsmSpecificMap().getTargetDecoyMap(charge, null);
targetDecoyResults = targetDecoyMap.getTargetDecoyResults();
originalThresholdTypes.put(cpt, targetDecoyResults.getInputType());
originalThresholds.put(cpt, targetDecoyResults.getUserInput());
} else {
ArrayList<Integer> charges = groupedCharges.get(correctedCharge);
if (charges == null) {