picard.sam.markduplicates.util

## Class LibraryIdGenerator

- java.lang.Object
- - picard.sam.markduplicates.util.LibraryIdGenerator

-     public class LibraryIdGenerator
      extends Object

  A class to generate library Ids and keep duplication metrics by library IDs.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LibraryIdGenerator(htsjdk.samtools.SAMFileHeader header)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addMetricsByLibrary(String library, DuplicationMetrics metrics)`
    `short` | `getLibraryId(htsjdk.samtools.SAMRecord rec)` Get the library ID for the given SAM record.
    `Map<String,Short>` | `getLibraryIdsMap()`
    `static String` | `getLibraryName(htsjdk.samtools.SAMFileHeader header, htsjdk.samtools.SAMRecord rec)` Gets the library name from the header for the record.
    `DuplicationMetrics` | `getMetricsByLibrary(String library)`
    `Map<String,DuplicationMetrics>` | `getMetricsByLibraryMap()`
    `long` | `getNumberOfOpticalDuplicateClusters()`
    `htsjdk.samtools.util.Histogram<Short>` | `getOpticalDuplicatesByLibraryIdMap()`
    `static String` | `getReadGroupLibraryName(htsjdk.samtools.SAMReadGroupRecord readGroup)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LibraryIdGenerator

          public LibraryIdGenerator(htsjdk.samtools.SAMFileHeader header)

  - ### Method Detail

    - #### getLibraryIdsMap

          public Map<String,Short> getLibraryIdsMap()

    - #### getMetricsByLibraryMap

          public Map<String,DuplicationMetrics> getMetricsByLibraryMap()

    - #### getOpticalDuplicatesByLibraryIdMap

          public htsjdk.samtools.util.Histogram<Short> getOpticalDuplicatesByLibraryIdMap()

    - #### getReadGroupLibraryName

          public static String getReadGroupLibraryName(htsjdk.samtools.SAMReadGroupRecord readGroup)

    - #### getLibraryName

          public static String getLibraryName(htsjdk.samtools.SAMFileHeader header,
                                              htsjdk.samtools.SAMRecord rec)

      Gets the library name from the header for the record. If the RG tag is not present on the record, or the library isn't denoted on the read group, a constant string is returned.

    - #### getLibraryId

          public short getLibraryId(htsjdk.samtools.SAMRecord rec)

      Get the library ID for the given SAM record.

    - #### getMetricsByLibrary

          public DuplicationMetrics getMetricsByLibrary(String library)

    - #### addMetricsByLibrary

          public void addMetricsByLibrary(String library,
                                          DuplicationMetrics metrics)

    - #### getNumberOfOpticalDuplicateClusters

          public long getNumberOfOpticalDuplicateClusters()