public LibraryIdGenerator(final SAMFileHeader header) {
this.header = header;
for (final SAMReadGroupRecord readGroup : header.getReadGroups()) {
final String library = readGroup.getLibrary();
DuplicationMetrics metrics = metricsByLibrary.get(library);
if (metrics == null) {
metrics = new DuplicationMetrics();
metrics.LIBRARY = library;
metricsByLibrary.put(library, metrics);
}
}
}