{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "samtools_collate",
  "description": "Shuffles and groups reads in SAM/BAM/CRAM files together by their names.",
  "type": "object",
  "$defs": {
    "inputs": {
      "title": "Inputs",
      "type": "object",
      "description": "No description",
      "properties": {
        "input": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "The input BAM file.",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`. "
        },
        "reference": {
          "type": "string",
          "format": "path",
          "description": "Reference sequence FASTA FILE.",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        }
      }
    },
    "outputs": {
      "title": "Outputs",
      "type": "object",
      "description": "No description",
      "properties": {
        "output": {
          "type": "string",
          "format": "path",
          "description": "The output filename.",
          "help_text": "Type: `file`, multiple: `False`, required, default: `\"$id.$key.output\"`, direction: `output`. ",
          "default": "$id.$key.output"
        }
      }
    },
    "options": {
      "title": "Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "uncompressed": {
          "type": "boolean",
          "description": "Output uncompressed BAM.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "fast": {
          "type": "boolean",
          "description": "Fast mode, only primary alignments.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "working_reads": {
          "type": "integer",
          "description": "Working reads stored (for use with -f).",
          "help_text": "Type: `integer`, multiple: `False`, default: `10000`. ",
          "default": 10000
        },
        "compression": {
          "type": "integer",
          "description": "Compression level.",
          "help_text": "Type: `integer`, multiple: `False`, default: `1`. ",
          "default": 1
        },
        "nb_tmp_files": {
          "type": "integer",
          "description": "Number of temporary files.",
          "help_text": "Type: `integer`, multiple: `False`, default: `64`. ",
          "default": 64
        },
        "tmp_prefix": {
          "type": "string",
          "description": "Write temporary files to PREFIX.nnnn.bam.",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "no_pg": {
          "type": "boolean",
          "description": "Do not add a PG line.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "input_fmt_option": {
          "type": "string",
          "description": "Specify a single input file format option in the form of OPTION or OPTION=VALUE.",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "output_fmt": {
          "type": "string",
          "description": "Specify output format (SAM, BAM, CRAM).",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "output_fmt_option": {
          "type": "string",
          "description": "Specify a single output file format option in the form of OPTION or OPTION=VALUE.",
          "help_text": "Type: `string`, 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"
    }
  ]
}
