/** * Returns a list of descriptions corresponding to every item matching the search. * * @return a list of descriptions * @throws SQLException thrown if an SQLException occurs * @throws ClassNotFoundException thrown if a ClassNotFoundException occurs * @throws IOException thrown if an IOException occurs * @throws InterruptedException thrown if an InterruptedException occurs */ public ArrayList<String> getPossibilitiesDescriptions() throws SQLException, ClassNotFoundException, IOException, InterruptedException { Identification identification = peptideShakerGUI.getIdentification(); // Some necessary pre-caching ArrayList<Type> typeList = types.get(jumpType); ArrayList<String> keys = possibilities.get(jumpType), proteinKeys = new ArrayList<String>(), peptideKeys = new ArrayList<String>(); for (int i = 0; i < keys.size(); i++) { String key = keys.get(i); if (typeList.get(i) == Type.PROTEIN) { proteinKeys.add(key); } else if (typeList.get(i) == Type.PEPTIDE) { peptideKeys.add(key); } } if (!proteinKeys.isEmpty()) { identification.loadProteinMatches(proteinKeys, null, false); } if (!peptideKeys.isEmpty()) { identification.loadPeptideMatches(peptideKeys, null, false); } ArrayList<String> descriptions = new ArrayList<String>(); for (int i = 0; i < keys.size(); i++) { String key = keys.get(i); Type type = typeList.get(i); String description = getItemDescription(key, type); descriptions.add(description); } return descriptions; }