{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "bbknn_leiden",
  "description": "Run bbknn followed by leiden clustering and run umap on the result.",
  "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: `\"dataset.h5mu\"`. "
        },
        "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"
        }
      }
    },
    "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"
        }
      }
    },
    "bbknn": {
      "title": "Bbknn",
      "type": "object",
      "description": "No description",
      "properties": {
        "obsm_input": {
          "type": "string",
          "description": "The dimensionality reduction in `.obsm` to use for neighbour detection",
          "help_text": "Type: `string`, multiple: `False`, default: `\"X_pca\"`. ",
          "default": "X_pca"
        },
        "obs_batch": {
          "type": "string",
          "description": ".obs column name discriminating between your batches.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"sample_id\"`. ",
          "default": "sample_id"
        },
        "uns_output": {
          "type": "string",
          "description": "Mandatory .uns slot to store various neighbor output objects.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"bbknn_integration_neighbors\"`. ",
          "default": "bbknn_integration_neighbors"
        },
        "obsp_distances": {
          "type": "string",
          "description": "In which .obsp slot to store the distance matrix between the resulting neighbors.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"bbknn_integration_distances\"`. ",
          "default": "bbknn_integration_distances"
        },
        "obsp_connectivities": {
          "type": "string",
          "description": "In which .obsp slot to store the connectivities matrix between the resulting neighbors.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"bbknn_integration_connectivities\"`. ",
          "default": "bbknn_integration_connectivities"
        },
        "n_neighbors_within_batch": {
          "type": "integer",
          "description": "How many top neighbours to report for each batch; total number of neighbours in the initial k-nearest-neighbours computation will be this number times the number of batches.",
          "help_text": "Type: `integer`, multiple: `False`, default: `3`. ",
          "default": 3
        },
        "n_pcs": {
          "type": "integer",
          "description": "How many dimensions (in case of PCA, principal components) to use in the analysis.",
          "help_text": "Type: `integer`, multiple: `False`, default: `50`. ",
          "default": 50
        },
        "n_trim": {
          "type": "integer",
          "description": "Trim the neighbours of each cell to these many top connectivities",
          "help_text": "Type: `integer`, multiple: `False`. "
        }
      }
    },
    "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: `\"bbknn_integration_leiden\"`. ",
          "default": "bbknn_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_bbknn_umap\"`. ",
          "default": "X_leiden_bbknn_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/bbknn"
    },
    {
      "$ref": "#/$defs/clustering options"
    },
    {
      "$ref": "#/$defs/umap options"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
