{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "scvi_leiden",
  "description": "Run scvi integration followed by neighbour calculations, leiden clustering and run umap on the result.",
  "type": "object",
  "$defs": {
    "inputs": {
      "title": "Inputs",
      "type": "object",
      "description": "No description",
      "properties": {
        "input": {
          "type": "string",
          "format": "path",
          "description": "Path to the sample",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`, example: `\"dataset.h5mu\"`. "
        },
        "tiledb_input_uri": {
          "type": "string",
          "description": "A URI containing the TileDB-SOMA objects",
          "help_text": "Type: `string`, multiple: `False`, example: `\"s3://bucket/path\"`. "
        },
        "tiledb_s3_region": {
          "type": "string",
          "description": "Region where the TileDB-SOMA database is hosted.\n",
          "help_text": "Type: `string`, multiple: `False`, example: `\"us-west-2\"`. "
        },
        "tiledb_endpoint": {
          "type": "string",
          "description": "Custom endpoint to use to connect to S3\n",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "tiledb_s3_no_sign_request": {
          "type": "boolean",
          "description": "Do not sign S3 requests",
          "help_text": "Type: `boolean`, multiple: `False`, default: `false`. ",
          "default": 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"
        },
        "output_model": {
          "type": "string",
          "format": "path",
          "description": "Folder where the state of the trained model will be saved to.",
          "help_text": "Type: `file`, multiple: `False`, required, default: `\"$id.$key.output_model\"`, direction: `output`, example: `\"output_dir\"`. ",
          "default": "$id.$key.output_model"
        },
        "output_tiledb": {
          "type": "string",
          "format": "path",
          "description": "Output the TileDB database to the specified directory instead of adding it to the existing database.\n",
          "help_text": "Type: `file`, multiple: `False`, default: `\"$id.$key.output_tiledb\"`, direction: `output`. ",
          "default": "$id.$key.output_tiledb"
        }
      }
    },
    "input slots": {
      "title": "Input slots",
      "type": "object",
      "description": "No description",
      "properties": {
        "layer": {
          "type": "string",
          "description": "use specified layer for expression values instead of the .X object from the modality.",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "modality": {
          "type": "string",
          "description": "Which modality to process.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"rna\"`. ",
          "default": "rna"
        },
        "sanitize_ensembl_ids": {
          "type": "boolean",
          "description": "Whether to sanitize ensembl ids by removing version numbers.",
          "help_text": "Type: `boolean`, multiple: `False`, default: `true`. ",
          "default": true
        }
      }
    },
    "neighbour calculation": {
      "title": "Neighbour calculation",
      "type": "object",
      "description": "No description",
      "properties": {
        "uns_neighbors": {
          "type": "string",
          "description": "In which .uns slot to store various neighbor output objects.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"scvi_integration_neighbors\"`. ",
          "default": "scvi_integration_neighbors"
        },
        "obsp_neighbor_distances": {
          "type": "string",
          "description": "In which .obsp slot to store the distance matrix between the resulting neighbors.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"scvi_integration_distances\"`. ",
          "default": "scvi_integration_distances"
        },
        "obsp_neighbor_connectivities": {
          "type": "string",
          "description": "In which .obsp slot to store the connectivities matrix between the resulting neighbors.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"scvi_integration_connectivities\"`. ",
          "default": "scvi_integration_connectivities"
        }
      }
    },
    "scvi integration options": {
      "title": "Scvi integration options",
      "type": "object",
      "description": "No description",
      "properties": {
        "obs_batch": {
          "type": "string",
          "description": "Column name discriminating between your batches.",
          "help_text": "Type: `string`, multiple: `False`, required. "
        },
        "obs_size_factor": {
          "type": "string",
          "description": "Key in adata.obs for size factor information",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "obs_categorical_covariate": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Keys in adata.obs that correspond to categorical data",
          "help_text": "Type: `string`, multiple: `True`. "
        },
        "obs_continuous_covariate": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Keys in adata.obs that correspond to continuous data",
          "help_text": "Type: `string`, multiple: `True`. "
        },
        "obsm_output": {
          "type": "string",
          "description": "In which .obsm slot to store the resulting integrated embedding.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"X_scvi_integrated\"`. ",
          "default": "X_scvi_integrated"
        },
        "var_input": {
          "type": "string",
          "description": ".var column containing highly variable genes",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "early_stopping": {
          "type": "boolean",
          "description": "Whether to perform early stopping with respect to the validation set.",
          "help_text": "Type: `boolean`, multiple: `False`. "
        },
        "early_stopping_monitor": {
          "type": "string",
          "description": "Metric logged during validation set epoch.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"elbo_validation\"`, choices: ``elbo_validation`, `reconstruction_loss_validation`, `kl_local_validation``. ",
          "enum": [
            "elbo_validation",
            "reconstruction_loss_validation",
            "kl_local_validation"
          ],
          "default": "elbo_validation"
        },
        "early_stopping_patience": {
          "type": "integer",
          "description": "Number of validation epochs with no improvement after which training will be stopped.",
          "help_text": "Type: `integer`, multiple: `False`, default: `45`. ",
          "default": 45
        },
        "early_stopping_min_delta": {
          "type": "number",
          "description": "Minimum change in the monitored quantity to qualify as an improvement, i.e",
          "help_text": "Type: `double`, multiple: `False`, default: `0.0`. ",
          "default": 0.0
        },
        "max_epochs": {
          "type": "integer",
          "description": "Number of passes through the dataset, defaults to (20000 / number of cells) * 400 or 400; whichever is smallest.",
          "help_text": "Type: `integer`, multiple: `False`. "
        },
        "reduce_lr_on_plateau": {
          "type": "boolean",
          "description": "Whether to monitor validation loss and reduce learning rate when validation set `lr_scheduler_metric` plateaus.",
          "help_text": "Type: `boolean`, multiple: `False`, default: `true`. ",
          "default": true
        },
        "lr_factor": {
          "type": "number",
          "description": "Factor to reduce learning rate.",
          "help_text": "Type: `double`, multiple: `False`, default: `0.6`. ",
          "default": 0.6
        },
        "lr_patience": {
          "type": "number",
          "description": "Number of epochs with no improvement after which learning rate will be reduced.",
          "help_text": "Type: `double`, multiple: `False`, default: `30.0`. ",
          "default": 30.0
        }
      }
    },
    "clustering options": {
      "title": "Clustering options",
      "type": "object",
      "description": "No description",
      "properties": {
        "obs_cluster": {
          "type": "string",
          "description": "Prefix for the .obs keys under which to add the cluster labels",
          "help_text": "Type: `string`, multiple: `False`, default: `\"scvi_integration_leiden\"`. ",
          "default": "scvi_integration_leiden"
        },
        "leiden_resolution": {
          "type": "array",
          "items": {
            "type": "number"
          },
          "description": "Control the coarseness of the clustering",
          "help_text": "Type: `double`, multiple: `True`, default: `[1.0]`. ",
          "default": [
            1.0
          ]
        }
      }
    },
    "umap options": {
      "title": "Umap options",
      "type": "object",
      "description": "No description",
      "properties": {
        "obsm_umap": {
          "type": "string",
          "description": "In which .obsm slot to store the resulting UMAP embedding.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"X_scvi_umap\"`. ",
          "default": "X_scvi_umap"
        }
      }
    },
    "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/input slots"
    },
    {
      "$ref": "#/$defs/neighbour calculation"
    },
    {
      "$ref": "#/$defs/scvi integration options"
    },
    {
      "$ref": "#/$defs/clustering options"
    },
    {
      "$ref": "#/$defs/umap options"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
