for (final Histogram<HKEY> histo : nonEmptyHistograms) { out.append(SEPARATOR); out.append(StringUtil.assertCharactersNotInString(histo.getValueLabel(), '\t', '\n'));
for (final Histogram<HKEY> histo : nonEmptyHistograms) { out.append(SEPARATOR); out.append(StringUtil.assertCharactersNotInString(histo.getValueLabel(), '\t', '\n'));
for (final Histogram<HKEY> histo : nonEmptyHistograms) { out.append(SEPARATOR); out.append(StringUtil.assertCharactersNotInString(histo.getValueLabel(), '\t', '\n'));
@Test public void testLabels() { final int[] is = {4,4,5,5,5}; final Histogram<Integer> histo = new Histogram<>("FOO", "BAR"); for (final int i : is) histo.increment(i); Assert.assertEquals(histo.getBinLabel(),"FOO"); Assert.assertEquals(histo.getValueLabel(),"BAR"); }
@Override public void test() throws IOException { final MetricsFile<DuplicationMetrics, Double> metricsOutput = testMetrics(); // Check contents of set size bin against expected values if (!expectedSetSizeMap.isEmpty()) { boolean checked = false; for (final Histogram<Double> histo : metricsOutput.getAllHistograms()) { final String label = histo.getValueLabel(); for (final Double bin : histo.keySet()) { final String binStr = String.valueOf(bin); final List<String> labelBinStr = Arrays.asList(label, binStr); if (expectedSetSizeMap.containsKey(labelBinStr)) { checked = true; Histogram.Bin<Double> binValue = histo.get(bin); final double actual = binValue.getValue(); final double expected = expectedSetSizeMap.get(labelBinStr); Assert.assertEquals(actual, expected); } } } if (!checked) { Assert.fail("Could not not find matching entry for expectedSetSizeMap in metrics."); } } }
if (histogram.getValueLabel().equals("count_WHOLE_GENOME")) { Assert.assertEquals(histogram.get(0).getValue(), 1080d); } else {
if (histogram.getValueLabel().equals("count_WHOLE_GENOME")) { Assert.assertEquals(histogram.get(0).getValue(), 274d); } else {