{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "bcftools_annotate",
  "description": "Add or remove annotations from a VCF/BCF file.\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.",
          "help_text": "Type: `file`, multiple: `True`, required, direction: `input`. "
        }
      }
    },
    "outputs": {
      "title": "Outputs",
      "type": "object",
      "description": "No description",
      "properties": {
        "output": {
          "type": "string",
          "format": "path",
          "description": "Output annotated file.",
          "help_text": "Type: `file`, multiple: `False`, required, default: `\"$id.$key.output\"`, direction: `output`. ",
          "default": "$id.$key.output"
        }
      }
    },
    "options": {
      "title": "Options",
      "type": "object",
      "description": "For examples on how to use use bcftools annotate see http://samtools.github.io/bcftools/howtos/annotate.html.\nFor more details on the options see https://samtools.github.io/bcftools/bcftools.html#annotate.\n",
      "properties": {
        "annotations": {
          "type": "string",
          "format": "path",
          "description": "VCF file or tabix-indexed FILE with annotations: CHR\\tPOS[\\tVALUE]+ ",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "columns": {
          "type": "string",
          "description": "List of columns in the annotation file, e.g",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "columns_file": {
          "type": "string",
          "format": "path",
          "description": "Read -c columns from FILE, one name per row, with optional --merge_logic TYPE: NAME[ TYPE].\n",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "exclude": {
          "type": "string",
          "description": "Exclude sites for which the expression is true.\nSee https://samtools.github.io/bcftools/bcftools.html#expressions for details.\n",
          "help_text": "Type: `string`, multiple: `False`, example: `\"QUAL >= 30 && DP >= 10\"`. "
        },
        "force": {
          "type": "boolean",
          "description": "continue even when parsing errors, such as undefined tags, are encountered",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "header_line": {
          "type": "string",
          "description": "Header line which should be appended to the VCF header, can be given multiple times.\n",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "header_lines": {
          "type": "string",
          "format": "path",
          "description": "File with header lines to append to the VCF header.\nFor example:\n  ##INFO=<ID=NUMERIC_TAG,Number=1,Type=Integer,Description=\"Example header line\">\n  ##INFO=<ID=STRING_TAG,Number=1,Type=String,Description=\"Yet another header line\">\n",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "set_id": {
          "type": "string",
          "description": "Set ID column using a `bcftools query`-like expression, see man page for details.\n",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "include": {
          "type": "string",
          "description": "Select sites for which the expression is true.\nSee https://samtools.github.io/bcftools/bcftools.html#expressions for details.\n",
          "help_text": "Type: `string`, multiple: `False`, example: `\"QUAL >= 30 && DP >= 10\"`. "
        },
        "keep_sites": {
          "type": "boolean",
          "description": "Leave --include/--exclude sites unchanged instead of discarding them.\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "merge_logic": {
          "type": "string",
          "description": "When multiple regions overlap a single record, this option defines how to treat multiple annotation values.\nSee man page for more details.\n",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "mark_sites": {
          "type": "string",
          "description": "Annotate sites which are present (\"+\") or absent (\"-\") in the -a file with a new INFO/TAG flag.\n",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "min_overlap": {
          "type": "string",
          "description": "Minimum overlap required as a fraction of the variant in the annotation -a file (ANN), \nin the target VCF file (:VCF), or both for reciprocal overlap (ANN:VCF)",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "no_version": {
          "type": "boolean",
          "description": "Do not append version and command line information to the output VCF header.\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "output_type": {
          "type": "string",
          "description": "Output type:\n  u: uncompressed BCF\n  z: compressed VCF\n  b: compressed BCF\n  v: uncompressed VCF\n",
          "help_text": "Type: `string`, multiple: `False`, choices: ``u`, `z`, `b`, `v``. ",
          "enum": [
            "u",
            "z",
            "b",
            "v"
          ]
        },
        "pair_logic": {
          "type": "string",
          "description": "Controls how to match records from the annotation file to the target VCF",
          "help_text": "Type: `string`, multiple: `False`, choices: ``snps`, `indels`, `both`, `all`, `some`, `exact``. ",
          "enum": [
            "snps",
            "indels",
            "both",
            "all",
            "some",
            "exact"
          ]
        },
        "regions": {
          "type": "string",
          "description": "Restrict to comma-separated list of regions",
          "help_text": "Type: `string`, multiple: `False`, example: `\"20:1000000-2000000\"`. "
        },
        "regions_file": {
          "type": "string",
          "format": "path",
          "description": "Restrict to regions listed in a file",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "regions_overlap": {
          "type": "string",
          "description": "This option controls how overlapping records are determined: \nset to 'pos' or '0' if the VCF record has to have POS inside a region (this corresponds to the default behavior of -t/-T); \nset to 'record' or '1' if also overlapping records with POS outside a region should be included (this is the default behavior of -r/-R, \nand includes indels with POS at the end of a region, which are technically outside the region); \nor set to 'variant' or '2' to include only true overlapping variation (compare the full VCF representation \"TA>T-\" vs the true sequence variation \"A>-\").\n",
          "help_text": "Type: `string`, multiple: `False`, choices: ``pos`, `record`, `variant`, `0`, `1`, `2``. ",
          "enum": [
            "pos",
            "record",
            "variant",
            "0",
            "1",
            "2"
          ]
        },
        "rename_annotations": {
          "type": "string",
          "format": "path",
          "description": "Rename annotations: TYPE/old\\tnew, where TYPE is one of FILTER,INFO,FORMAT.\n",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "rename_chromosomes": {
          "type": "string",
          "format": "path",
          "description": "Rename chromosomes according to the map in file, with \"old_name new_name\\n\" pairs \nseparated by whitespaces, each on a separate line.\n",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "samples": {
          "type": "string",
          "description": "Subset of samples to annotate.\nSee also https://samtools.github.io/bcftools/bcftools.html#common_options.\n",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "samples_file": {
          "type": "string",
          "format": "path",
          "description": "Subset of samples to annotate in file format.\nSee also https://samtools.github.io/bcftools/bcftools.html#common_options.\n",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "single_overlaps": {
          "type": "boolean",
          "description": "Use this option to keep memory requirements low with very large annotation files",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "remove": {
          "type": "string",
          "description": "List of annotations to remove",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "verbosity": {
          "type": "integer",
          "description": "Verbosity level.\n",
          "help_text": "Type: `integer`, multiple: `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"
    }
  ]
}
