name: gatk4_variantrecalibrator
description: |
  Build a recalibration model to score variant quality for filtering purposes.
  It is highly recommended to follow GATK best practices when using this module,
  the gaussian mixture model requires a large number of samples to be used for the
  tool to produce optimal results. For example, 30 samples for exome data. For more details see
  https://gatk.broadinstitute.org/hc/en-us/articles/4402736812443-Which-training-sets-arguments-should-I-use-for-running-VQSR-
keywords:
  - gatk4
  - recalibration model
  - variantrecalibrator
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
      identifier: ""
input:
  - - meta:
        type: map
        description: |
          Groovy Map containing sample information
          e.g. [ id:'test' ]
    - vcf:
        type: file
        description: input vcf file containing the variants to be recalibrated
        pattern: "*.vcf.gz"
    - tbi:
        type: file
        description: tbi file matching with -vcf
        pattern: "*.vcf.gz.tbi"
  - - resource_vcf:
        type: file
        description: all resource vcf files that are used with the corresponding '--resource'
          label
        pattern: "*.vcf.gz"
  - - resource_tbi:
        type: file
        description: all resource tbi files that are used with the corresponding '--resource'
          label
        pattern: "*.vcf.gz.tbi"
  - - labels:
        type: string
        description: necessary arguments for GATK VariantRecalibrator. Specified to
          directly match the resources provided. More information can be found at
          https://gatk.broadinstitute.org/hc/en-us/articles/5358906115227-VariantRecalibrator
  - - fasta:
        type: file
        description: The reference fasta file
        pattern: "*.fasta"
  - - fai:
        type: file
        description: Index of reference fasta file
        pattern: "fasta.fai"
  - - dict:
        type: file
        description: GATK sequence dictionary
        pattern: "*.dict"
output:
  - recal:
      - meta:
          type: file
          description: Output recal file used by ApplyVQSR
          pattern: "*.recal"
      - "*.recal":
          type: file
          description: Output recal file used by ApplyVQSR
          pattern: "*.recal"
  - idx:
      - meta:
          type: file
          description: Index file for the recal output file
          pattern: "*.idx"
      - "*.idx":
          type: file
          description: Index file for the recal output file
          pattern: "*.idx"
  - tranches:
      - meta:
          type: file
          description: Output tranches file used by ApplyVQSR
          pattern: "*.tranches"
      - "*.tranches":
          type: file
          description: Output tranches file used by ApplyVQSR
          pattern: "*.tranches"
  - plots:
      - meta:
          type: file
          description: Optional output rscript file to aid in visualization of the input
            data and learned model.
          pattern: "*plots.R"
      - "*plots.R":
          type: file
          description: Optional output rscript file to aid in visualization of the input
            data and learned model.
          pattern: "*plots.R"
  - versions:
      - versions.yml:
          type: file
          description: File containing software versions
          pattern: "versions.yml"
authors:
  - "@GCJMackenzie"
  - "@nickhsmith"
maintainers:
  - "@GCJMackenzie"
  - "@nickhsmith"
