{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "deseq2",
  "description": "Performs differential expression analysis using DESeq2 on bulk samples or pseudobulk samples aggregated from single-cell data.\nNote that this component only considers factors as explanatory variables, and excludes covariates from the analysis.\n",
  "type": "object",
  "$defs": {
    "inputs": {
      "title": "Inputs",
      "type": "object",
      "description": "No description",
      "properties": {
        "input": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "Input h5mu file containing (pseudo-)bulk transcriptomic samples.",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`. "
        },
        "modality": {
          "type": "string",
          "description": "Which modality from the input MuData file to process.\n",
          "help_text": "Type: `string`, multiple: `False`, default: `\"rna\"`. ",
          "default": "rna"
        },
        "input_layer": {
          "type": "string",
          "description": "Input layer to use",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "var_gene_names": {
          "type": "string",
          "description": "Name of the .var field that contains gene symbols",
          "help_text": "Type: `string`, multiple: `False`, example: `\"gene_symbol\"`. "
        },
        "obs_cell_group": {
          "type": "string",
          "description": ".obs field containing the cell group information, for example per cell type or per cell cluster.\nIf true, performs per-cell-group analysis with cell-group-specific results.\n",
          "help_text": "Type: `string`, multiple: `False`. "
        }
      }
    },
    "outputs": {
      "title": "Outputs",
      "type": "object",
      "description": "No description",
      "properties": {
        "output_dir": {
          "type": "string",
          "format": "path",
          "description": "Output directory for DESeq2 results",
          "help_text": "Type: `file`, multiple: `False`, required, default: `\"$id.$key.output_dir\"`, direction: `output`. ",
          "default": "$id.$key.output_dir"
        },
        "output_prefix": {
          "type": "string",
          "description": "Prefix for output CSV files",
          "help_text": "Type: `string`, multiple: `False`, default: `\"deseq2_analysis\"`. ",
          "default": "deseq2_analysis"
        }
      }
    },
    "arguments": {
      "title": "Arguments",
      "type": "object",
      "description": "No description",
      "properties": {
        "design_formula": {
          "type": "string",
          "description": "The formula should be a tilde (~) followed by the variables with plus signs between them",
          "help_text": "Type: `string`, multiple: `False`, required, example: `\"~ disease + treatment\"`. "
        },
        "contrast_column": {
          "type": "string",
          "description": "Column in the metadata to use for the contrast.\nThis column should contain the conditions to compare.\n",
          "help_text": "Type: `string`, multiple: `False`, required, example: `\"treatment\"`. "
        },
        "contrast_values": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Values to compare in the contrast column.\nFirst value is the control group, following values are comparison groups",
          "help_text": "Type: `string`, multiple: `True`, required, example: `[\"ctrl\";\"stim\"]`. "
        },
        "p_adj_threshold": {
          "type": "number",
          "description": "Adjusted p-value threshold for significance, corrected with the Benjamini and Hochberg method.\nGenes with adjusted p-values below this threshold will be considered significant.\n",
          "help_text": "Type: `double`, multiple: `False`, default: `0.05`. ",
          "default": 0.05
        },
        "log2fc_threshold": {
          "type": "number",
          "description": "Log2 fold change threshold for significance.\nGenes with absolute log2 fold change above this threshold will be considered significant.\n",
          "help_text": "Type: `double`, multiple: `False`, default: `0.0`. ",
          "default": 0.0
        }
      }
    },
    "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/nextflow input-output arguments"
    }
  ]
}
