{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "filter_with_scrublet",
  "description": "Doublet detection using the Scrublet method (Wolock, Lopez and Klein, 2019).\nThe method tests for potential doublets by using the expression profiles of\ncells to generate synthetic potential doubles which are tested against cells. \nThe method returns a \"doublet score\" on which it calls for potential doublets.\n\nFor the source code please visit https://github.com/AllonKleinLab/scrublet.\n\nFor 10x we expect the doublet rates to be:\n  Multiplet Rate (%) - # of Cells Loaded - # of Cells Recovered\n  ~0.4% ~800 ~500\n  ~0.8% ~1,600 ~1,000\n  ~1.6% ~3,200 ~2,000\n  ~2.3% ~4,800 ~3,000\n  ~3.1% ~6,400 ~4,000\n  ~3.9% ~8,000 ~5,000\n  ~4.6% ~9,600 ~6,000\n  ~5.4% ~11,200 ~7,000\n  ~6.1% ~12,800 ~8,000\n  ~6.9% ~14,400 ~9,000\n  ~7.6% ~16,000 ~10,000\n",
  "type": "object",
  "$defs": {
    "arguments": {
      "title": "Arguments",
      "type": "object",
      "description": "No description",
      "properties": {
        "input": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "Input h5mu file",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`, example: `\"input.h5mu\"`. "
        },
        "modality": {
          "type": "string",
          "description": "Which modality from the input MuData file to process.\n",
          "help_text": "Type: `string`, multiple: `False`, default: `\"rna\"`. ",
          "default": "rna"
        },
        "layer": {
          "type": "string",
          "description": "Input layer to use as data for calculating doublets",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "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"
        },
        "obs_name_filter": {
          "type": "string",
          "description": "In which .obs slot to store a boolean array corresponding to which observations should be filtered out.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"filter_with_scrublet\"`. ",
          "default": "filter_with_scrublet"
        },
        "do_subset": {
          "type": "boolean",
          "description": "Whether to subset before storing the output.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "obs_name_doublet_score": {
          "type": "string",
          "description": "Name of the doublet scores column in the obs slot of the returned object.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"scrublet_doublet_score\"`. ",
          "default": "scrublet_doublet_score"
        },
        "expected_doublet_rate": {
          "type": "number",
          "description": "The estimated fraction of doublets as from the experimental setup.\n",
          "help_text": "Type: `double`, multiple: `False`. "
        },
        "stdev_doublet_rate": {
          "type": "number",
          "description": "Uncertainty in the expected doublet rate.",
          "help_text": "Type: `double`, multiple: `False`. "
        },
        "n_neighbors": {
          "type": "integer",
          "description": "Number of neighbors used to construct the KNN classifier of observed transcriptomes\nand simulated doublets.\n",
          "help_text": "Type: `integer`, multiple: `False`. "
        },
        "sim_doublet_ratio": {
          "type": "number",
          "description": "Number of doublets to simulate relative to the number of observed\ntranscriptomes.\n",
          "help_text": "Type: `double`, multiple: `False`. "
        },
        "min_counts": {
          "type": "integer",
          "description": "The number of minimal UMI counts per cell that have to be present for initial cell detection.",
          "help_text": "Type: `integer`, multiple: `False`, default: `2`. ",
          "default": 2
        },
        "min_cells": {
          "type": "integer",
          "description": "The number of cells in which UMIs for a gene were detected.",
          "help_text": "Type: `integer`, multiple: `False`, default: `3`. ",
          "default": 3
        },
        "min_gene_variablity_percent": {
          "type": "number",
          "description": "Used for gene filtering prior to PCA",
          "help_text": "Type: `double`, multiple: `False`, default: `85.0`. ",
          "default": 85.0
        },
        "num_pca_components": {
          "type": "integer",
          "description": "Number of principal components to use during PCA dimensionality reduction.",
          "help_text": "Type: `integer`, multiple: `False`, default: `30`. ",
          "default": 30
        },
        "distance_metric": {
          "type": "string",
          "description": "The distance metric used for computing similarities.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"euclidean\"`. ",
          "default": "euclidean"
        },
        "allow_automatic_threshold_detection_fail": {
          "type": "boolean",
          "description": "When scrublet fails to automatically determine the double score threshold, \nallow the component to continue and set the output columns to NA.\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "output_compression": {
          "type": "string",
          "description": "Compression format to use for the output AnnData and/or Mudata objects.\nBy default no compression is applied.\n",
          "help_text": "Type: `string`, multiple: `False`, example: `\"gzip\"`, choices: ``gzip`, `lzf``. ",
          "enum": [
            "gzip",
            "lzf"
          ]
        }
      }
    },
    "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/arguments"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
