picard.sam

## Class ReorderSam

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

-     public class ReorderSam
      extends CommandLineProgram

  Reorders a SAM/BAM input file according to the order of contigs in a second reference sequence

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `boolean` | `ALLOW_CONTIG_LENGTH_DISCORDANCE`
    `boolean` | `ALLOW_INCOMPLETE_DICT_CONCORDANCE`
    `File` | `INPUT`
    `File` | `OUTPUT`
    `File` | `REFERENCE`

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

  - ### 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) to extract reads from.")
          public File INPUT

    - #### OUTPUT

          @Option(shortName="O",
                  doc="Output file (bam or sam) to write extracted reads to.")
          public File OUTPUT

    - #### REFERENCE

          @Option(shortName="R",
                  doc="Reference sequence to reorder reads to match.  A sequence dictionary corresponding to the reference fasta is required.  Create one with CreateSequenceDictionary.jar.")
          public File REFERENCE

    - #### ALLOW_INCOMPLETE_DICT_CONCORDANCE

          @Option(shortName="S",
                  doc="If true, then allows only a partial overlap of the BAM contigs with the new reference sequence contigs.  By default, this tool requires a corresponding contig in the new reference for each read contig")
          public boolean ALLOW_INCOMPLETE_DICT_CONCORDANCE

    - #### ALLOW_CONTIG_LENGTH_DISCORDANCE

          @Option(shortName="U",
                  doc="If true, then permits mapping from a read contig to a new reference contig with the same name but a different length.  Highly dangerous, only use if you know what you are doing.")
          public boolean ALLOW_CONTIG_LENGTH_DISCORDANCE

  - ### Constructor Detail

    - #### ReorderSam

          public ReorderSam()

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