picard.analysis

## Class CollectMultipleMetrics

- java.lang.Object
- - picard.cmdline.CommandLineProgram
  - - picard.analysis.CollectMultipleMetrics

-     public class CollectMultipleMetrics
      extends CommandLineProgram

  Class that is designed to instantiate and execute multiple metrics programs that extend SinglePassSamProgram while making only a single pass through the SAM file and supplying each program with the records as it goes.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `CollectMultipleMetrics.Program`
    `static interface` | `CollectMultipleMetrics.ProgramInterface`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `boolean` | `ASSUME_SORTED`
    `File` | `DB_SNP`
    `String` | `FILE_EXTENSION`
    `boolean` | `INCLUDE_UNPAIRED`
    `File` | `INPUT`
    `File` | `INTERVALS`
    `Set<MetricAccumulationLevel>` | `METRIC_ACCUMULATION_LEVEL`
    `String` | `OUTPUT`
    `Set<CollectMultipleMetrics.Program>` | `PROGRAM`
    `int` | `STOP_AFTER`

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

      `COMPRESSION_LEVEL, CREATE_INDEX, CREATE_MD5_FILE, GA4GH_CLIENT_SECRETS, MAX_RECORDS_IN_RAM, QUIET, REFERENCE_SEQUENCE, TMP_DIR, VALIDATION_STRINGENCY, VERBOSITY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CollectMultipleMetrics()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected String[]` | `customCommandLineValidation()` Put any custom command-line validation in an override of this method.
    `int` | `doWork()` Do the work after command line has been parsed.
    `static void` | `main(String[] args)`
    `void` | `setProgramsToRun(Collection<CollectMultipleMetrics.ProgramInterface> programsToRun)` Use this method when invoking CollectMultipleMetrics programmatically to run programs other than the ones available via enum.

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

      `getCommandLine, getCommandLineParser, getDefaultHeaders, getMetricsFile, getNestedOptions, getNestedOptionsForHelp, getStandardUsagePreamble, getVersion, instanceMain, instanceMainWithExit, parseArgs, setDefaultHeaders`

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

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

- - ### Field Detail

    - #### INPUT

          @Option(shortName="I",
                  doc="Input SAM or BAM file.")
          public File INPUT

    - #### ASSUME_SORTED

          @Option(doc="If true (default), then the sort order in the header file will be ignored.",
                  shortName="AS")
          public boolean ASSUME_SORTED

    - #### STOP_AFTER

          @Option(doc="Stop after processing N reads, mainly for debugging.")
          public int STOP_AFTER

    - #### OUTPUT

          @Option(shortName="O",
                  doc="Base name of output files.")
          public String OUTPUT

    - #### METRIC_ACCUMULATION_LEVEL

          @Option(shortName="LEVEL",
                  doc="The level(s) at which to accumulate metrics.")
          public Set<MetricAccumulationLevel> METRIC_ACCUMULATION_LEVEL

    - #### FILE_EXTENSION

          @Option(shortName="EXT",
                  doc="Append the given file extension to all metric file names (ex. OUTPUT.insert_size_metrics.EXT). None if null",
                  optional=true)
          public String FILE_EXTENSION

    - #### PROGRAM

          @Option(doc="Set of metrics programs to apply during the pass through the SAM file.")
          public Set<CollectMultipleMetrics.Program> PROGRAM

    - #### INTERVALS

          @Option(doc="An optional list of intervals to restrict analysis to. Only pertains to some of the PROGRAMs. Programs whose stand-alone CLP does not have an INTERVALS argument will silently ignore this argument.",
                  optional=true)
          public File INTERVALS

    - #### DB_SNP

          @Option(doc="VCF format dbSNP file, used to exclude regions around known polymorphisms from analysis by some PROGRAMs; PROGRAMs whose CLP doesn\'t allow for this argument will quietly ignore it.",
                  optional=true)
          public File DB_SNP

    - #### INCLUDE_UNPAIRED

          @Option(shortName="UNPAIRED",
                  doc="Include unpaired reads in CollectSequencingArtifactMetrics. If set to true then all paired reads will be included as well - MINIMUM_INSERT_SIZE and MAXIMUM_INSERT_SIZE will be ignored in CollectSequencingArtifactMetrics.")
          public boolean INCLUDE_UNPAIRED

  - ### Constructor Detail

    - #### CollectMultipleMetrics

          public CollectMultipleMetrics()

  - ### Method Detail

    - #### main

          public static void main(String[] args)

    - #### customCommandLineValidation

          protected String[] customCommandLineValidation()

      Description copied from class: `CommandLineProgram`
      Put any custom command-line validation in an override of this method. clp is initialized at this point and can be used to print usage and access argv. Any options set by command-line parser can be validated.
      Overrides:
        `customCommandLineValidation` in class `CommandLineProgram`
      Returns:
        null if command line is valid. If command line is invalid, returns an array of error message to be written to the appropriate place.

    - #### setProgramsToRun

          public void setProgramsToRun(Collection<CollectMultipleMetrics.ProgramInterface> programsToRun)

      Use this method when invoking CollectMultipleMetrics programmatically to run programs other than the ones available via enum. This must be called before doWork().

    - #### doWork

          public int doWork()

      Description copied from class: `CommandLineProgram`
      Do the work after command line has been parsed. RuntimeException may be thrown by this method, and are reported appropriately.
      Specified by:
        `doWork` in class `CommandLineProgram`
      Returns:
        program exit status.