picard.sam

## Class AddOrReplaceReadGroups

- java.lang.Object
- - picard.cmdline.CommandLineProgram
  - - picard.sam.AddOrReplaceReadGroups

-     public class AddOrReplaceReadGroups
      extends CommandLineProgram

  Replaces read groups in a BAM file

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `String` | `INPUT`
    `File` | `OUTPUT`
    `String` | `RGCN`
    `String` | `RGDS`
    `htsjdk.samtools.util.Iso8601Date` | `RGDT`
    `String` | `RGID`
    `String` | `RGLB`
    `String` | `RGPG`
    `Integer` | `RGPI`
    `String` | `RGPL`
    `String` | `RGPM`
    `String` | `RGPU`
    `String` | `RGSM`
    `htsjdk.samtools.SAMFileHeader.SortOrder` | `SORT_ORDER`

    - ### 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
    `AddOrReplaceReadGroups()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected int` | `doWork()` Do the work after command line has been parsed.
    `static void` | `main(String[] argv)` Required main method implementation.

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

      `customCommandLineValidation, 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 file (BAM or SAM or a GA4GH url).")
          public String INPUT

    - #### OUTPUT

          @Option(shortName="O",
                  doc="Output file (BAM or SAM).")
          public File OUTPUT

    - #### SORT_ORDER

          @Option(shortName="SO",
                  optional=true,
                  doc="Optional sort order to output in. If not supplied OUTPUT is in the same order as INPUT.")
          public htsjdk.samtools.SAMFileHeader.SortOrder SORT_ORDER

    - #### RGID

          @Option(shortName="ID",
                  doc="Read Group ID")
          public String RGID

    - #### RGLB

          @Option(shortName="LB",
                  doc="Read Group library")
          public String RGLB

    - #### RGPL

          @Option(shortName="PL",
                  doc="Read Group platform (e.g. illumina, solid)")
          public String RGPL

    - #### RGPU

          @Option(shortName="PU",
                  doc="Read Group platform unit (eg. run barcode)")
          public String RGPU

    - #### RGSM

          @Option(shortName="SM",
                  doc="Read Group sample name")
          public String RGSM

    - #### RGCN

          @Option(shortName="CN",
                  doc="Read Group sequencing center name",
                  optional=true)
          public String RGCN

    - #### RGDS

          @Option(shortName="DS",
                  doc="Read Group description",
                  optional=true)
          public String RGDS

    - #### RGDT

          @Option(shortName="DT",
                  doc="Read Group run date",
                  optional=true)
          public htsjdk.samtools.util.Iso8601Date RGDT

    - #### RGPI

          @Option(shortName="PI",
                  doc="Read Group predicted insert size",
                  optional=true)
          public Integer RGPI

    - #### RGPG

          @Option(shortName="PG",
                  doc="Read Group program group",
                  optional=true)
          public String RGPG

    - #### RGPM

          @Option(shortName="PM",
                  doc="Read Group platform model",
                  optional=true)
          public String RGPM

  - ### Constructor Detail

    - #### AddOrReplaceReadGroups

          public AddOrReplaceReadGroups()

  - ### Method Detail

    - #### main

          public static void main(String[] argv)

      Required main method implementation.

    - #### doWork

          protected 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.