Package picard.sam.markduplicates

## Class CollectDuplicateMetrics

- java.lang.Object
- - picard.cmdline.CommandLineProgram
  - - picard.analysis.SinglePassSamProgram
    - - picard.sam.markduplicates.CollectDuplicateMetrics

-     @DocumentedFeature
      public class CollectDuplicateMetrics
      extends SinglePassSamProgram

  Collect DuplicateMark'ing metrics from an input file that was already Duplicate-Marked.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `File` | `METRICS_FILE` |

    - ### Fields inherited from class picard.analysis.SinglePassSamProgram

      `ASSUME_SORTED, INPUT, output, OUTPUT, STOP_AFTER`

    - ### Fields inherited from class picard.cmdline.CommandLineProgram

      `COMPRESSION_LEVEL, CREATE_INDEX, CREATE_MD5_FILE, GA4GH_CLIENT_SECRETS, MAX_ALLOWABLE_ONE_LINE_SUMMARY_LENGTH, MAX_RECORDS_IN_RAM, QUIET, REFERENCE_SEQUENCE, referenceSequence, specialArgumentsCollection, TMP_DIR, USE_JDK_DEFLATER, USE_JDK_INFLATER, VALIDATION_STRINGENCY, VERBOSITY`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `CollectDuplicateMetrics()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected void` | `acceptRead​(htsjdk.samtools.SAMRecord rec, htsjdk.samtools.reference.ReferenceSequence ref)` | Should be implemented by subclasses to accept SAMRecords one at a time.
    `protected void` | `finish()` | Should be implemented by subclasses to do one-time finalization work.
    `protected OutputArgumentCollection` | `getOutputArgumentCollection()` |
    `protected boolean` | `requiresReference()` |
    `protected void` | `setup​(htsjdk.samtools.SAMFileHeader header, File samFile)` | Should be implemented by subclasses to do one-time initialization work.
    `protected boolean` | `usesNoRefReads()` | Can be overridden and set to false if the section of unmapped reads at the end of the file isn't needed.

    - ### Methods inherited from class picard.analysis.SinglePassSamProgram

      `doWork, makeItSo, setReferenceSequence`

    - ### Methods inherited from class picard.cmdline.CommandLineProgram

      `checkRInstallation, customCommandLineValidation, getCommandLine, getCommandLineParser, getCommandLineParserForArgs, getDefaultHeaders, getFaqLink, getMetricsFile, getPGRecord, getStandardUsagePreamble, getStandardUsagePreamble, getVersion, hasWebDocumentation, instanceMain, instanceMainWithExit, makeReferenceArgumentCollection, parseArgs, setDefaultHeaders, useLegacyParser`

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

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

- - ### Field Detail

    - #### METRICS_FILE

          @Argument(shortName="M",
                    doc="File to write duplication metrics to.")
          public File METRICS_FILE

  - ### Constructor Detail

    - #### CollectDuplicateMetrics

          public CollectDuplicateMetrics()

  - ### Method Detail

    - #### getOutputArgumentCollection

          protected OutputArgumentCollection getOutputArgumentCollection()

      Overrides:
        `getOutputArgumentCollection` in class `SinglePassSamProgram`

    - #### requiresReference

          protected boolean requiresReference()

      Overrides:
        `requiresReference` in class `CommandLineProgram`

    - #### usesNoRefReads

          protected boolean usesNoRefReads()

      Description copied from class: `SinglePassSamProgram`
      Can be overridden and set to false if the section of unmapped reads at the end of the file isn't needed.
      Overrides:
        `usesNoRefReads` in class `SinglePassSamProgram`

    - #### setup

          protected void setup​(htsjdk.samtools.SAMFileHeader header,
                               File samFile)

      Description copied from class: `SinglePassSamProgram`
      Should be implemented by subclasses to do one-time initialization work.
      Specified by:
        `setup` in class `SinglePassSamProgram`

    - #### acceptRead

          protected void acceptRead​(htsjdk.samtools.SAMRecord rec,
                                    htsjdk.samtools.reference.ReferenceSequence ref)

      Description copied from class: `SinglePassSamProgram`
      Should be implemented by subclasses to accept SAMRecords one at a time. If the read has a reference sequence and a reference sequence file was supplied to the program it will be passed as 'ref'. Otherwise 'ref' may be null.
      Specified by:
        `acceptRead` in class `SinglePassSamProgram`

    - #### finish

          protected void finish()

      Description copied from class: `SinglePassSamProgram`
      Should be implemented by subclasses to do one-time finalization work.
      Specified by:
        `finish` in class `SinglePassSamProgram`