{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "totalvi_scarches",
  "description": "Performs totalVI integration by mapping the query dataset to a reference dataset or model. \n",
  "type": "object",
  "$defs": {
    "inputs": {
      "title": "Inputs",
      "type": "object",
      "description": "No description",
      "properties": {
        "input": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "Input h5mu file with query data to integrate with reference.",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`. "
        },
        "reference": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "Input h5mu file with reference data to train the TOTALVI model.",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`. "
        },
        "force_retrain": {
          "type": "boolean",
          "description": "If true, retrain the model and save it to reference_model_path",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "query_modality": {
          "type": "string",
          "description": "",
          "help_text": "Type: `string`, multiple: `False`, default: `\"rna\"`. ",
          "default": "rna"
        },
        "query_proteins_modality": {
          "type": "string",
          "description": "Name of the modality in the input (query) h5mu file containing protein data",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "reference_modality": {
          "type": "string",
          "description": "",
          "help_text": "Type: `string`, multiple: `False`, default: `\"rna\"`. ",
          "default": "rna"
        },
        "reference_proteins_modality": {
          "type": "string",
          "description": "Name of the modality containing proteins in the reference",
          "help_text": "Type: `string`, multiple: `False`, default: `\"prot\"`. ",
          "default": "prot"
        },
        "input_layer": {
          "type": "string",
          "description": "Input layer to use",
          "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_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": "Output h5mu file.",
          "help_text": "Type: `file`, multiple: `False`, required, default: `\"$id.$key.output\"`, direction: `output`. ",
          "default": "$id.$key.output"
        },
        "obsm_output": {
          "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 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"
        },
        "reference_model_path": {
          "type": "string",
          "format": "path",
          "description": "Directory with the reference model",
          "help_text": "Type: `file`, multiple: `False`, default: `\"totalvi_model_reference\"`, direction: `output`. ",
          "default": "totalvi_model_reference"
        },
        "query_model_path": {
          "type": "string",
          "format": "path",
          "description": "Directory, where the query model will be saved",
          "help_text": "Type: `file`, multiple: `False`, default: `\"totalvi_model_query\"`, direction: `output`. ",
          "default": "totalvi_model_query"
        }
      }
    },
    "learning parameters": {
      "title": "Learning parameters",
      "type": "object",
      "description": "No description",
      "properties": {
        "max_epochs": {
          "type": "integer",
          "description": "Number of passes through the dataset",
          "help_text": "Type: `integer`, multiple: `False`, default: `400`. ",
          "default": 400
        },
        "max_query_epochs": {
          "type": "integer",
          "description": "Number of passes through the dataset, when fine-tuning model for query",
          "help_text": "Type: `integer`, multiple: `False`, default: `200`. ",
          "default": 200
        },
        "weight_decay": {
          "type": "number",
          "description": "Weight decay, when fine-tuning model for query",
          "help_text": "Type: `double`, multiple: `False`, default: `0.0`. ",
          "default": 0.0
        }
      }
    },
    "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/learning parameters"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
