/** * @param statsQuery StatisticsQueryCondition * @param statisticsStorage * @param scoringExps Set of experiments that have at least one non-zero score for * statisticsQuery. This is used retrieving efos to be displayed in heatmap when no query efvs * exist (c.f. atlasStatisticsQueryService.getScoringAttributesForGenes()) * @return experiment counts corresponding for statsQuery */ public static Multiset<Integer> getExperimentCounts( StatisticsQueryCondition statsQuery, StatisticsStorage statisticsStorage, Set<ExperimentInfo> scoringExps) { long start = System.currentTimeMillis(); Multiset<Integer> counts = StatisticsQueryUtils.scoreQuery(statsQuery, statisticsStorage, scoringExps); long dur = System.currentTimeMillis() - start; int numOfGenesWithCounts = counts.elementSet().size(); if (numOfGenesWithCounts > 0) { log.debug( "StatisticsQuery: " + statsQuery.prettyPrint() + " ==> result set size: " + numOfGenesWithCounts + " (duration: " + dur + " ms)"); } return counts; }