{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "bwa_aln",
  "description": "BWA aln algorithm for aligning short sequence reads to a reference genome.",
  "type": "object",
  "$defs": {
    "input": {
      "title": "Input",
      "type": "object",
      "description": "No description",
      "properties": {
        "index": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "BWA index base name (prefix of .amb, .ann, .bwt, .pac, .sa files).",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`, example: `\"reference.fasta\"`. "
        },
        "reads": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "Input FASTQ file with reads to align.",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`, example: `\"reads.fastq\"`. "
        }
      }
    },
    "output": {
      "title": "Output",
      "type": "object",
      "description": "No description",
      "properties": {
        "output": {
          "type": "string",
          "format": "path",
          "description": "Output SAI file",
          "help_text": "Type: `file`, multiple: `False`, default: `\"$id.$key.output.sai\"`, direction: `output`, example: `\"output.sai\"`. ",
          "default": "$id.$key.output.sai"
        }
      }
    },
    "algorithm options": {
      "title": "Algorithm Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "max_diff": {
          "type": "string",
          "description": "Max #diff (int) or missing prob under 0.02 err rate (float)",
          "help_text": "Type: `string`, multiple: `False`, example: `\"0.04\"`. "
        },
        "max_gap_opens": {
          "type": "integer",
          "description": "Maximum number or fraction of gap opens",
          "help_text": "Type: `integer`, multiple: `False`, example: `1`. "
        },
        "max_gap_extensions": {
          "type": "integer",
          "description": "Maximum number of gap extensions, -1 for disabling long gaps",
          "help_text": "Type: `integer`, multiple: `False`, example: `-1`. "
        },
        "indel_end_skip": {
          "type": "integer",
          "description": "Do not put an indel within INT bp towards the ends",
          "help_text": "Type: `integer`, multiple: `False`, example: `5`. "
        },
        "max_long_deletion_extensions": {
          "type": "integer",
          "description": "Maximum occurrences for extending a long deletion",
          "help_text": "Type: `integer`, multiple: `False`, example: `10`. "
        },
        "seed_length": {
          "type": "integer",
          "description": "Seed length",
          "help_text": "Type: `integer`, multiple: `False`, example: `32`. "
        },
        "max_seed_diff": {
          "type": "integer",
          "description": "Maximum differences in the seed",
          "help_text": "Type: `integer`, multiple: `False`, example: `2`. "
        },
        "max_queue_entries": {
          "type": "integer",
          "description": "Maximum entries in the queue",
          "help_text": "Type: `integer`, multiple: `False`, example: `2000000`. "
        }
      }
    },
    "scoring options": {
      "title": "Scoring Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "mismatch_penalty": {
          "type": "integer",
          "description": "Mismatch penalty",
          "help_text": "Type: `integer`, multiple: `False`, example: `3`. "
        },
        "gap_open_penalty": {
          "type": "integer",
          "description": "Gap open penalty",
          "help_text": "Type: `integer`, multiple: `False`, example: `11`. "
        },
        "gap_extension_penalty": {
          "type": "integer",
          "description": "Gap extension penalty",
          "help_text": "Type: `integer`, multiple: `False`, example: `4`. "
        },
        "stop_search_threshold": {
          "type": "integer",
          "description": "Stop searching when there are >INT equally best hits",
          "help_text": "Type: `integer`, multiple: `False`, example: `30`. "
        },
        "quality_threshold": {
          "type": "integer",
          "description": "Quality threshold for read trimming down to 35bp",
          "help_text": "Type: `integer`, multiple: `False`, example: `0`. "
        }
      }
    },
    "input/output options": {
      "title": "Input/Output Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "barcode_length": {
          "type": "integer",
          "description": "Length of barcode.",
          "help_text": "Type: `integer`, multiple: `False`, example: `10`. "
        },
        "log_gap_penalty": {
          "type": "boolean",
          "description": "Log-scaled gap penalty for long deletions.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "non_iterative": {
          "type": "boolean",
          "description": "Non-iterative mode - search for all n-difference hits (slow).",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "illumina_13_format": {
          "type": "boolean",
          "description": "The input is in the Illumina 1.3+ FASTQ-like format.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "input_bam": {
          "type": "boolean",
          "description": "The input read file is in the BAM format.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "single_end_only": {
          "type": "boolean",
          "description": "Use single-end reads only (effective with -b).",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "use_first_read": {
          "type": "boolean",
          "description": "Use the 1st read in a pair (effective with -b).",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "use_second_read": {
          "type": "boolean",
          "description": "Use the 2nd read in a pair (effective with -b).",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "filter_casava": {
          "type": "boolean",
          "description": "Filter Casava-filtered sequences.",
          "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/input"
    },
    {
      "$ref": "#/$defs/output"
    },
    {
      "$ref": "#/$defs/algorithm options"
    },
    {
      "$ref": "#/$defs/scoring options"
    },
    {
      "$ref": "#/$defs/input/output options"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
