public List<String> getRelatedGeneNamesByScore() throws ApplicationException, DataStoreException, NoRelatedGenesInfoException { List<String> geneNames = new ArrayList<String>(); Iterator<Gene> itr = getRelatedGenesByScore().iterator(); while (itr.hasNext()) { geneNames.add(itr.next().getSymbol()); } return geneNames; }
public static List<String> getValidGenes(List<String> genes) throws SAXException, DataStoreException, ApplicationException { List<String> validGenes = new ArrayList(); for (String geneName : genes) { if (validGene(geneName)) { validGenes.add(geneName); } } return validGenes; }
public void setNetworks(Set<String> n) { Map<InteractionNetworkGroup, Collection<InteractionNetwork>> groupMembers = new HashMap<InteractionNetworkGroup, Collection<InteractionNetwork>>(); Collection<InteractionNetworkGroup> groups = human.getInteractionNetworkGroups(); Set<String> notHandled = n; for (InteractionNetworkGroup group : groups) { if (n.contains(group.getName())) { notHandled.remove(group.getName()); List<InteractionNetwork> networkMembers = new ArrayList<InteractionNetwork>(); Collection<InteractionNetwork> networks = group.getInteractionNetworks(); for (InteractionNetwork network : networks) { networkMembers.add(network); } if (networkMembers.size() > 0) { groupMembers.put(group, networkMembers); } } } networks = groupMembers; }