{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "rna_singlesample",
  "description": "Processing unimodal single-sample RNA transcriptomics data.",
  "type": "object",
  "$defs": {
    "input": {
      "title": "Input",
      "type": "object",
      "description": "No description",
      "properties": {
        "id": {
          "type": "string",
          "description": "ID of the sample.",
          "help_text": "Type: `string`, multiple: `False`, required, example: `\"foo\"`. "
        },
        "input": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "Path to the sample.",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`, example: `\"dataset.h5mu\"`. "
        },
        "layer": {
          "type": "string",
          "description": "Input layer to start from",
          "help_text": "Type: `string`, multiple: `False`. "
        }
      }
    },
    "output": {
      "title": "Output",
      "type": "object",
      "description": "No description",
      "properties": {
        "output": {
          "type": "string",
          "format": "path",
          "description": "Destination path to the output.",
          "help_text": "Type: `file`, multiple: `False`, required, default: `\"$id.$key.output.h5mu\"`, direction: `output`, example: `\"output.h5mu\"`. ",
          "default": "$id.$key.output.h5mu"
        }
      }
    },
    "filtering options": {
      "title": "Filtering options",
      "type": "object",
      "description": "No description",
      "properties": {
        "min_counts": {
          "type": "integer",
          "description": "Minimum number of counts captured per cell.",
          "help_text": "Type: `integer`, multiple: `False`, example: `200`. "
        },
        "max_counts": {
          "type": "integer",
          "description": "Maximum number of counts captured per cell.",
          "help_text": "Type: `integer`, multiple: `False`, example: `5000000`. "
        },
        "min_genes_per_cell": {
          "type": "integer",
          "description": "Minimum of non-zero values per cell.",
          "help_text": "Type: `integer`, multiple: `False`, example: `200`. "
        },
        "max_genes_per_cell": {
          "type": "integer",
          "description": "Maximum of non-zero values per cell.",
          "help_text": "Type: `integer`, multiple: `False`, example: `1500000`. "
        },
        "min_cells_per_gene": {
          "type": "integer",
          "description": "Minimum of non-zero values per gene.",
          "help_text": "Type: `integer`, multiple: `False`, example: `3`. "
        },
        "min_fraction_mito": {
          "type": "number",
          "description": "Minimum fraction of UMIs that are mitochondrial",
          "help_text": "Type: `double`, multiple: `False`, example: `0.0`. "
        },
        "max_fraction_mito": {
          "type": "number",
          "description": "Maximum fraction of UMIs that are mitochondrial",
          "help_text": "Type: `double`, multiple: `False`, example: `0.2`. "
        },
        "min_fraction_ribo": {
          "type": "number",
          "description": "Minimum fraction of UMIs that are ribosomal",
          "help_text": "Type: `double`, multiple: `False`, example: `0.0`. "
        },
        "max_fraction_ribo": {
          "type": "number",
          "description": "Maximum fraction of UMIs that are ribosomal",
          "help_text": "Type: `double`, multiple: `False`, example: `0.2`. "
        },
        "skip_scrublet_doublet_detection": {
          "type": "boolean",
          "description": "Skip the scrublet doublet detection step.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        }
      }
    },
    "mitochondrial & ribosomal gene detection": {
      "title": "Mitochondrial & Ribosomal Gene Detection",
      "type": "object",
      "description": "No description",
      "properties": {
        "var_gene_names": {
          "type": "string",
          "description": ".var column name to be used to detect mitochondrial/ribosomal genes instead of .var_names (default if not set).\nGene names matching with the regex value from --mitochondrial_gene_regex or --ribosomal_gene_regex will be \nidentified as mitochondrial or ribosomal genes, respectively",
          "help_text": "Type: `string`, multiple: `False`, example: `\"gene_symbol\"`. "
        },
        "var_name_mitochondrial_genes": {
          "type": "string",
          "description": "In which .var slot to store a boolean array corresponding the mitochondrial genes.\n",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "obs_name_mitochondrial_fraction": {
          "type": "string",
          "description": "When specified, write the fraction of counts originating from mitochondrial genes \n(based on --mitochondrial_gene_regex) to an .obs column with the specified name.\nRequires --var_name_mitochondrial_genes.\n",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "mitochondrial_gene_regex": {
          "type": "string",
          "description": "Regex string that identifies mitochondrial genes from --var_gene_names.\nBy default will detect human and mouse mitochondrial genes from a gene symbol.\n",
          "help_text": "Type: `string`, multiple: `False`, default: `\"^[mM][tT]-\"`. ",
          "default": "^[mM][tT]-"
        },
        "var_name_ribosomal_genes": {
          "type": "string",
          "description": "In which .var slot to store a boolean array corresponding the ribosomal genes.\n",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "obs_name_ribosomal_fraction": {
          "type": "string",
          "description": "When specified, write the fraction of counts originating from ribosomal genes \n(based on --ribosomal_gene_regex) to an .obs column with the specified name.\nRequires --var_name_ribosomal_genes.\n",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "ribosomal_gene_regex": {
          "type": "string",
          "description": "Regex string that identifies ribosomal genes from --var_gene_names.\nBy default will detect human and mouse ribosomal genes from a gene symbol.\n",
          "help_text": "Type: `string`, multiple: `False`, default: `\"^[Mm]?[Rr][Pp][LlSs]\"`. ",
          "default": "^[Mm]?[Rr][Pp][LlSs]"
        }
      }
    },
    "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/filtering options"
    },
    {
      "$ref": "#/$defs/mitochondrial & ribosomal gene detection"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
