{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "totalvi_leiden",
  "description": "Run totalVI integration, followed by neighbour calculations, leiden clustering and UMAP.",
  "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": "Input h5mu file to be integrated.",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`, example: `\"input.h5mu\"`. "
        },
        "rna_modality": {
          "type": "string",
          "description": "",
          "help_text": "Type: `string`, multiple: `False`, default: `\"rna\"`. ",
          "default": "rna"
        },
        "prot_modality": {
          "type": "string",
          "description": "Name of the modality in the input (query) h5mu file containing protein data",
          "help_text": "Type: `string`, multiple: `False`, default: `\"prot\"`. ",
          "default": "prot"
        },
        "input_layer_rna": {
          "type": "string",
          "description": "Input layer to use from the rna modality for gene counts",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "input_layer_protein": {
          "type": "string",
          "description": "Input layer to use from the protein modality for protein counts",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "obs_batch": {
          "type": "string",
          "description": "Column name discriminating between your batches.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"sample_id\"`. ",
          "default": "sample_id"
        },
        "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`. "
        },
        "var_gene_names": {
          "type": "string",
          "description": ".var column in the rna modality containing gene names",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "var_protein_names": {
          "type": "string",
          "description": ".var column in the protein modality containing protein names",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "var_input": {
          "type": "string",
          "description": ".var column containing highly variable genes",
          "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"
        },
        "output_model": {
          "type": "string",
          "format": "path",
          "description": "Directory where the trained reference model will be stored.",
          "help_text": "Type: `file`, multiple: `False`, default: `\"totalvi_model_reference\"`, direction: `output`. ",
          "default": "totalvi_model_reference"
        }
      }
    },
    "totalvi training options": {
      "title": "TotalVI Training Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "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`. "
        },
        "early_stopping": {
          "type": "boolean",
          "description": "Whether to perform early stopping with respect to the validation set.",
          "help_text": "Type: `boolean`, multiple: `False`, default: `true`. ",
          "default": true
        }
      }
    },
    "totalvi integration options": {
      "title": "TotalVI Integration Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "obsm_integrated": {
          "type": "string",
          "description": "In which .obsm slot to store the resulting integrated embedding.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"X_integrated_totalvi\"`. ",
          "default": "X_integrated_totalvi"
        },
        "obsm_normalized_rna_output": {
          "type": "string",
          "description": "In which .obsm slot to store the normalized RNA data from TOTALVI.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"X_totalvi_normalized_rna\"`. ",
          "default": "X_totalvi_normalized_rna"
        },
        "obsm_normalized_protein_output": {
          "type": "string",
          "description": "In which .obsm slot to store the normalized protein data from TOTALVI.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"X_totalvi_normalized_protein\"`. ",
          "default": "X_totalvi_normalized_protein"
        }
      }
    },
    "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: `\"totalvi_integration_neighbors\"`. ",
          "default": "totalvi_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: `\"totalvi_integration_distances\"`. ",
          "default": "totalvi_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: `\"totalvi_integration_connectivities\"`. ",
          "default": "totalvi_integration_connectivities"
        }
      }
    },
    "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: `\"totalvi_integration_leiden\"`. ",
          "default": "totalvi_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_totalvi_umap\"`. ",
          "default": "X_totalvi_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/totalvi training options"
    },
    {
      "$ref": "#/$defs/totalvi integration options"
    },
    {
      "$ref": "#/$defs/neighbour calculation"
    },
    {
      "$ref": "#/$defs/clustering options"
    },
    {
      "$ref": "#/$defs/umap options"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
