final Histogram<Short>.Bin bin = opticalDuplicatesByLibraryId.get(libraryId);
if (bin != null) {
metrics.READ_PAIR_OPTICAL_DUPLICATES = (long) bin.getValue();
}
}
metrics.calculateDerivedMetrics();
file.addMetric(metrics);
}
if (metricsByLibrary.size() == 1) {
file.setHistogram(metricsByLibrary.values().iterator().next().calculateRoiHistogram());