{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "singler",
  "description": "SingleR performs reference-based cell type annotation for single-cell RNA-seq data \nby computing Spearman correlations between test cells and reference samples with known labels, \nusing marker genes to assign the most similar cell type label to each new cell.\n",
  "type": "object",
  "$defs": {
    "inputs": {
      "title": "Inputs",
      "type": "object",
      "description": "Input dataset (query) arguments",
      "properties": {
        "input": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "The input (query) data to be labeled",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`, example: `\"input.h5mu\"`. "
        },
        "modality": {
          "type": "string",
          "description": "Which modality to process.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"rna\"`. ",
          "default": "rna"
        },
        "input_layer": {
          "type": "string",
          "description": "The layer in the input data containing log normalized counts to be used for cell type annotation if .X is not to be used.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"log_normalized\"`. ",
          "default": "log_normalized"
        },
        "input_var_gene_names": {
          "type": "string",
          "description": "The name of the adata .var column in the input data containing gene names; when no gene_name_layer is provided, the var index will be used.\n",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "input_obs_clusters": {
          "type": "string",
          "description": "The name of the adata .obs column containing cluster identities of the observations",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "input_reference_gene_overlap": {
          "type": "integer",
          "description": "The minimum number of genes present in both the reference and query datasets.\n",
          "help_text": "Type: `integer`, multiple: `False`, default: `100`. ",
          "default": 100
        }
      }
    },
    "outputs": {
      "title": "Outputs",
      "type": "object",
      "description": "Output arguments.",
      "properties": {
        "output": {
          "type": "string",
          "format": "path",
          "description": "Output h5mu file.",
          "help_text": "Type: `file`, multiple: `False`, default: `\"$id.$key.output.h5mu\"`, direction: `output`, example: `\"output.h5mu\"`. ",
          "default": "$id.$key.output.h5mu"
        },
        "output_obs_predictions": {
          "type": "string",
          "description": "In which `.obs` slot to store the predicted labels",
          "help_text": "Type: `string`, multiple: `False`, default: `\"singler_pred\"`. ",
          "default": "singler_pred"
        },
        "output_obs_probability": {
          "type": "string",
          "description": "In which `.obs` slots to store the probability of the predicted labels.\n",
          "help_text": "Type: `string`, multiple: `False`, default: `\"singler_probability\"`. ",
          "default": "singler_probability"
        },
        "output_obs_delta_next": {
          "type": "string",
          "description": "In which `.obs` slot to store the delta between the best and next-best score",
          "help_text": "Type: `string`, multiple: `False`, default: `\"singler_delta_next\"`. ",
          "default": "singler_delta_next"
        },
        "output_obs_pruned_predictions": {
          "type": "string",
          "description": "In which `.obs` slot to store the pruned labels, where low-quality labels are replaced with NA's",
          "help_text": "Type: `string`, multiple: `False`, default: `\"singler_pruned_labels\"`. ",
          "default": "singler_pruned_labels"
        },
        "output_obsm_scores": {
          "type": "string",
          "description": "In which `.obsm` slot to store the matrix of prediction correlations at the specified quantile for each label (column) in each cell (row).\n",
          "help_text": "Type: `string`, multiple: `False`, default: `\"singler_scores\"`. ",
          "default": "singler_scores"
        },
        "output_compression": {
          "type": "string",
          "description": "Compression format to use for the output AnnData and/or Mudata H5 files.\nBy default no compression is applied.\n",
          "help_text": "Type: `string`, multiple: `False`, example: `\"gzip\"`, choices: ``gzip`, `lzf``. ",
          "enum": [
            "gzip",
            "lzf"
          ]
        }
      }
    },
    "arguments": {
      "title": "Arguments",
      "type": "object",
      "description": "Arguments related to the training of and classification with the SingleR model",
      "properties": {
        "de_n_genes": {
          "type": "integer",
          "description": "The number of differentially expressed genes across labels to be calculated from the reference.\nDefaults to 500 * (2/3) ^ log2(N) where N is the number of unique labels when if `--de_method` is set to `classic`,\notherwise, defaults to 10.\n",
          "help_text": "Type: `integer`, multiple: `False`. "
        },
        "de_method": {
          "type": "string",
          "description": "Method to detect differentially expressed genes between pairs of labels.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"classic\"`, choices: ``classic`, `t`, `wilcox``. ",
          "enum": [
            "classic",
            "t",
            "wilcox"
          ],
          "default": "classic"
        },
        "quantile": {
          "type": "number",
          "description": "The quantile of the correlation distribution to use to compute the score per label.",
          "help_text": "Type: `double`, multiple: `False`, default: `0.8`. ",
          "default": 0.8
        },
        "fine_tune": {
          "type": "boolean",
          "description": "Whether finetuning should be performed to improve the resolution",
          "help_text": "Type: `boolean`, multiple: `False`, default: `true`. ",
          "default": true
        },
        "fine_tuning_threshold": {
          "type": "number",
          "description": "The maximum difference from the maximum correlation to use in fine-tuning\n",
          "help_text": "Type: `double`, multiple: `False`, default: `0.05`. ",
          "default": 0.05
        },
        "prune": {
          "type": "boolean",
          "description": "Whether label pruning should be performed",
          "help_text": "Type: `boolean`, multiple: `False`, default: `true`. ",
          "default": true
        },
        "sanitize_ensembl_ids": {
          "type": "boolean",
          "description": "Whether to sanitize ensembl ids by removing version numbers.",
          "help_text": "Type: `boolean`, multiple: `False`, default: `true`. ",
          "default": true
        }
      }
    },
    "reference": {
      "title": "Reference",
      "type": "object",
      "description": "Arguments related to the reference dataset.",
      "properties": {
        "reference": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "The reference data to train the CellTypist classifiers on",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`, example: `\"reference.h5mu\"`. "
        },
        "reference_layer": {
          "type": "string",
          "description": "The layer in the reference data containing lognormalized couns to be used for cell type annotation if .X is not to be used",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "reference_obs_target": {
          "type": "string",
          "description": "The name of the adata obs column in the reference data containing cell type annotations.",
          "help_text": "Type: `string`, multiple: `False`, required. "
        },
        "reference_var_gene_names": {
          "type": "string",
          "description": "The name of the adata var column in the reference data containing gene names; when no gene_name_layer is provided, the var index will be used.\n",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "reference_var_input": {
          "type": "string",
          "description": ".var column containing a boolean mask corresponding to genes to be used for marker selection",
          "help_text": "Type: `string`, multiple: `False`, default: `\"filter_with_hvg\"`. ",
          "default": "filter_with_hvg"
        }
      }
    },
    "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/arguments"
    },
    {
      "$ref": "#/$defs/reference"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
