{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "rna_multisample",
  "description": "Processing unimodal multi-sample RNA transcriptomics data.",
  "type": "object",
  "$defs": {
    "inputs": {
      "title": "Inputs",
      "type": "object",
      "description": "No description",
      "properties": {
        "id": {
          "type": "string",
          "description": "ID of the concatenated file",
          "help_text": "Type: `string`, multiple: `False`, required, example: `\"concatenated\"`. "
        },
        "input": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "Path to the samples.",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`, example: `\"dataset.h5mu\"`. "
        },
        "modality": {
          "type": "string",
          "description": "Modality to process.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"rna\"`. ",
          "default": "rna"
        },
        "layer": {
          "type": "string",
          "description": "Input layer to use",
          "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 highly variable features": {
      "title": "Filtering highly variable features",
      "type": "object",
      "description": "No description",
      "properties": {
        "highly_variable_features_var_output": {
          "type": "string",
          "description": "In which .var slot to store a boolean array corresponding to the highly variable features.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"filter_with_hvg\"`. ",
          "default": "filter_with_hvg"
        },
        "highly_variable_features_obs_batch_key": {
          "type": "string",
          "description": "If specified, highly-variable features are selected within each batch separately and merged",
          "help_text": "Type: `string`, multiple: `False`, default: `\"sample_id\"`. ",
          "default": "sample_id"
        },
        "highly_variable_features_flavor": {
          "type": "string",
          "description": "Choose the flavor for identifying highly variable features",
          "help_text": "Type: `string`, multiple: `False`, default: `\"seurat\"`, choices: ``seurat`, `cell_ranger`, `seurat_v3``. ",
          "enum": [
            "seurat",
            "cell_ranger",
            "seurat_v3"
          ],
          "default": "seurat"
        },
        "highly_variable_features_n_top_features": {
          "type": "integer",
          "description": "Number of highly-variable features to keep",
          "help_text": "Type: `integer`, multiple: `False`. "
        }
      }
    },
    "qc metrics calculation options": {
      "title": "QC metrics calculation options",
      "type": "object",
      "description": "No description",
      "properties": {
        "var_qc_metrics": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Keys to select a boolean (containing only True or False) column from .var.\nFor each cell, calculate the proportion of total values for genes which are labeled 'True', \ncompared to the total sum of the values for all genes.\n",
          "help_text": "Type: `string`, multiple: `True`, default: `[\"filter_with_hvg\"]`, example: `[\"ercc,highly_variable\"]`. ",
          "default": [
            "filter_with_hvg"
          ]
        },
        "top_n_vars": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "description": "Number of top vars to be used to calculate cumulative proportions.\nIf not specified, proportions are not calculated",
          "help_text": "Type: `integer`, multiple: `True`, default: `[50,100,200,500]`. ",
          "default": [
            50,
            100,
            200,
            500
          ]
        },
        "output_obs_num_nonzero_vars": {
          "type": "string",
          "description": "Name of column in .obs describing, for each observation, the number of stored values\n(including explicit zeroes)",
          "help_text": "Type: `string`, multiple: `False`, default: `\"num_nonzero_vars\"`. ",
          "default": "num_nonzero_vars"
        },
        "output_obs_total_counts_vars": {
          "type": "string",
          "description": "Name of the column for .obs describing, for each observation (row),\nthe sum of the stored values in the columns.\n",
          "help_text": "Type: `string`, multiple: `False`, default: `\"total_counts\"`. ",
          "default": "total_counts"
        },
        "output_var_num_nonzero_obs": {
          "type": "string",
          "description": "Name of column describing, for each feature, the number of stored values\n(including explicit zeroes)",
          "help_text": "Type: `string`, multiple: `False`, default: `\"num_nonzero_obs\"`. ",
          "default": "num_nonzero_obs"
        },
        "output_var_total_counts_obs": {
          "type": "string",
          "description": "Name of the column in .var describing, for each feature (column),\nthe sum of the stored values in the rows.\n",
          "help_text": "Type: `string`, multiple: `False`, default: `\"total_counts\"`. ",
          "default": "total_counts"
        },
        "output_var_obs_mean": {
          "type": "string",
          "description": "Name of the column in .obs providing the mean of the values in each row.\n",
          "help_text": "Type: `string`, multiple: `False`, default: `\"obs_mean\"`. ",
          "default": "obs_mean"
        },
        "output_var_pct_dropout": {
          "type": "string",
          "description": "Name of the column in .obs providing for each feature the percentage of\nobservations the feature does not appear on (i.e",
          "help_text": "Type: `string`, multiple: `False`, default: `\"pct_dropout\"`. ",
          "default": "pct_dropout"
        }
      }
    },
    "rna scaling options": {
      "title": "RNA Scaling options",
      "type": "object",
      "description": "Options for enabling scaling of the log-normalized data to unit variance and zero mean.\nThe scaled data will be output a different layer and representation with reduced dimensions\nwill be created and stored in addition to the non-scaled data.\n",
      "properties": {
        "enable_scaling": {
          "type": "boolean",
          "description": "Enable scaling for the RNA modality.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "scaling_output_layer": {
          "type": "string",
          "description": "Output layer where the scaled log-normalized data will be stored.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"scaled\"`. ",
          "default": "scaled"
        },
        "scaling_max_value": {
          "type": "number",
          "description": "Clip (truncate) data to this value after scaling",
          "help_text": "Type: `double`, multiple: `False`. "
        },
        "scaling_zero_center": {
          "type": "boolean",
          "description": "If set, omit zero-centering variables, which allows to handle sparse input efficiently.\"",
          "help_text": "Type: `boolean_false`, 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/output"
    },
    {
      "$ref": "#/$defs/filtering highly variable features"
    },
    {
      "$ref": "#/$defs/qc metrics calculation options"
    },
    {
      "$ref": "#/$defs/rna scaling options"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
