{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "umi_tools_extract",
  "description": "Flexible removal of UMI sequences from fastq reads.\nUMIs are removed and appended to the read name. Any other barcode, for example a library barcode,\nis left on the read. Can also filter reads by quality or against a whitelist.\n",
  "type": "object",
  "$defs": {
    "input": {
      "title": "Input",
      "type": "object",
      "description": "No description",
      "properties": {
        "input": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "File containing the input data.",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`, example: `\"sample.fastq\"`. "
        },
        "read2_in": {
          "type": "string",
          "format": "path",
          "description": "File containing the input data for the R2 reads (if paired)",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`, example: `\"sample_R2.fastq\"`. "
        },
        "bc_pattern": {
          "type": "string",
          "description": "The UMI barcode pattern to use e.g",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "bc_pattern2": {
          "type": "string",
          "description": "The UMI barcode pattern to use for read 2.",
          "help_text": "Type: `string`, multiple: `False`. "
        }
      }
    },
    "output": {
      "title": "Output",
      "type": "object",
      "description": "No description",
      "properties": {
        "output": {
          "type": "string",
          "format": "path",
          "description": "Output file for read 1.",
          "help_text": "Type: `file`, multiple: `False`, required, default: `\"$id.$key.output\"`, direction: `output`. ",
          "default": "$id.$key.output"
        },
        "read2_out": {
          "type": "string",
          "format": "path",
          "description": "Output file for read 2.",
          "help_text": "Type: `file`, multiple: `False`, default: `\"$id.$key.read2_out\"`, direction: `output`. ",
          "default": "$id.$key.read2_out"
        },
        "filtered_out": {
          "type": "string",
          "format": "path",
          "description": "Write out reads not matching regex pattern or cell barcode whitelist to this file.\n",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "filtered_out2": {
          "type": "string",
          "format": "path",
          "description": "Write out read pairs not matching regex pattern or cell barcode whitelist to this file.\n",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        }
      }
    },
    "extract options": {
      "title": "Extract Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "extract_method": {
          "type": "string",
          "description": "UMI pattern to use",
          "help_text": "Type: `string`, multiple: `False`, example: `\"string\"`, choices: ``string`, `regex``. ",
          "enum": [
            "string",
            "regex"
          ]
        },
        "error_correct_cell": {
          "type": "boolean",
          "description": "Error correct cell barcodes to the whitelist.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "whitelist": {
          "type": "string",
          "format": "path",
          "description": "Whitelist of accepted cell barcodes tab-separated format, where column 1 is the whitelisted\ncell barcodes and column 2 is the list (comma-separated) of other cell barcodes which should \nbe corrected to the barcode in column 1",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "blacklist": {
          "type": "string",
          "format": "path",
          "description": "BlackWhitelist of cell barcodes to discard.",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "subset_reads": {
          "type": "integer",
          "description": "Only parse the first N reads.",
          "help_text": "Type: `integer`, multiple: `False`. "
        },
        "quality_filter_threshold": {
          "type": "integer",
          "description": "Remove reads where any UMI base quality score falls below this threshold.",
          "help_text": "Type: `integer`, multiple: `False`. "
        },
        "quality_filter_mask": {
          "type": "string",
          "description": "If a UMI base has a quality below this threshold, replace the base with 'N'.\n",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "quality_encoding": {
          "type": "string",
          "description": "Quality score encoding",
          "help_text": "Type: `string`, multiple: `False`, choices: ``phred33`, `phred64`, `solexa``. ",
          "enum": [
            "phred33",
            "phred64",
            "solexa"
          ]
        },
        "reconcile_pairs": {
          "type": "boolean",
          "description": "Allow read 2 infile to contain reads not in read 1 infile",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "three_prime": {
          "type": "boolean",
          "description": "By default the barcode is assumed to be on the 5' end of the read, but use this option to sepecify that it is\non the 3' end instead",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "ignore_read_pair_suffixes": {
          "type": "boolean",
          "description": "Ignore \"/1\" and \"/2\" read name suffixes",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "umi_separator": {
          "type": "string",
          "description": "The character that separates the UMI in the read name",
          "help_text": "Type: `string`, multiple: `False`, example: `\"_\"`. "
        },
        "grouping_method": {
          "type": "string",
          "description": "Method to use to determine read groups by subsuming those with similar UMIs",
          "help_text": "Type: `string`, multiple: `False`, example: `\"directional\"`, choices: ``unique`, `percentile`, `cluster`, `adjacency`, `directional``. ",
          "enum": [
            "unique",
            "percentile",
            "cluster",
            "adjacency",
            "directional"
          ]
        }
      }
    },
    "common options": {
      "title": "Common Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "log": {
          "type": "string",
          "format": "path",
          "description": "File with logging information.",
          "help_text": "Type: `file`, multiple: `False`, default: `\"$id.$key.log\"`, direction: `output`. ",
          "default": "$id.$key.log"
        },
        "log2stderr": {
          "type": "boolean",
          "description": "Send logging information to stderr.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "verbose": {
          "type": "integer",
          "description": "Log level",
          "help_text": "Type: `integer`, multiple: `False`. "
        },
        "error": {
          "type": "string",
          "format": "path",
          "description": "File with error information.",
          "help_text": "Type: `file`, multiple: `False`, default: `\"$id.$key.error\"`, direction: `output`. ",
          "default": "$id.$key.error"
        },
        "temp_dir": {
          "type": "string",
          "description": "Directory for temporary files",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "compresslevel": {
          "type": "integer",
          "description": "Level of Gzip compression to use",
          "help_text": "Type: `integer`, multiple: `False`, example: `6`. "
        },
        "timeit": {
          "type": "string",
          "format": "path",
          "description": "Store timing information in file.",
          "help_text": "Type: `file`, multiple: `False`, default: `\"$id.$key.timeit\"`, direction: `output`. ",
          "default": "$id.$key.timeit"
        },
        "timeit_name": {
          "type": "string",
          "description": "Name in timing file for this class of jobs.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"all\"`. ",
          "default": "all"
        },
        "timeit_header": {
          "type": "boolean",
          "description": "Add header for timing information.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "random_seed": {
          "type": "integer",
          "description": "Random seed to initialize number generator with.",
          "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/input"
    },
    {
      "$ref": "#/$defs/output"
    },
    {
      "$ref": "#/$defs/extract options"
    },
    {
      "$ref": "#/$defs/common options"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
