{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "sortmerna",
  "description": "Local sequence alignment tool for filtering, mapping and clustering. The main \napplication of SortMeRNA is filtering rRNA from metatranscriptomic data.\n",
  "type": "object",
  "$defs": {
    "input": {
      "title": "Input",
      "type": "object",
      "description": "No description",
      "properties": {
        "paired": {
          "type": "boolean",
          "description": "Reads are paired-end",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "input": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "format": "path",
          "description": "Input fastq",
          "help_text": "Type: `file`, multiple: `True`, direction: `input`. "
        },
        "ref": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "format": "path",
          "description": "Reference fasta file(s) for rRNA database.",
          "help_text": "Type: `file`, multiple: `True`, direction: `input`. "
        },
        "ribo_database_manifest": {
          "type": "string",
          "format": "path",
          "description": "Text file containing paths to fasta files (one per line) that will be used to create the database for SortMeRNA.",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        }
      }
    },
    "output": {
      "title": "Output",
      "type": "object",
      "description": "No description",
      "properties": {
        "log": {
          "type": "string",
          "format": "path",
          "description": "Sortmerna log file.",
          "help_text": "Type: `file`, multiple: `False`, default: `\"$id.$key.log.log\"`, direction: `output`, example: `\"$id.sortmerna.log\"`. ",
          "default": "$id.$key.log.log"
        },
        "output": {
          "type": "string",
          "format": "path",
          "description": "Directory and file prefix for aligned output",
          "help_text": "Type: `file`, multiple: `False`, default: `\"$id.$key.output\"`, direction: `output`. ",
          "default": "$id.$key.output"
        },
        "other": {
          "type": "string",
          "format": "path",
          "description": "Create Non-aligned reads output file with this path/prefix",
          "help_text": "Type: `file`, multiple: `False`, default: `\"$id.$key.other\"`, direction: `output`. ",
          "default": "$id.$key.other"
        }
      }
    },
    "options": {
      "title": "Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "kvdb": {
          "type": "string",
          "description": "Path to directory of the key-value database file, used for storing the alignment results.",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "idx_dir": {
          "type": "string",
          "description": "Path to the directory for storing the reference index files.",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "readb": {
          "type": "string",
          "description": "Path to the directory for storing pre-processed reads.",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "fastx": {
          "type": "boolean",
          "description": "Output aligned reads into FASTA/FASTQ file",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "sam": {
          "type": "boolean",
          "description": "Output SAM alignment for aligned reads.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "sq": {
          "type": "boolean",
          "description": "Add SQ tags to the SAM file",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "blast": {
          "type": "string",
          "description": "Blast options:\n* '0'                    - pairwise\n* '1'                    - tabular(Blast - m 8 format)\n* '1 cigar'              - tabular + column for CIGAR\n* '1 cigar qcov'         - tabular + columns for CIGAR and query coverage\n* '1 cigar qcov qstrand' - tabular + columns for CIGAR, query coverage and strand\n",
          "help_text": "Type: `string`, multiple: `False`, choices: ``0`, `1`, `1 cigar`, `1 cigar qcov`, `1 cigar qcov qstrand``. ",
          "enum": [
            "0",
            "1",
            "1 cigar",
            "1 cigar qcov",
            "1 cigar qcov qstrand"
          ]
        },
        "num_alignments": {
          "type": "integer",
          "description": "Report first INT alignments per read reaching E-value",
          "help_text": "Type: `integer`, multiple: `False`, example: `0`. "
        },
        "min_lis": {
          "type": "integer",
          "description": "search all alignments having the first INT longest LIS",
          "help_text": "Type: `integer`, multiple: `False`, example: `2`. "
        },
        "print_all_reads": {
          "type": "boolean",
          "description": "output null alignment strings for non-aligned reads to SAM and/or BLAST tabular files.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "paired_in": {
          "type": "boolean",
          "description": "In the case where a pair of reads is aligned with a score above the threshold, the output of the reads is controlled\nby the following options:\n* --paired_in and --paired_out are both false: Only one read per pair is output to the aligned fasta file.\n* --paired_in is true and --paired_out is false: Both reads of the pair are output to the aligned fasta file.\n* --paired_in is false and --paired_out is true: Both reads are output the the other fasta file (if it is specified).\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "paired_out": {
          "type": "boolean",
          "description": "See description of --paired_in.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "out2": {
          "type": "boolean",
          "description": "Output paired reads into separate files",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "sout": {
          "type": "boolean",
          "description": "Separate paired and singleton aligned reads",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "zip_out": {
          "type": "string",
          "description": "Compress the output files",
          "help_text": "Type: `string`, multiple: `False`, example: `\"-1\"`, choices: ``1`, `true`, `t`, `yes`, `y`, `0`, `false`, `f`, `no`, `n`, `-1``. ",
          "enum": [
            "1",
            "true",
            "t",
            "yes",
            "y",
            "0",
            "false",
            "f",
            "no",
            "n",
            "-1"
          ]
        },
        "match": {
          "type": "integer",
          "description": "Smith-Waterman score for a match (positive integer)",
          "help_text": "Type: `integer`, multiple: `False`, example: `2`. "
        },
        "mismatch": {
          "type": "integer",
          "description": "Smith-Waterman penalty for a mismatch (negative integer)",
          "help_text": "Type: `integer`, multiple: `False`, example: `-3`. "
        },
        "gap_open": {
          "type": "integer",
          "description": "Smith-Waterman penalty for introducing a gap (positive integer)",
          "help_text": "Type: `integer`, multiple: `False`, example: `5`. "
        },
        "gap_ext": {
          "type": "integer",
          "description": "Smith-Waterman penalty for extending a gap (positive integer)",
          "help_text": "Type: `integer`, multiple: `False`, example: `2`. "
        },
        "N": {
          "type": "integer",
          "description": "Smith-Waterman penalty for ambiguous letters (N's) scored as --mismatch",
          "help_text": "Type: `integer`, multiple: `False`, example: `-1`. "
        },
        "a": {
          "type": "integer",
          "description": "Number of threads to use",
          "help_text": "Type: `integer`, multiple: `False`, example: `1`. "
        },
        "e": {
          "type": "number",
          "description": "E-value threshold",
          "help_text": "Type: `double`, multiple: `False`, example: `1.0`. "
        },
        "F": {
          "type": "boolean",
          "description": "Search only the forward strand.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "R": {
          "type": "boolean",
          "description": "Search only the reverse-complementary strand.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "num_alignment": {
          "type": "integer",
          "description": "Report first INT alignments per read reaching E-value (--num_alignments 0 signifies all alignments will be output).\nDefault: '-1'\n",
          "help_text": "Type: `integer`, multiple: `False`, example: `-1`. "
        },
        "best": {
          "type": "integer",
          "description": "Report INT best alignments per read reaching E-value by searching --min_lis INT candidate alignments (--best 0\nsignifies all candidate alignments will be searched) Default: '1'.\n",
          "help_text": "Type: `integer`, multiple: `False`, example: `1`. "
        },
        "verbose": {
          "type": "boolean",
          "description": "Verbose output.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        }
      }
    },
    "otu picking options": {
      "title": "OTU picking options",
      "type": "object",
      "description": "No description",
      "properties": {
        "id": {
          "type": "number",
          "description": "%id similarity threshold (the alignment must still pass the E-value threshold)",
          "help_text": "Type: `double`, multiple: `False`, example: `0.97`. "
        },
        "coverage": {
          "type": "number",
          "description": "%query coverage threshold (the alignment must still pass the E-value threshold)",
          "help_text": "Type: `double`, multiple: `False`, example: `0.97`. "
        },
        "de_novo": {
          "type": "boolean",
          "description": "FASTA/FASTQ file for reads matching database < %id off (set using --id) and < %cov (set using --coverage)\n(alignment must still pass the E-value threshold).\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "otu_map": {
          "type": "boolean",
          "description": "Output OTU map (input to QIIME's make_otu_table.py).\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        }
      }
    },
    "advanced options": {
      "title": "Advanced options",
      "type": "object",
      "description": "No description",
      "properties": {
        "num_seed": {
          "type": "integer",
          "description": "Number of seeds matched before searching for candidate LIS",
          "help_text": "Type: `integer`, multiple: `False`, example: `2`. "
        },
        "passes": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "description": "Three intervals at which to place the seed on the read L,L/2,3 (L is the seed length set in ./indexdb_rna).\n",
          "help_text": "Type: `integer`, multiple: `True`. "
        },
        "edge": {
          "type": "string",
          "description": "The number (or percentage if followed by %) of nucleotides to add to each edge of the alignment region on the\nreference sequence before performing Smith-Waterman alignment",
          "help_text": "Type: `string`, multiple: `False`, example: `\"4\"`. "
        },
        "full_search": {
          "type": "boolean",
          "description": "Search for all 0-error and 1-error seed off matches in the index rather than stopping after finding a 0-error match\n(<1% gain in sensitivity with up four-fold decrease in speed).\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        }
      }
    },
    "indexing options": {
      "title": "Indexing Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "index": {
          "type": "integer",
          "description": "Create index files for the reference database",
          "help_text": "Type: `integer`, multiple: `False`, example: `2`, choices: ``0`, `1`, `2``. ",
          "enum": [
            0,
            1,
            2
          ]
        },
        "-L": {
          "type": "number",
          "description": "Indexing seed length",
          "help_text": "Type: `double`, multiple: `False`, example: `18.0`. "
        },
        "interval": {
          "type": "integer",
          "description": "Index every Nth L-mer in the reference database",
          "help_text": "Type: `integer`, multiple: `False`, example: `1`. "
        },
        "max_pos": {
          "type": "integer",
          "description": "Maximum number of positions to store for each unique L-mer",
          "help_text": "Type: `integer`, multiple: `False`, example: `1000`. "
        }
      }
    },
    "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/options"
    },
    {
      "$ref": "#/$defs/otu picking options"
    },
    {
      "$ref": "#/$defs/advanced options"
    },
    {
      "$ref": "#/$defs/indexing options"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
