picard.vcf

## Class MergeVcfs

- java.lang.Object
- - picard.cmdline.CommandLineProgram
  - - picard.vcf.MergeVcfs

-     public class MergeVcfs
      extends CommandLineProgram

  Combines multiple VCF files into a single file. Input files must be sorted by their contigs and, within contigs, by start position. Throws IllegalArgumentException if the contig lists are not present in the input files, are not identical or if the sample lists are not the same; this class uses the GATK to merge headers, which may throw exceptions if the headers cannot be merged. See VCFUtils.smartMergeHeaders for details.

  An index file is created for the output file by default. Using an output file name with a ".gz" extension will create gzip-compressed output.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `List<File>` | `INPUT`
    `File` | `OUTPUT`
    `File` | `SEQUENCE_DICTIONARY`

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

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

    - ### 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="VCF or BCF input files File format is determined by file extension.",
                  minElements=1)
          public List<File> INPUT

    - #### OUTPUT

          @Option(shortName="O",
                  doc="The merged VCF or BCF file. File format is determined by file extension.")
          public File OUTPUT

    - #### SEQUENCE_DICTIONARY

          @Option(shortName="D",
                  doc="The index sequence dictionary to use instead of the sequence dictionary in the input file",
                  optional=true)
          public File SEQUENCE_DICTIONARY

  - ### Constructor Detail

    - #### MergeVcfs

          public MergeVcfs()

  - ### Method Detail

    - #### main

          public static void main(String[] argv)

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