{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "runner",
  "description": "Runner for HT RNA-seq pipeline",
  "type": "object",
  "$defs": {
    "input arguments": {
      "title": "Input arguments",
      "type": "object",
      "description": "No description",
      "properties": {
        "input": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "Base directory of the form `s3:/<bucket>/Sequencing/<Sequencer>/<RunID>/<demultiplex_dir>`.\nMust contains FASTQ files in the format `PoolName_S*_L*_R1_001.fastq.gz` where\n  * PoolName is a unique ID for the microwell plates or combination thereof.\n  * S followed by a running number: the sample number based on the order\n    that samples are listed in the sample sheet (that was used to demultiplex the pools)\n    starting with 1 (e.g",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`. "
        },
        "run_id": {
          "type": "string",
          "description": "Unique ID for the sequencing run\n",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "barcodesFasta": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`. "
        },
        "genomeDir": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`. "
        },
        "annotation": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`. "
        },
        "pools": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Filter the FASTQ files in the input directory to only include pools from the provided list.\nPool names are inferred from the FASTQ file names (see input argument for more information).\nBy default all pools are included.\n",
          "help_text": "Type: `string`, multiple: `True`. "
        },
        "umi_length": {
          "type": "integer",
          "description": "Length of the UMI sequences\n",
          "help_text": "Type: `integer`, multiple: `False`, default: `10`. ",
          "default": 10
        }
      }
    },
    "metadata arguments": {
      "title": "Metadata arguments",
      "type": "object",
      "description": "No description",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier for the run",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "project_id": {
          "type": "string",
          "description": "Project ID",
          "help_text": "Type: `string`, multiple: `False`, required. "
        },
        "experiment_id": {
          "type": "string",
          "description": "Experiment ID",
          "help_text": "Type: `string`, multiple: `False`, required. "
        }
      }
    },
    "publish arguments": {
      "title": "Publish arguments",
      "type": "object",
      "description": "No description",
      "properties": {
        "fastq_publish_dir": {
          "type": "string",
          "description": "",
          "help_text": "Type: `string`, multiple: `False`, required. "
        },
        "results_publish_dir": {
          "type": "string",
          "description": "",
          "help_text": "Type: `string`, multiple: `False`, required. "
        }
      }
    },
    "output arguments": {
      "title": "Output arguments",
      "type": "object",
      "description": "Parameters that determine the structure of the output. These parameters are provided for internal use only\nand their defaults should not be overwritten.\n",
      "properties": {
        "run_params": {
          "type": "string",
          "format": "path",
          "description": "",
          "help_text": "Type: `file`, multiple: `False`, default: `\"params.yaml\"`, direction: `output`. ",
          "default": "params.yaml"
        },
        "star_output_dir": {
          "type": "string",
          "format": "path",
          "description": "",
          "help_text": "Type: `file`, multiple: `False`, default: `\"star_output\"`, direction: `output`. ",
          "default": "star_output"
        },
        "nrReadsNrGenesPerChrom_dir": {
          "type": "string",
          "format": "path",
          "description": "",
          "help_text": "Type: `file`, multiple: `False`, default: `\"nrReadsNrGenesPerChrom\"`, direction: `output`. ",
          "default": "nrReadsNrGenesPerChrom"
        },
        "star_qc_metrics_dir": {
          "type": "string",
          "format": "path",
          "description": "",
          "help_text": "Type: `file`, multiple: `False`, default: `\"starLogs\"`, direction: `output`. ",
          "default": "starLogs"
        },
        "eset_dir": {
          "type": "string",
          "format": "path",
          "description": "",
          "help_text": "Type: `file`, multiple: `False`, default: `\"esets\"`, direction: `output`. ",
          "default": "esets"
        },
        "f_data_dir": {
          "type": "string",
          "format": "path",
          "description": "",
          "help_text": "Type: `file`, multiple: `False`, default: `\"fData\"`, direction: `output`. ",
          "default": "fData"
        },
        "p_data_dir": {
          "type": "string",
          "format": "path",
          "description": "",
          "help_text": "Type: `file`, multiple: `False`, default: `\"pData\"`, direction: `output`. ",
          "default": "pData"
        }
      }
    },
    "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 arguments"
    },
    {
      "$ref": "#/$defs/metadata arguments"
    },
    {
      "$ref": "#/$defs/publish arguments"
    },
    {
      "$ref": "#/$defs/output arguments"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
