{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "cellranger_mapping",
  "description": "A pipeline for running Cell Ranger mapping.",
  "type": "object",
  "$defs": {
    "inputs": {
      "title": "Inputs",
      "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": "array",
          "items": {
            "type": "string"
          },
          "format": "path",
          "exists": true,
          "description": "The fastq.gz files to align",
          "help_text": "Type: `file`, multiple: `True`, required, direction: `input`, example: `[\"sample_S1_L001_R1_001.fastq.gz\";\"sample_S1_L001_R2_001.fastq.gz\"]`. "
        },
        "reference": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "The path to Cell Ranger reference tar.gz file.",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`, example: `\"reference.tar.gz\"`. "
        }
      }
    },
    "outputs": {
      "title": "Outputs",
      "type": "object",
      "description": "No description",
      "properties": {
        "output_raw": {
          "type": "string",
          "format": "path",
          "description": "Location where the output folder from Cell Ranger will be stored.",
          "help_text": "Type: `file`, multiple: `False`, required, default: `\"$id.$key.output_raw\"`, direction: `output`, example: `\"output_dir\"`. ",
          "default": "$id.$key.output_raw"
        },
        "output_h5mu": {
          "type": "string",
          "format": "path",
          "description": "The output from Cell Ranger, converted to h5mu.",
          "help_text": "Type: `file`, multiple: `False`, required, default: `\"$id.$key.output_h5mu.h5mu\"`, direction: `output`, example: `\"output.h5mu\"`. ",
          "default": "$id.$key.output_h5mu.h5mu"
        },
        "uns_metrics": {
          "type": "string",
          "description": "Name of the .uns slot under which to QC metrics (if any).",
          "help_text": "Type: `string`, multiple: `False`, default: `\"metrics_summary\"`. ",
          "default": "metrics_summary"
        },
        "output_type": {
          "type": "string",
          "description": "Which Cell Ranger output to use for converting to h5mu.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"raw\"`, choices: ``raw`, `filtered``. ",
          "enum": [
            "raw",
            "filtered"
          ],
          "default": "raw"
        }
      }
    },
    "cell ranger arguments": {
      "title": "Cell Ranger arguments",
      "type": "object",
      "description": "No description",
      "properties": {
        "expect_cells": {
          "type": "integer",
          "description": "Expected number of recovered cells, used as input to cell calling algorithm.",
          "help_text": "Type: `integer`, multiple: `False`, example: `3000`. "
        },
        "chemistry": {
          "type": "string",
          "description": "Assay configuration.\n- auto: autodetect mode\n- threeprime: Single Cell 3'\n- fiveprime: Single Cell 5'\n- SC3Pv1: Single Cell 3' v1\n- SC3Pv2: Single Cell 3' v2\n- SC3Pv3: Single Cell 3' v3\n- SC3Pv3LT: Single Cell 3' v3 LT\n- SC3Pv3HT: Single Cell 3' v3 HT\n- SC5P-PE: Single Cell 5' paired-end\n- SC5P-R2: Single Cell 5' R2-only\n- SC-FB: Single Cell Antibody-only 3' v2 or 5'\nSee https://kb.10xgenomics.com/hc/en-us/articles/115003764132-How-does-Cell-Ranger-auto-detect-chemistry- for more information.\n",
          "help_text": "Type: `string`, multiple: `False`, default: `\"auto\"`, choices: ``auto`, `threeprime`, `fiveprime`, `SC3Pv1`, `SC3Pv2`, `SC3Pv3`, `SC3Pv3LT`, `SC3Pv3HT`, `SC5P-PE`, `SC5P-R2`, `SC-FB``. ",
          "enum": [
            "auto",
            "threeprime",
            "fiveprime",
            "SC3Pv1",
            "SC3Pv2",
            "SC3Pv3",
            "SC3Pv3LT",
            "SC3Pv3HT",
            "SC5P-PE",
            "SC5P-R2",
            "SC-FB"
          ],
          "default": "auto"
        },
        "secondary_analysis": {
          "type": "boolean",
          "description": "Whether or not to run the secondary analysis e.g",
          "help_text": "Type: `boolean`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "generate_bam": {
          "type": "boolean",
          "description": "Whether to generate a BAM file.",
          "help_text": "Type: `boolean`, multiple: `False`, default: `true`. ",
          "default": true
        },
        "include_introns": {
          "type": "boolean",
          "description": "Include intronic reads in count (default=true unless --target-panel is specified in which case default=false)",
          "help_text": "Type: `boolean`, multiple: `False`, default: `true`. ",
          "default": true
        }
      }
    },
    "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/cell ranger arguments"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
