{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "dimensionality_reduction",
  "description": "Run calculations that output information required for most integration methods: PCA, nearest neighbour and UMAP.",
  "type": "object",
  "$defs": {
    "Dataset input": {
      "title": "Dataset input",
      "type": "object",
      "description": "Dataset input using nf-tower \"dataset\" or \"data explorer\". Allows for the input of multiple         parameter sets to initialise a Nextflow channel.",
      "properties": {
        "param_list": {
          "description": "Dataset input can either be a list of maps, a csv file, a json file, a yaml file, or simply a yaml                 blob. The names of the input fields (e.g. csv columns, json keys) need to be an exact match with the workflow input parameters.",
          "type": "string",
          "default": "",
          "format": "file-path",
          "mimetype": "text/csv"
        }
      }
    },
    "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"
        }
      }
    },
    "pca options": {
      "title": "PCA options",
      "type": "object",
      "description": "No description",
      "properties": {
        "obsm_pca": {
          "type": "string",
          "description": "In which .obsm slot to store the resulting PCA embedding.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"X_pca\"`. ",
          "default": "X_pca"
        },
        "var_pca_feature_selection": {
          "type": "string",
          "description": "Column name in .var matrix that will be used to select which genes to run the PCA on.",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "pca_loadings_varm_output": {
          "type": "string",
          "description": "Name of the .varm key where the PCA loadings are stored.\n",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "pca_variance_uns_output": {
          "type": "string",
          "description": "Name of the .uns key where the variance and variance ratio will be stored as a map.\nThe map will contain two keys: variance and variance_ratio respectively.\n",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "pca_overwrite": {
          "type": "boolean",
          "description": "Allow overwriting slots for PCA output.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        }
      }
    },
    "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: `\"neighbors\"`. ",
          "default": "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: `\"distances\"`. ",
          "default": "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: `\"connectivities\"`. ",
          "default": "connectivities"
        }
      }
    },
    "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_umap\"`. ",
          "default": "X_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/pca options"
    },
    {
      "$ref": "#/$defs/neighbour calculation"
    },
    {
      "$ref": "#/$defs/umap options"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
