EvidenceService { Map<String, Map<Contrast, Integer>> getPercentileRanks(E experiment) { return readPercentileRanks( experiment, dataFileHub.getDifferentialExperimentFiles(experiment.getAccession()).percentileRanks.get()); } EvidenceService(
            ProfileStreamFactory<Contrast, X, E, O, P> differentialProfileStreamFactory,
            DataFileHub dataFileHub, String expressionAtlasVersion); void evidenceForExperiment(E experiment,
                                      Function<Contrast, O> queryForOneContrast,
                                      Consumer<JsonObject> yield);  }
@Test public void testGetPercentileRanks() { mockDataFileHub.addPercentileRanksFile(EXPERIMENT_ACCESSION, ImmutableList.of( "GeneId g1_g2 g3_g4".split(" "), "ENSG00000000003 89 97".split(" "), "ENSG00000000005 56 53".split(" "))); assertThat(subject.getPercentileRanks(experiment).get("ENSG00000000003").get(c1), is(89)); }
@Test public void understandNaAsLackOfValue() { mockDataFileHub.addPercentileRanksFile(EXPERIMENT_ACCESSION, ImmutableList.of( "GeneId g1_g2 g3_g4".split(" "), "ENSG00000000003 89 NA".split(" "))); assertThat(subject.getPercentileRanks(experiment).get("ENSG00000000003").get(c1), is(89)); assertThat(subject.getPercentileRanks(experiment).get("ENSG00000000003").get(c2), is(nullValue())); }