{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "harmony_leiden",
  "description": "Run harmony 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_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`, default: `\"log_normalized\"`. ",
          "default": "log_normalized"
        },
        "modality": {
          "type": "string",
          "description": "Which modality to process.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"rna\"`. ",
          "default": "rna"
        }
      }
    },
    "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: `\"harmonypy_integration_neighbors\"`. ",
          "default": "harmonypy_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: `\"harmonypy_integration_distances\"`. ",
          "default": "harmonypy_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: `\"harmonypy_integration_connectivities\"`. ",
          "default": "harmonypy_integration_connectivities"
        }
      }
    },
    "harmony integration options": {
      "title": "Harmony integration options",
      "type": "object",
      "description": "No description",
      "properties": {
        "embedding": {
          "type": "string",
          "description": "Embedding to use as input",
          "help_text": "Type: `string`, multiple: `False`, default: `\"X_pca\"`. ",
          "default": "X_pca"
        },
        "obsm_integrated": {
          "type": "string",
          "description": "In which .obsm slot to store the resulting integrated embedding.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"X_pca_integrated\"`. ",
          "default": "X_pca_integrated"
        },
        "obs_covariates": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The .obs field(s) that define the covariate(s) to regress out.",
          "help_text": "Type: `string`, multiple: `True`, required, example: `[\"batch\";\"sample\"]`. "
        },
        "theta": {
          "type": "array",
          "items": {
            "type": "number"
          },
          "description": "Diversity clustering penalty parameter",
          "help_text": "Type: `double`, multiple: `True`, default: `[2.0]`. ",
          "default": [
            2.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: `\"harmony_integration_leiden\"`. ",
          "default": "harmony_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_leiden_harmony_umap\"`. ",
          "default": "X_leiden_harmony_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/harmony integration options"
    },
    {
      "$ref": "#/$defs/clustering options"
    },
    {
      "$ref": "#/$defs/umap options"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
