private PeptideProteinNameSet ProteinListToPPNSet(ArrayList<Protein> proteins) { Set<String> protNames = new HashSet<String>(); Set<String> pepNames = new HashSet<String>(); for (Protein p : proteins) { protNames.add(p.getName()); pepNames.addAll(p.getPeptides()); } PeptideProteinNameSet pps = new PeptideProteinNameSet(); pps.setPeptides(pepNames); pps.setProteins(protNames); return pps; }
private PeptideProteinNameSet getPeptideProteinNameSet() { PeptideProteinNameSet pps = new PeptideProteinNameSet(); pps.setPeptides(minPeptides.keySet()); pps.setProteins(minProteins.keySet()); return pps; }