{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "bcftools_stats",
  "description": "Parses VCF or BCF and produces a txt stats file which can be plotted using plot-vcfstats.\nWhen two files are given, the program generates separate stats for intersection\nand the complements. By default only sites are compared, -s/-S must given to include\nalso sample columns.\n",
  "type": "object",
  "$defs": {
    "inputs": {
      "title": "Inputs",
      "type": "object",
      "description": "No description",
      "properties": {
        "input": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "format": "path",
          "exists": true,
          "description": "Input VCF/BCF file(s)",
          "help_text": "Type: `file`, multiple: `True`, required, direction: `input`, example: `[\"input.vcf.gz\"]`. "
        }
      }
    },
    "outputs": {
      "title": "Outputs",
      "type": "object",
      "description": "No description",
      "properties": {
        "output": {
          "type": "string",
          "format": "path",
          "description": "Write output to a file",
          "help_text": "Type: `file`, multiple: `False`, required, default: `\"$id.$key.output.txt\"`, direction: `output`, example: `\"stats.txt\"`. ",
          "default": "$id.$key.output.txt"
        }
      }
    },
    "options": {
      "title": "Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "af_bins": {
          "type": "string",
          "description": "Allele frequency bins, a list of comma-separated bin values.\n",
          "help_text": "Type: `string`, multiple: `False`, example: `\"0.1,0.5,1\"`. "
        },
        "af_tag": {
          "type": "string",
          "description": "Allele frequency tag to use, by default estimated from AN,AC or GT.\n",
          "help_text": "Type: `string`, multiple: `False`, example: `\"AF\"`. "
        },
        "collapse": {
          "type": "string",
          "description": "Treat as identical records with <snps|indels|both|all|some|none>.\n",
          "help_text": "Type: `string`, multiple: `False`, example: `\"snps\"`, choices: ``snps`, `indels`, `both`, `all`, `some`, `none``. ",
          "enum": [
            "snps",
            "indels",
            "both",
            "all",
            "some",
            "none"
          ]
        },
        "depth": {
          "type": "string",
          "description": "Depth distribution: min,max,bin size [0:200:1].\n",
          "help_text": "Type: `string`, multiple: `False`, example: `\"0,500,1\"`. "
        },
        "exclude": {
          "type": "string",
          "description": "Exclude sites for which the expression is true.\n",
          "help_text": "Type: `string`, multiple: `False`, example: `\"QUAL < 30\"`. "
        },
        "exons": {
          "type": "string",
          "format": "path",
          "description": "Tab-delimited file with exons for indel frameshifts statistics.\nThe columns of the file are CHR, FROM, TO, with 1-based positions.\nThe file should be BGZF-compressed and indexed with tabix.\n",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`, example: `\"exons.bed.gz\"`. "
        },
        "apply_filters": {
          "type": "string",
          "description": "Require at least one of the listed FILTER strings.\n",
          "help_text": "Type: `string`, multiple: `False`, example: `\"PASS,.\"`. "
        },
        "fasta_ref": {
          "type": "string",
          "format": "path",
          "description": "Faidx indexed reference sequence file to determine INDEL context.\n",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`, example: `\"reference.fa\"`. "
        },
        "first_allele_only": {
          "type": "boolean",
          "description": "Include only 1st allele at multiallelic sites.\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "include": {
          "type": "string",
          "description": "Select sites for which the expression is true.\n",
          "help_text": "Type: `string`, multiple: `False`, example: `\"QUAL >= 30\"`. "
        },
        "split_by_id": {
          "type": "boolean",
          "description": "Collect stats for sites with ID separately (known vs novel).\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "regions": {
          "type": "string",
          "description": "Restrict to comma-separated list of regions.\n",
          "help_text": "Type: `string`, multiple: `False`, example: `\"chr20:1000000-2000000\"`. "
        },
        "regions_file": {
          "type": "string",
          "format": "path",
          "description": "Restrict to regions listed in a file.\n",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`, example: `\"regions.bed\"`. "
        },
        "regions_overlap": {
          "type": "string",
          "description": "Include if POS in the region (pos), record overlaps (record), \nvariant overlaps (variant)",
          "help_text": "Type: `string`, multiple: `False`, choices: ``pos`, `record`, `variant`, `0`, `1`, `2``. ",
          "enum": [
            "pos",
            "record",
            "variant",
            "0",
            "1",
            "2"
          ]
        },
        "samples": {
          "type": "string",
          "description": "List of samples for sample stats, \"-\" to include all samples.\n",
          "help_text": "Type: `string`, multiple: `False`, example: `\"sample1,sample2\"`. "
        },
        "samples_file": {
          "type": "string",
          "format": "path",
          "description": "File of samples to include.\n",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`, example: `\"samples.txt\"`. "
        },
        "targets": {
          "type": "string",
          "description": "Similar to regions, but streams rather than using index.\nTargets can be prefixed with \"^\" for logical complement.\n",
          "help_text": "Type: `string`, multiple: `False`, example: `\"chr20:1000000-2000000\"`. "
        },
        "targets_file": {
          "type": "string",
          "format": "path",
          "description": "Similar to regions_file but streams rather than index-jumps.\n",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`, example: `\"targets.bed\"`. "
        },
        "targets_overlap": {
          "type": "string",
          "description": "Include if POS in the region (pos), record overlaps (record), \nvariant overlaps (variant)",
          "help_text": "Type: `string`, multiple: `False`, choices: ``pos`, `record`, `variant`, `0`, `1`, `2``. ",
          "enum": [
            "pos",
            "record",
            "variant",
            "0",
            "1",
            "2"
          ]
        },
        "user_tstv": {
          "type": "string",
          "description": "Collect Ts/Tv stats for any tag using the given binning.\nFormat is TAG[:min:max:n]",
          "help_text": "Type: `string`, multiple: `False`, example: `\"QUAL:0:40:40\"`. "
        },
        "verbose": {
          "type": "boolean",
          "description": "Produce verbose per-site and per-sample output.\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        }
      }
    },
    "nextflow input-output arguments": {
      "title": "Nextflow input-output arguments",
      "type": "object",
      "description": "Input/output parameters for Nextflow itself. Please note that both publishDir and publish_dir are supported but at least one has to be configured.",
      "properties": {
        "publish_dir": {
          "type": "string",
          "description": "Path to an output directory.",
          "help_text": "Type: `string`, multiple: `False`, required, example: `\"output/\"`. "
        }
      }
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/inputs"
    },
    {
      "$ref": "#/$defs/outputs"
    },
    {
      "$ref": "#/$defs/options"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
