HiPhivePriorityResult extends AbstractPriorityResult { @JsonIgnore public String getPhenotypeEvidenceText() { StringBuilder humanBuilder = new StringBuilder(); StringBuilder mouseBuilder = new StringBuilder(); StringBuilder fishBuilder = new StringBuilder(); for (GeneModelPhenotypeMatch geneModelPhenotypeMatch : phenotypeEvidence) { Map<PhenotypeTerm, PhenotypeMatch> bestMatchesForModel = getPhenotypeTermPhenotypeMatchMap(geneModelPhenotypeMatch); switch (geneModelPhenotypeMatch.getOrganism()) { case HUMAN: GeneDiseaseModel geneDiseaseModel = (GeneDiseaseModel) geneModelPhenotypeMatch.getModel(); humanBuilder.append(geneDiseaseModel.getDiseaseTerm()) .append(" (").append(geneDiseaseModel.getDiseaseId()).append("): "); makeBestPhenotypeMatchText(humanBuilder, bestMatchesForModel); break; case MOUSE: makeBestPhenotypeMatchText(mouseBuilder, bestMatchesForModel); break; case FISH: makeBestPhenotypeMatchText(fishBuilder, bestMatchesForModel); } } StringBuilder humanPPIBuilder = new StringBuilder(); StringBuilder mousePPIBuilder = new StringBuilder(); StringBuilder fishPPIBuilder = new StringBuilder(); for (GeneModelPhenotypeMatch geneModelPhenotypeMatch : ppiEvidence) { Map<PhenotypeTerm, PhenotypeMatch> bestMatchesForModel = getPhenotypeTermPhenotypeMatchMap(geneModelPhenotypeMatch); String proximityToGeneSymbol = "Proximity to " + geneModelPhenotypeMatch.getHumanGeneSymbol() + " "; switch (geneModelPhenotypeMatch.getOrganism()) { case HUMAN: GeneDiseaseModel geneDiseaseModel = (GeneDiseaseModel) geneModelPhenotypeMatch.getModel(); humanPPIBuilder.append(proximityToGeneSymbol) .append("associated with ") .append(geneDiseaseModel.getDiseaseTerm()) .append(" (").append(geneDiseaseModel.getDiseaseId()).append("): "); makeBestPhenotypeMatchText(humanPPIBuilder, bestMatchesForModel); break; case MOUSE: mousePPIBuilder.append(proximityToGeneSymbol); makeBestPhenotypeMatchText(mousePPIBuilder, bestMatchesForModel); break; case FISH: fishPPIBuilder.append(proximityToGeneSymbol); makeBestPhenotypeMatchText(fishPPIBuilder, bestMatchesForModel); } } String human = humanBuilder.toString(); String mouse = mouseBuilder.toString(); String fish = fishBuilder.toString(); String humanPPI = humanPPIBuilder.toString(); String mousePPI = mousePPIBuilder.toString(); String fishPPI = fishPPIBuilder.toString(); return String.format("%s\t%s\t%s\t%s\t%s\t%s", human, mouse, fish, humanPPI, mousePPI, fishPPI); } HiPhivePriorityResult(int geneId, String geneSymbol, double score, List<PhenotypeTerm> queryPhenotypeTerms, List<GeneModelPhenotypeMatch> phenotypeEvidence, List<GeneModelPhenotypeMatch> ppiEvidence, double ppiScore, boolean candidateGeneMatch); @Override String getGeneSymbol(); @Override double getScore(); List<PhenotypeTerm> getQueryPhenotypeTerms(); List<GeneModelPhenotypeMatch> getPhenotypeEvidence(); List<GeneModelPhenotypeMatch> getPpiEvidence(); double getHumanScore(); double getMouseScore(); double getFishScore(); double getPpiScore(); boolean isCandidateGeneMatch(); @JsonIgnore String getPhenotypeEvidenceText(); @JsonIgnore @Override String getHTMLCode(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test void testGetPhenotypeEvidenceText() { System.out.println(instance.getPhenotypeEvidenceText()); }