HiPhivePriority implements Prioritiser<HiPhivePriorityResult> { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final HiPhivePriority other = (HiPhivePriority) obj; return Objects.equals(this.randomWalkMatrix, other.randomWalkMatrix) && Objects.equals(this.options, other.options); } HiPhivePriority(HiPhiveOptions options, DataMatrix randomWalkMatrix, PriorityService priorityService); @Override PriorityType getPriorityType(); @Override Stream<HiPhivePriorityResult> prioritise(List<String> hpoIds, List<Gene> genes); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }
@Test public void testPrioritizeGenesRestrictedGeneList() { List<Gene> genes = getGenes().stream().filter(gene -> gene.getGeneSymbol().equals("FGFR2")).collect(toList()); HiPhivePriority instance = new HiPhivePriority(HiPhiveOptions.builder() .runParams("human,mouse,fish") .build(), DataMatrix.empty(), priorityService); instance.prioritizeGenes(hpoIds, genes); List<HiPhivePriorityResult> results = getPriorityResultsOrderedByScore(genes); assertThat(results.size(), equalTo(genes.size())); Map<String, List<Double>> expectedScores = new LinkedHashMap<>(); expectedScores.put("FGFR2", Lists.newArrayList(0.8762904736638727, 0.8039423769154914, 0.0, 0.0, 0.0)); results.forEach(checkScores(expectedScores)); }