{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "bwa_sampe",
  "description": "BWA sampe - generate paired-end alignment in SAM format from BWA aln SAI files.",
  "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\"`. "
        },
        "sai1": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "Input SAI file for first reads (R1) generated by BWA aln.",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`, example: `\"reads1.sai\"`. "
        },
        "sai2": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "Input SAI file for second reads (R2) generated by BWA aln.",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`, example: `\"reads2.sai\"`. "
        },
        "reads1": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "Input FASTQ file with first reads in pair (R1).",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`, example: `\"reads_R1.fastq\"`. "
        },
        "reads2": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "Input FASTQ file with second reads in pair (R2).",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`, example: `\"reads_R2.fastq\"`. "
        }
      }
    },
    "output": {
      "title": "Output",
      "type": "object",
      "description": "No description",
      "properties": {
        "output": {
          "type": "string",
          "format": "path",
          "description": "Output SAM file",
          "help_text": "Type: `file`, multiple: `False`, default: `\"$id.$key.output.sam\"`, direction: `output`, example: `\"output.sam\"`. ",
          "default": "$id.$key.output.sam"
        }
      }
    },
    "pairing options": {
      "title": "Pairing Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "max_insert_size": {
          "type": "integer",
          "description": "Maximum insert size",
          "help_text": "Type: `integer`, multiple: `False`, example: `500`. "
        },
        "max_occ_one_end": {
          "type": "integer",
          "description": "Maximum occurrences for one end",
          "help_text": "Type: `integer`, multiple: `False`, example: `100000`. "
        },
        "max_hits_paired": {
          "type": "integer",
          "description": "Maximum hits to output for paired reads",
          "help_text": "Type: `integer`, multiple: `False`, example: `3`. "
        },
        "max_hits_discordant": {
          "type": "integer",
          "description": "Maximum hits to output for discordant pairs",
          "help_text": "Type: `integer`, multiple: `False`, example: `10`. "
        },
        "chimeric_rate": {
          "type": "number",
          "description": "Prior of chimeric rate (lower bound)",
          "help_text": "Type: `double`, multiple: `False`, example: `1.0E-5`. "
        }
      }
    },
    "algorithm options": {
      "title": "Algorithm Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "read_group": {
          "type": "string",
          "description": "Read group header line such as '@RG\\tID:foo\\tSM:bar'.",
          "help_text": "Type: `string`, multiple: `False`, example: `\"@RG\\tID:sample1\\tSM:sample1\"`. "
        },
        "preload_index": {
          "type": "boolean",
          "description": "Preload index into memory (for base-space reads only).",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "disable_smith_waterman": {
          "type": "boolean",
          "description": "Disable Smith-Waterman for the unmapped mate.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "disable_insert_size_estimate": {
          "type": "boolean",
          "description": "Disable insert size estimate (force -s).",
          "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/pairing options"
    },
    {
      "$ref": "#/$defs/algorithm options"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
