name: gatk4_genomicsdbimport
description: merge GVCFs from multiple samples. For use in joint genotyping or somatic panel of normal creation.
keywords:
  - gatk4
  - genomicsdbimport
  - genomicsdb
  - panelofnormalscreation
  - jointgenotyping
tools:
  - gatk4:
      description: |
        Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools
        with a primary focus on variant discovery and genotyping. Its powerful processing engine
        and high-performance computing features make it capable of taking on projects of any size.
      homepage: https://gatk.broadinstitute.org/hc/en-us
      documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s
      doi: 10.1158/1538-7445.AM2017-3590

input:
  - meta:
      type: map
      description: |
        Groovy Map containing sample information
        e.g. [ id:'test']
  - vcf:
      type: list
      description: either a list of vcf files to be used to create or update a genomicsdb, or a file that contains a map to vcf files to be used.
      pattern: "*.vcf.gz"

  - tbi:
      type: list
      description: list of tbi files that match with the input vcf files
      pattern: "*.vcf.gz_tbi"

  - wspace:
      type: path
      description: path to an existing genomicsdb to be used in update db mode or get intervals mode. This WILL NOT specify name of a new genomicsdb in create db mode.
      pattern: "/path/to/existing/gendb"

  - intervalfile:
      type: file
      description: file containing the intervals to be used when creating the genomicsdb
      pattern: "*.interval_list"

  - intervalval:
      type: string
      description: if an intervals file has not been spcified, the value enetered here will be used as an interval via the "-L" argument
      pattern: "example: chr1:1000-10000"

  - run_intlist:
      type: boolean
      description: Specify whether to run get interval list mode, this option cannot be specified at the same time as run_updatewspace.
      pattern: "true/false"

  - run_updatewspace:
      type: boolean
      description: Specify whether to run update genomicsdb mode, this option takes priority over run_intlist.
      pattern: "true/false"

  - input_map:
      type: boolean
      description: Specify whether the vcf input is providing a list of vcf file(s) or a single file containing a map of paths to vcf files to be used to create or update a genomicsdb.
      pattern: "*.sample_map"

output:
  - genomicsdb:
      type: directory
      description: Directory containing the files that compose the genomicsdb workspace, this is only output for create mode, as update changes an existing db
      pattern: "*/$prefix"
  - updatedb:
      type: directory
      description: Directory containing the files that compose the updated genomicsdb workspace, this is only output for update mode, and should be the same path as the input wspace.
      pattern: "same/path/as/wspace"
  - intervallist:
      type: file
      description: File containing the intervals used to generate the genomicsdb, only created by get intervals mode.
      pattern: "*.interval_list"
  - versions:
      type: file
      description: File containing software versions
      pattern: "versions.yml"

authors:
  - "@GCJMackenzie"
