{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "process_samples",
  "description": "A pipeline to analyse multiple multiomics samples.",
  "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": "string",
          "format": "path",
          "exists": true,
          "description": "Path to the sample.",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`, example: `\"input.h5mu\"`. "
        },
        "rna_layer": {
          "type": "string",
          "description": "Input layer for the gene expression modality",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "prot_layer": {
          "type": "string",
          "description": "Input layer for the antibody capture modality",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "gdo_layer": {
          "type": "string",
          "description": "Input layer for the guide-derived oligonucleotide (GDO) data",
          "help_text": "Type: `string`, multiple: `False`. "
        }
      }
    },
    "outputs": {
      "title": "Outputs",
      "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"
        }
      }
    },
    "sample id options": {
      "title": "Sample ID options",
      "type": "object",
      "description": "Options for adding the id to .obs on the MuData object. Having a sample \nid present in a requirement of several components for this pipeline.\n",
      "properties": {
        "add_id_to_obs": {
          "type": "boolean",
          "description": "Add the value passed with --id to .obs.",
          "help_text": "Type: `boolean`, multiple: `False`, default: `true`. ",
          "default": true
        },
        "add_id_obs_output": {
          "type": "string",
          "description": ".Obs column to add the sample IDs to",
          "help_text": "Type: `string`, multiple: `False`, default: `\"sample_id\"`. ",
          "default": "sample_id"
        },
        "add_id_make_observation_keys_unique": {
          "type": "boolean",
          "description": "Join the id to the .obs index (.obs_names)",
          "help_text": "Type: `boolean`, multiple: `False`, default: `true`. ",
          "default": true
        }
      }
    },
    "rna filtering options": {
      "title": "RNA filtering options",
      "type": "object",
      "description": "No description",
      "properties": {
        "rna_min_counts": {
          "type": "integer",
          "description": "Minimum number of counts captured per cell.",
          "help_text": "Type: `integer`, multiple: `False`, example: `200`. "
        },
        "rna_max_counts": {
          "type": "integer",
          "description": "Maximum number of counts captured per cell.",
          "help_text": "Type: `integer`, multiple: `False`, example: `5000000`. "
        },
        "rna_min_genes_per_cell": {
          "type": "integer",
          "description": "Minimum of non-zero values per cell.",
          "help_text": "Type: `integer`, multiple: `False`, example: `200`. "
        },
        "rna_max_genes_per_cell": {
          "type": "integer",
          "description": "Maximum of non-zero values per cell.",
          "help_text": "Type: `integer`, multiple: `False`, example: `1500000`. "
        },
        "rna_min_cells_per_gene": {
          "type": "integer",
          "description": "Minimum of non-zero values per gene.",
          "help_text": "Type: `integer`, multiple: `False`, example: `3`. "
        },
        "rna_min_fraction_mito": {
          "type": "number",
          "description": "Minimum fraction of UMIs that are mitochondrial.",
          "help_text": "Type: `double`, multiple: `False`, example: `0.0`. "
        },
        "rna_max_fraction_mito": {
          "type": "number",
          "description": "Maximum fraction of UMIs that are mitochondrial.",
          "help_text": "Type: `double`, multiple: `False`, example: `0.2`. "
        },
        "rna_min_fraction_ribo": {
          "type": "number",
          "description": "Minimum fraction of UMIs that are mitochondrial.",
          "help_text": "Type: `double`, multiple: `False`, example: `0.0`. "
        },
        "rna_max_fraction_ribo": {
          "type": "number",
          "description": "Maximum fraction of UMIs that are mitochondrial.",
          "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
        }
      }
    },
    "cite-seq filtering options": {
      "title": "CITE-seq filtering options",
      "type": "object",
      "description": "No description",
      "properties": {
        "prot_min_counts": {
          "type": "integer",
          "description": "Minimum number of counts per cell.",
          "help_text": "Type: `integer`, multiple: `False`, example: `3`. "
        },
        "prot_max_counts": {
          "type": "integer",
          "description": "Minimum number of counts per cell.",
          "help_text": "Type: `integer`, multiple: `False`, example: `5000000`. "
        },
        "prot_min_proteins_per_cell": {
          "type": "integer",
          "description": "Minimum of non-zero values per cell.",
          "help_text": "Type: `integer`, multiple: `False`, example: `200`. "
        },
        "prot_max_proteins_per_cell": {
          "type": "integer",
          "description": "Maximum of non-zero values per cell.",
          "help_text": "Type: `integer`, multiple: `False`, example: `100000000`. "
        },
        "prot_min_cells_per_protein": {
          "type": "integer",
          "description": "Minimum of non-zero values per protein.",
          "help_text": "Type: `integer`, multiple: `False`, example: `3`. "
        }
      }
    },
    "gdo filtering options": {
      "title": "GDO filtering options",
      "type": "object",
      "description": "No description",
      "properties": {
        "gdo_min_counts": {
          "type": "integer",
          "description": "Minimum number of counts per cell.",
          "help_text": "Type: `integer`, multiple: `False`, example: `3`. "
        },
        "gdo_max_counts": {
          "type": "integer",
          "description": "Minimum number of counts per cell.",
          "help_text": "Type: `integer`, multiple: `False`, example: `5000000`. "
        },
        "gdo_min_guides_per_cell": {
          "type": "integer",
          "description": "Minimum of non-zero values per cell.",
          "help_text": "Type: `integer`, multiple: `False`, example: `200`. "
        },
        "gdo_max_guides_per_cell": {
          "type": "integer",
          "description": "Maximum of non-zero values per cell.",
          "help_text": "Type: `integer`, multiple: `False`, example: `100000000`. "
        },
        "gdo_min_cells_per_guide": {
          "type": "integer",
          "description": "Minimum of non-zero values per guide.",
          "help_text": "Type: `integer`, multiple: `False`, example: `3`. "
        }
      }
    },
    "highly variable features detection": {
      "title": "Highly variable features detection",
      "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 genes.",
          "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 genes are selected within each batch separately and merged",
          "help_text": "Type: `string`, multiple: `False`, default: `\"sample_id\"`. ",
          "default": "sample_id"
        }
      }
    },
    "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]"
        }
      }
    },
    "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",
          "help_text": "Type: `string`, multiple: `True`, example: `[\"ercc,highly_variable\"]`. "
        },
        "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
          ]
        }
      }
    },
    "pca options": {
      "title": "PCA options",
      "type": "object",
      "description": "No description",
      "properties": {
        "pca_overwrite": {
          "type": "boolean",
          "description": "Allow overwriting slots for PCA output.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        }
      }
    },
    "clr options": {
      "title": "CLR options",
      "type": "object",
      "description": "No description",
      "properties": {
        "clr_axis": {
          "type": "integer",
          "description": "Axis to perform the CLR transformation on.",
          "help_text": "Type: `integer`, multiple: `False`, default: `0`. ",
          "default": 0
        }
      }
    },
    "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": {
        "rna_enable_scaling": {
          "type": "boolean",
          "description": "Enable scaling for the RNA modality.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "rna_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"
        },
        "rna_scaling_pca_obsm_output": {
          "type": "string",
          "description": "Name of the .obsm key where the PCA representation of the log-normalized\nand scaled data is stored.\n",
          "help_text": "Type: `string`, multiple: `False`, default: `\"scaled_pca\"`. ",
          "default": "scaled_pca"
        },
        "rna_scaling_pca_loadings_varm_output": {
          "type": "string",
          "description": "Name of the .varm key where the PCA loadings of the log-normalized and scaled\ndata is stored.\n",
          "help_text": "Type: `string`, multiple: `False`, default: `\"scaled_pca_loadings\"`. ",
          "default": "scaled_pca_loadings"
        },
        "rna_scaling_pca_variance_uns_output": {
          "type": "string",
          "description": "Name of the .uns key where the variance and variance ratio will be stored as a map.\nThe map will contain two keys: variance and variance_ratio respectively.\n",
          "help_text": "Type: `string`, multiple: `False`, default: `\"scaled_pca_variance\"`. ",
          "default": "scaled_pca_variance"
        },
        "rna_scaling_umap_obsm_output": {
          "type": "string",
          "description": "Name of the .obsm key where the UMAP representation of the log-normalized and scaled data is stored.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"scaled_umap\"`. ",
          "default": "scaled_umap"
        },
        "rna_scaling_max_value": {
          "type": "number",
          "description": "Clip (truncate) data to this value after scaling",
          "help_text": "Type: `double`, multiple: `False`. "
        },
        "rna_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/outputs"
    },
    {
      "$ref": "#/$defs/sample id options"
    },
    {
      "$ref": "#/$defs/rna filtering options"
    },
    {
      "$ref": "#/$defs/cite-seq filtering options"
    },
    {
      "$ref": "#/$defs/gdo filtering options"
    },
    {
      "$ref": "#/$defs/highly variable features detection"
    },
    {
      "$ref": "#/$defs/mitochondrial & ribosomal gene detection"
    },
    {
      "$ref": "#/$defs/qc metrics calculation options"
    },
    {
      "$ref": "#/$defs/pca options"
    },
    {
      "$ref": "#/$defs/clr options"
    },
    {
      "$ref": "#/$defs/rna scaling options"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
