{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "process_batches",
  "description": "This workflow serves as an entrypoint into the 'full_pipeline' in order to\nre-run the multisample processing and the integration setup. An input .h5mu file will \nfirst be split in order to run the multisample processing per modality. Next, the modalities\nare merged again and the integration setup pipeline is executed. Please note that this workflow\nassumes that samples from multiple pipelines are already concatenated. \n",
  "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": "array",
          "items": {
            "type": "string"
          },
          "format": "path",
          "exists": true,
          "description": "Path to the sample.",
          "help_text": "Type: `file`, multiple: `True`, required, direction: `input`, example: `[\"input.h5mu\"]`. "
        },
        "rna_layer": {
          "type": "string",
          "description": "Input layer for the gene expression modality",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "prot_layer": {
          "type": "string",
          "description": "Input layer for the antibody capture modality",
          "help_text": "Type: `string`, multiple: `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"
        }
      }
    },
    "cross-modality filtering": {
      "title": "Cross-modality filtering",
      "type": "object",
      "description": "No description",
      "properties": {
        "intersect_obs": {
          "type": "boolean",
          "description": "After per-modality multisample processing, remove observations that are\nnot present in all processed modalities so that each modality shares the\nsame set of cells.\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        }
      }
    },
    "highly variable features detection": {
      "title": "Highly variable features detection",
      "type": "object",
      "description": "No description",
      "properties": {
        "highly_variable_features_var_output": {
          "type": "string",
          "description": "In which .var slot to store a boolean array corresponding to the highly variable genes.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"filter_with_hvg\"`. ",
          "default": "filter_with_hvg"
        },
        "highly_variable_features_obs_batch_key": {
          "type": "string",
          "description": "If specified, highly-variable genes are selected within each batch separately and merged",
          "help_text": "Type: `string`, multiple: `False`, default: `\"sample_id\"`. ",
          "default": "sample_id"
        },
        "highly_variable_features_features_to_exclude": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "User-defined list of feature names to exclude from HVG calculation",
          "help_text": "Type: `string`, multiple: `True`, example: `[\"MT-CO1\";\"MT-CO2\";\"MT-ND1\"]`. "
        }
      }
    },
    "qc metrics calculation options": {
      "title": "QC metrics calculation options",
      "type": "object",
      "description": "No description",
      "properties": {
        "var_qc_metrics": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Keys to select a boolean (containing only True or False) column from .var.\nFor each cell, calculate the proportion of total values for genes which are labeled 'True', \ncompared to the total sum of the values for all genes.\n",
          "help_text": "Type: `string`, multiple: `True`, default: `[\"filter_with_hvg\"]`, example: `[\"ercc,highly_variable\"]`. ",
          "default": [
            "filter_with_hvg"
          ]
        },
        "top_n_vars": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "description": "Number of top vars to be used to calculate cumulative proportions.\nIf not specified, proportions are not calculated",
          "help_text": "Type: `integer`, multiple: `True`, default: `[50,100,200,500]`. ",
          "default": [
            50,
            100,
            200,
            500
          ]
        },
        "log1p_transform": {
          "type": "boolean",
          "description": "Compute log1p-transformed versions of the calculated QC metrics",
          "help_text": "Type: `boolean`, multiple: `False`, default: `true`. ",
          "default": true
        }
      }
    },
    "pca options": {
      "title": "PCA options",
      "type": "object",
      "description": "No description",
      "properties": {
        "pca_overwrite": {
          "type": "boolean",
          "description": "Allow overwriting slots for PCA output.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        }
      }
    },
    "clr options": {
      "title": "CLR options",
      "type": "object",
      "description": "No description",
      "properties": {
        "clr_axis": {
          "type": "integer",
          "description": "Axis to perform the CLR transformation on.",
          "help_text": "Type: `integer`, multiple: `False`, default: `0`. ",
          "default": 0
        }
      }
    },
    "rna scaling options": {
      "title": "RNA Scaling options",
      "type": "object",
      "description": "Options for enabling scaling of the log-normalized data to unit variance and zero mean.\nThe scaled data will be output a different layer and representation with reduced dimensions\nwill be created and stored in addition to the non-scaled data.\n",
      "properties": {
        "rna_enable_scaling": {
          "type": "boolean",
          "description": "Enable scaling for the RNA modality.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "rna_scaling_output_layer": {
          "type": "string",
          "description": "Output layer where the scaled log-normalized data will be stored.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"scaled\"`. ",
          "default": "scaled"
        },
        "rna_scaling_pca_obsm_output": {
          "type": "string",
          "description": "Name of the .obsm key where the PCA representation of the log-normalized\nand scaled data is stored.\n",
          "help_text": "Type: `string`, multiple: `False`, default: `\"scaled_pca\"`. ",
          "default": "scaled_pca"
        },
        "rna_scaling_pca_loadings_varm_output": {
          "type": "string",
          "description": "Name of the .varm key where the PCA loadings of the log-normalized and scaled\ndata is stored.\n",
          "help_text": "Type: `string`, multiple: `False`, default: `\"scaled_pca_loadings\"`. ",
          "default": "scaled_pca_loadings"
        },
        "rna_scaling_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`, default: `\"scaled_pca_variance\"`. ",
          "default": "scaled_pca_variance"
        },
        "rna_scaling_umap_obsm_output": {
          "type": "string",
          "description": "Name of the .obsm key where the UMAP representation of the log-normalized and scaled data is stored.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"scaled_umap\"`. ",
          "default": "scaled_umap"
        },
        "rna_scaling_max_value": {
          "type": "number",
          "description": "Clip (truncate) data to this value after scaling",
          "help_text": "Type: `double`, multiple: `False`. "
        },
        "rna_scaling_zero_center": {
          "type": "boolean",
          "description": "If set, omit zero-centering variables, which allows to handle sparse input efficiently.\"",
          "help_text": "Type: `boolean_false`, multiple: `False`, default: `true`. ",
          "default": true
        }
      }
    },
    "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/cross-modality filtering"
    },
    {
      "$ref": "#/$defs/highly variable features detection"
    },
    {
      "$ref": "#/$defs/qc metrics calculation options"
    },
    {
      "$ref": "#/$defs/pca options"
    },
    {
      "$ref": "#/$defs/clr options"
    },
    {
      "$ref": "#/$defs/rna scaling options"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
