{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "samtools_stats",
  "description": "Reports alignment summary statistics for a BAM file.",
  "type": "object",
  "$defs": {
    "inputs": {
      "title": "Inputs",
      "type": "object",
      "description": "No description",
      "properties": {
        "input": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "Input file.\n",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`. "
        },
        "bai": {
          "type": "string",
          "format": "path",
          "description": "Index file.\n",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "fasta": {
          "type": "string",
          "format": "path",
          "description": "Reference file the CRAM was created with.\n",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "coverage": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "description": "Coverage distribution min;max;step",
          "help_text": "Type: `integer`, multiple: `True`, example: `[1;1000;1]`. "
        },
        "remove_dups": {
          "type": "boolean",
          "description": "Exclude from statistics reads marked as duplicates.\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "customized_index_file": {
          "type": "boolean",
          "description": "Use a customized index file.\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "required_flag": {
          "type": "string",
          "description": "Required flag, 0 for unset",
          "help_text": "Type: `string`, multiple: `False`, example: `\"0\"`. "
        },
        "filtering_flag": {
          "type": "string",
          "description": "Filtering flag, 0 for unset",
          "help_text": "Type: `string`, multiple: `False`, example: `\"0\"`. "
        },
        "GC_depth": {
          "type": "number",
          "description": "The size of GC-depth bins (decreasing bin size increases memory requirement)",
          "help_text": "Type: `double`, multiple: `False`, example: `20000.0`. "
        },
        "insert_size": {
          "type": "integer",
          "description": "Maximum insert size",
          "help_text": "Type: `integer`, multiple: `False`, example: `8000`. "
        },
        "id": {
          "type": "string",
          "description": "Include only listed read group or sample name.\n",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "read_length": {
          "type": "integer",
          "description": "Include in the statistics only reads with the given read length",
          "help_text": "Type: `integer`, multiple: `False`, example: `-1`. "
        },
        "most_inserts": {
          "type": "number",
          "description": "Report only the main part of inserts",
          "help_text": "Type: `double`, multiple: `False`, example: `0.99`. "
        },
        "split_prefix": {
          "type": "string",
          "description": "Path or string prefix for filepaths output by --split (default is input filename).\n",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "trim_quality": {
          "type": "integer",
          "description": "The BWA trimming parameter",
          "help_text": "Type: `integer`, multiple: `False`, example: `0`. "
        },
        "ref_seq": {
          "type": "string",
          "format": "path",
          "description": "Reference sequence (required for GC-depth and mismatches-per-cycle calculation).\n",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "split": {
          "type": "string",
          "description": "Also write statistics to separate files split by tagged field.\n",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "target_regions": {
          "type": "string",
          "format": "path",
          "description": "Do stats in these regions only",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "sparse": {
          "type": "boolean",
          "description": "Suppress outputting IS rows where there are no insertions.\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "remove_overlaps": {
          "type": "boolean",
          "description": "Remove overlaps of paired-end reads from coverage and base count computations.\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "cov_threshold": {
          "type": "integer",
          "description": "Only bases with coverage above this value will be included in the target percentage computation",
          "help_text": "Type: `integer`, multiple: `False`, example: `0`. "
        },
        "input_fmt_option": {
          "type": "string",
          "description": "Specify a single input file format option in the form of OPTION or OPTION=VALUE.\n",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "reference": {
          "type": "string",
          "format": "path",
          "description": "Reference sequence FASTA FILE.\n",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        }
      }
    },
    "outputs": {
      "title": "Outputs",
      "type": "object",
      "description": "No description",
      "properties": {
        "output": {
          "type": "string",
          "format": "path",
          "description": "Output file.\n",
          "help_text": "Type: `file`, multiple: `False`, required, default: `\"$id.$key.output.txt\"`, direction: `output`, example: `\"out.txt\"`. ",
          "default": "$id.$key.output.txt"
        }
      }
    },
    "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/nextflow input-output arguments"
    }
  ]
}
