> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cosmosid.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Univariate comparison on Cosmos-Hub 2.0

> This page covers how univariate comparison works in Cosmos-Hub 2.0: the outputs it produces, how to read them, and the parameters you can tune. For the method behind it, see the Univariate comparison overview.

# Module output and customization

* **Feature-level group comparison boxplot panels:** One panel for each differentially abundant feature, repeated for each abundance test you selected. Within a panel, one boxplot per group shows how that feature's relative abundance is distributed across groups of interest.
* **Differential prevalence table \[1]:** A table reporting which features are differentially *prevalent* (detected in a different proportion of samples) across your groups of interest.
* **Univariate Statistical testing tables \[3]:** Three tables reporting the statistical output for the abundance and prevalence test: the Kruskal-Wallis test per feature (always run), the Dunn's post-hoc pairwise comparisons, and the pairwise differential-abundance results from your selected test.

## Feature-level group comparison boxplot panels

<Frame caption="Feature-level group comparison. The distribution of one feature across groups, one dot per sample. Brackets mark significant pairwise comparisons; the title reports the overall group-level test.">
  <img src="https://mintcdn.com/cmbio/94J_RhB0r0hkbe2K/images/univariate_plot.png?fit=max&auto=format&n=94J_RhB0r0hkbe2K&q=85&s=c53f7c3999587c62f830342b75894388" alt="Univariate Plot" width="700" height="482" data-path="images/univariate_plot.png" />
</Frame>

The module produces one boxplot panel for each feature (e.g: microbial taxa, gene, function) whose abundance is significantly different between at least one pair of groups.

Within a panel, one boxplot per group summarizes that feature's counts or relative abundance, one dot marks each sample, and brackets connect the group pairs that are significantly different.

#### Define which groups to compare

Univariate comparison finds which microbial features are associated with a categorical variable of interest by testing which features are differentially abundant or prevalent between its groups.

Select one categorical metadata variable using the [Grouping Variable](#grouping-variable) parameter. The values of this variable define the groups that every feature is compared across.

#### Choosing the right statistical test for group comparison

Univariate Comparison module find abundance and prevalence associations to your variable of interest by running statistical tests on *all possible pairwise group combinations*. Depending on this, choose which tests you want to use:

* **Differential abundance** compares the relative abundance of each feature between groups. Use the [Differential Abundance test](#differential-abundance-test) dropdown to choose which statistical test is used for testing differential abundances:
  * `Mann-Whitney U` for independent groups (e.g: cross-sectional unrelated subjects)
  * `Wilcoxon signed-rank` for paired samples (e.g: subjects longitudinally sampled)
  * `t-test` when comparing distributions that are approximately normal. <br />

<Note>
  **Which Differential Abundance test fits my design?**<br />First ask: *are the same subjects measured in more than one group, or are all subjects different?*

  * **Use** `Mann–Whitney U `**for independent groups.**<br />Example: You compare alpha diversity between 10 treated mice and 10 untreated mice. Each mouse appears in only one group, so values cannot be paired across groups. The groups are independent → `Mann–Whitney U` is appropriate.
  * **Use** `Wilcoxon `**for paired or matched samples.**<br />Example: You compare alpha diversity in the same 10 mice before and after treatment. Each mouse contributes one “before” and one “after” value, so every value has a natural partner from the same animal. The samples are paired → `Wilcoxon` tests the within-subject change.
</Note>

**Differential prevalence** compares how often each feature is detected between groups. Choose the contingency test with [Differential Prevalence Test](#differential-prevalence-test):

* `Fisher's exact` the standard, conservative default. Fast and reliable, especially with small samples.
* `Barnard` more powerful than Fisher for two-group comparisons, but computationally heavy and might require more time to run.
* `Boschloo` at least as powerful as Fisher for two-group comparisons. Choose it when sensitivity matters most.

<Check>
  **Kruskal-Wallis + Dunn test**

  Alongside your chosen test, a **Kruskal-Wallis** test with **Dunn's post-hoc** always runs. Kruskal-Wallis is a non-parametric test that asks whether a feature's distribution differs across all groups at once, and Dunn's post-hoc then identifies which specific group pairs differ. The same logic appears in the [alpha diversity](/analysis/alpha-diversity) group comparisons.
</Check>

#### Choose when a feature association counts as significant

Significance brackets and p-values/q-values of boxplot panels are reported when comparisons are reported as statistically significant. Choose statistical significance threshold (usually 0.05) through [P-value threshold](#p-value-threshold) parameter.

Because many features and group pairs are tested at once, the risk of incurring in associations that are false positives increases significantly. This is why p-values are usually adjusted (Q-value) by weighting on how many hypotheses have been tested. Set the False Discovery Rate threshold to decide when a Q-value  should be marked as significant.

* [Diff. Abundance tests FDR threshold](#differential-abundance-tests-fdr-threshold) for the abundance comparisons between more than
* [Diff. Prevalence tests FDR threshold](#differential-prevalence-tests-fdr-threshold) for the prevalence comparisons.

A higher threshold returns more significant results but more false positives; a lower one returns fewer with higher confidence.

<Note>
  Note: a boxplot panel of a feature is displayed only when there's at least a pair of groups where the differentially abundant feature association was found to be **statistically significant**.

  Deciding where to set this threshold depends on the goals of the analysis and how confident you need to be. To produce plots also for exploratory purposes and see feature-level group boxplots panels for features that  we suggest to increase the FDR threshold
</Note>

These FDR thresholds are also what select which features are drawn as boxplot panels, and on each panel only pairs that pass the abundance threshold are marked with a significance bracket.

<Note>
  The [P-value threshold](#p-value-threshold) is a fallback, not the main cutoff. When a run has too few tests for multiple-testing correction to be meaningful (for example, only one valid comparison for a test), significance falls back to this raw p-value threshold instead of the FDR one. In a normal multi-taxon run, the two FDR thresholds are what matter.
</Note>

#### Set how many panels are shown

A real dataset can produce more significant features than are useful to view at once.

* The [Max figures to display](#max-figures-to-display) parameter limits how many boxplots appear on screen per test, showing only the top results. Note that **exporting includes every significant feature's boxplot**, not just those shown on screen.

Samples with no value for the grouping variable are handled by [Drop samples with missing metadata](#drop-samples-with-missing-grouping-metadata).

#### **Why is this plot  useful?**

* **Reveals associations between a feature and a clinical or experimental variable.** It tells you whether a taxon's abundance is statistically associated with the grouping variable, which is a starting point for relating that microbe to disease, treatment, or other characteristics.
* **Localizes the association to specific groups.** The pairwise comparisons show *which* groups a feature distinguishes, pinpointing where the association is strongest.
* **Separates statistical significance from biological size.** Showing the full distribution alongside the p-values lets you judge whether a significant association is also a sizeable, consistent shift, rather than a small difference made significant by sample size.
* **Generates focused, testable hypotheses.** Out of thousands of features, it isolates one feature and a specific set of group differences as candidate markers for follow-up.

## Univariate Statistical Testing tables

<Tabs>
  <Tab title="Contingency Tests">
    Prevalence testing asks whether a feature is *detected* in a different proportion of samples across groups, rather than whether its amount differs. For each feature, the number of samples where it is present and absent is tabulated per group, and the contingency test you selected in [Differential Prevalence Test](#differential-prevalence-test) evaluates whether detection frequency differs more than chance would explain. The results are FDR-corrected using the [Diff. Prevalence tests FDR threshold](#differential-prevalence-tests-fdr-threshold).

    | Column                                       | Description                                                                                                  |
    | :------------------------------------------- | :----------------------------------------------------------------------------------------------------------- |
    | `variable`                                   | Metadata column used as the grouping variable                                                                |
    | `taxa`                                       | Feature tested                                                                                               |
    | `group1`                                     | First group in the comparison                                                                                |
    | `group2`                                     | Second group in the comparison                                                                               |
    | `present_group1`                             | Samples in `group1` where the feature is detected                                                            |
    | `not_present_group1`                         | Samples in `group1` where the feature is not detected                                                        |
    | `present_group2`                             | Samples in `group2` where the feature is detected                                                            |
    | `not_present_group2`                         | Samples in `group2` where the feature is not detected                                                        |
    | `<Differential_prevalence_test>_pvalue`      | Unadjusted p-value from the selected test on the 2×2 table                                                   |
    | `<Differential_prevalence_test>_fdr`         | Benjamini–Hochberg adjusted p-value                                                                          |
    | `<Differential_prevalence_test>_significant` | `1`  if if the FDR for the tested feature is below the selected Diff. Abundance FDR Threshold, `0`otherwise. |
    | `combined_fdr`                               | Adjusted p-value used for reporting significance                                                             |
  </Tab>

  <Tab title="Kruskal–Wallis">
    Kruskal–Wallis result for each feature, testing whether its abundance differs across the levels of the grouping variable.

    | Column    | Description                                                                          |
    | :-------- | :----------------------------------------------------------------------------------- |
    | `feature` | Feature tested, for example a taxon or a functional category                         |
    | `H_stat`  | Kruskal–Wallis H statistic. Larger values indicate greater separation between groups |
    | `p_value` | Unadjusted p-value of the Kruskal–Wallis test                                        |
    | `fdr`     | Benjamini–Hochberg adjusted p-value across all features tested                       |
  </Tab>

  <Tab title="Dunn's Post-hoc">
    Pairwise follow-up comparisons performed after the general Kruskal–Wallis test to identify which specific pairs of groups differ.

    | Column         | Description                        |
    | :------------- | :--------------------------------- |
    | `feature`      | Feature tested                     |
    | `group_value1` | First group in the comparison      |
    | `group_value2` | Second group in the comparison     |
    | `q_value`      | FDR-adjusted p-value for this pair |
  </Tab>

  <Tab title="Diff. Abundance Pairwise">
    Pairwise differential abundance results for the test(s) selected in the analysis parameters.

    | Column                                      | Description                                                                                                                                 |
    | :------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------ |
    | `variable`                                  | Grouping variable chosen in the parameters                                                                                                  |
    | `feature`                                   | Feature tested                                                                                                                              |
    | `group1`                                    | First group in the comparison                                                                                                               |
    | `group2`                                    | Second group in the comparison                                                                                                              |
    | `n1`                                        | Number of samples in `group1`                                                                                                               |
    | `n2`                                        | Number of samples in `group2`                                                                                                               |
    | `median1`                                   | Median abundance of the feature in `group1`                                                                                                 |
    | `median2`                                   | Median abundance of the feature in `group2`                                                                                                 |
    | `effect`                                    | Effect size reported as the difference between `median2` and `median1`.   <br /><br />Negative values indicate higher abundance in `group1` |
    | `<Differential_abundance_test>_stats`       | Test statistic for the selected differential abundance test                                                                                 |
    | `<Differential_abundance_test>_pvalue`      | Unadjusted p-value                                                                                                                          |
    | `<Differential_abundance_test>_fdr`         | Benjamini–Hochberg adjusted p-value                                                                                                         |
    | `<Differential_abundance_test>_significant` | `1`  if if the FDR for the tested feature is below the selected Diff. Abundance FDR Threshold, `0`otherwise.                                |
    | `combined_fdr`                              | Combined FDR-adjusted p-value                                                                                                               |
  </Tab>
</Tabs>

## Recommended parameters

Select your workflow. Read depth recommendations and supported pre-processing methods differ by data type; the analysis parameters are otherwise consistent.

<Tabs>
  <Tab title="Kepler - Host-Agnostic Taxonomic Profiling (WGS)">
    | Parameter                                                      | Recommended value                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
    | :------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | Analysis Metric                                                | `relative_abundance`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
    | Taxonomic Rank                                                 | `species`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
    | Data Table Pre-processing Method                               | <ul><li>`raw` if samples have comparable read depths</li><li>`filter` if a few samples have notably lower read depth than the rest of the cohort</li><li>`rarefaction` to standardize the whole cohort to a common read depth</li></ul> <Icon icon="warning" /> If read depth is systematically higher in one group, standardize it with `filter` or `rarefaction` before testing prevalence. Deeper samples detect more features, so the difference may be technical. Check depth per group in the [Rarefaction module](/DAP_docs/rarefaction-on-the-dap). |
    | Read Depth                                                     | <ul><li>With `rarefaction`, use the [Rarefaction module](DAP_docs/rarefaction-on-the-dap) to choose the optimal depth.</li><li>With `filter`, choose a threshold that removes only the samples with notably lower depth than the rest of the cohort. Use the [Rarefaction module](DAP_docs/rarefaction-on-the-dap) retention plot helps identify them.</li></ul>                                                                                                                                                                                            |
    | Rarefaction Seed                                               | `42` (default)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
    | Feature Relative Abundance Threshold                           | `0.001`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
    | Feature Prevalence Threshold                                   | <ul><li>Testing differential abundance: `0.05` to `0.1`</li><li>Testing differential prevalence: `0.01`</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                           |
    | Grouping Variable                                              | Biologically or technically relevant metadata column.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
    | Drop samples with missing metadata values in grouping variable | ✅                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
    | Differential Prevalence Test                                   | <ul><li>Standard choice: `fisher`, exact and reliable on small counts</li><li>More power on a 2x2 comparison: `boschloo` or `barnard`, at higher computational cost</li></ul>                                                                                                                                                                                                                                                                                                                                                                               |
    | Diff. Prevalence FDR Threshold                                 | <ul><li>Standard: `0.05`</li><li>Exploratory: `0.1`</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
    | Differential Abundance Test                                    | <ul><li>Independent groups: `mannwhitney`</li><li>Paired or matched samples: `wilcoxon`</li></ul> <Icon icon="warning" /> Select the test that matches your design rather than all of them.                                                                                                                                                                                                                                                                                                                                                                 |
    | Diff. Abundance FDR Threshold                                  | <ul><li>Standard: `0.05`</li><li>Exploratory: `0.1`</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
    | Kruskal-Wallis p-value Threshold                               | `0.05`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
    | Max Figures to Display                                         | <ul><li>Concise report: `1` to `5`</li><li>Exploratory review: `10` to `20`</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
  </Tab>

  <Tab title="CHAMP - Human Taxonomic Profiling (WGS)">
    | Parameter                                                      | Recommended value                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
    | :------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | Analysis Metric                                                | `relative_abundance`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
    | Taxonomic Rank                                                 | `species`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
    | Data Table Pre-processing Method                               | <ul><li>`raw` if samples have comparable read depths</li><li>`filter` if a few samples have notably lower read depth than the rest of the cohort</li><li>`rarefaction` to standardize the whole cohort to a common read depth</li></ul> <Icon icon="warning" /> If read depth is systematically higher in one group, standardize it with `filter` or `rarefaction` before testing prevalence. Deeper samples detect more features, so the difference may be technical. Check depth per group in the [Rarefaction module](/DAP_docs/rarefaction-on-the-dap). |
    | Read Depth                                                     | <ul><li>With `rarefaction`, use the [Rarefaction module](DAP_docs/rarefaction-on-the-dap) to choose the optimal depth. Any sample below the chosen depth is discarded, so the depth sets a trade-off between depth and sample size.</li><li>With `filter`, choose a threshold that removes only the samples with notably lower depth than the rest of the cohort. Use the [Rarefaction module](DAP_docs/rarefaction-on-the-dap) retention plot helps identify them.</li></ul>                                                                               |
    | Rarefaction Seed                                               | `42` (default)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
    | Feature Relative Abundance Threshold                           | `0.0001`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
    | Feature Prevalence Threshold                                   | <ul><li>Testing differential abundance: `0.05` to `0.1`</li><li>Testing differential prevalence: `0.01`</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                           |
    | Grouping Variable                                              | Biologically or technically relevant metadata column.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
    | Drop samples with missing metadata values in grouping variable | ✅                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
    | Differential Prevalence Test                                   | <ul><li>Standard choice: `fisher`, exact and reliable on small counts</li><li>More power on a 2x2 comparison: `boschloo` or `barnard`, at higher computational cost</li></ul>                                                                                                                                                                                                                                                                                                                                                                               |
    | Diff. Prevalence FDR Threshold                                 | <ul><li>Standard: `0.05`</li><li>Exploratory: `0.1`</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
    | Differential Abundance Test                                    | <ul><li>Independent groups: `mannwhitney`</li><li>Paired or matched samples: `wilcoxon`</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
    | Diff. Abundance FDR Threshold                                  | <ul><li>Standard: `0.05`</li><li>Exploratory: `0.1`</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
    | Kruskal-Wallis p-value Threshold                               | `0.05`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
    | Max Figures to Display                                         | <ul><li>Concise report: `1` to `5`</li><li>Exploratory review: `10` to `20`</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
  </Tab>

  <Tab title="16S SR Amplicon Classification - Taxonomic">
    | Parameter                                                      | Recommended value                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
    | :------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | Analysis Metric                                                | `relative_abundance`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
    | Taxonomic Rank                                                 | `genus`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
    | Data Table Pre-processing Method                               | <ul><li>`raw` if samples have comparable read depths</li><li>`filter` if a few samples have notably lower read depth than the rest of the cohort</li><li>`rarefaction` to standardize the whole cohort to a common read depth</li></ul> <Icon icon="warning" /> If read depth is systematically higher in one group, standardize it with `filter` or `rarefaction` before testing prevalence. Deeper samples detect more features, so the difference may be technical. Check depth per group in the [Rarefaction module](/DAP_docs/rarefaction-on-the-dap). |
    | Read Depth                                                     | <ul><li>With `rarefaction`, use the [Rarefaction module](DAP_docs/rarefaction-on-the-dap) to choose the optimal depth. Any sample below the chosen depth is discarded, so the depth sets a trade-off between depth and sample size.</li><li>With `filter`, choose a threshold that removes only the samples with notably lower depth than the rest of the cohort. Use the [Rarefaction module](DAP_docs/rarefaction-on-the-dap) retention plot helps identify them.</li></ul>                                                                               |
    | Rarefaction Seed                                               | `42` (default)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
    | Feature Relative Abundance Threshold                           | `0.001`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
    | Feature Prevalence Threshold                                   | <ul><li>Testing differential abundance: `0.05` to `0.1`</li><li>Testing differential prevalence: `0.01`</li></ul> <Icon icon="comment-alt-exclamation" /> Short-read 16S carries spurious rare ASVs, so `0` is rarely appropriate.                                                                                                                                                                                                                                                                                                                          |
    | Grouping Variable                                              | Biologically or technically relevant metadata column.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
    | Drop samples with missing metadata values in grouping variable | ✅                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
    | Differential Prevalence Test                                   | <ul><li>Standard choice: `fisher`, exact and reliable on small counts</li><li>More power on a 2x2 comparison: `boschloo` or `barnard`, at higher computational cost</li></ul>                                                                                                                                                                                                                                                                                                                                                                               |
    | Diff. Prevalence FDR Threshold                                 | <ul><li>Standard: `0.05`</li><li>Exploratory: `0.1`</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
    | Differential Abundance Test                                    | <ul><li>Independent groups: `mannwhitney`</li><li>Paired or matched samples: `wilcoxon`</li></ul> <Icon icon="warning" /> Select the test that matches your design rather than all of them.                                                                                                                                                                                                                                                                                                                                                                 |
    | Diff. Abundance FDR Threshold                                  | <ul><li>Standard: `0.05`</li><li>Exploratory: `0.1`</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
    | Kruskal-Wallis p-value Threshold                               | `0.05`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
    | Max Figures to Display                                         | <ul><li>Concise report: `1` to `5`</li><li>Exploratory review: `10` to `20`</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
  </Tab>

  <Tab title="16S LR Amplicon profiling - Taxonomic">
    | Parameter                                                      | Recommended value                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
    | :------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | Analysis Metric                                                | `relative_abundance`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
    | Taxonomic Rank                                                 | `species`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
    | Data Table Pre-processing Method                               | <ul><li>`raw` if samples have comparable read depths</li><li>`filter` if a few samples have notably lower read depth than the rest of the cohort</li><li>`rarefaction` to standardize the whole cohort to a common read depth</li></ul> <Icon icon="warning" /> If read depth is systematically higher in one group, standardize it with `filter` or `rarefaction` before testing prevalence. Deeper samples detect more features, so the difference may be technical. Long-read runs are usually shallower, so check depth per group in the [Rarefaction module](/DAP_docs/rarefaction-on-the-dap). |
    | Read Depth                                                     | <ul><li>With `rarefaction`, use the [Rarefaction module](DAP_docs/rarefaction-on-the-dap) to choose the optimal depth. Any sample below the chosen depth is discarded, so the depth sets a trade-off between depth and sample size.</li><li>With `filter`, choose a threshold that removes only the samples with notably lower depth than the rest of the cohort. Use the [Rarefaction module](DAP_docs/rarefaction-on-the-dap) retention plot helps identify them.</li></ul>                                                                                                                        |
    | Rarefaction Seed                                               | `42` (default)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
    | Feature Relative Abundance Threshold                           | `0.001`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
    | Feature Prevalence Threshold                                   | <ul><li>Testing differential abundance: `0.05` to `0.1`</li><li>Testing differential prevalence: `0.01`</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
    | Grouping Variable                                              | Biologically or technically relevant metadata column.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
    | Drop samples with missing metadata values in grouping variable | ✅                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
    | Differential Prevalence Test                                   | <ul><li>Standard choice: `fisher`, exact and reliable on small counts</li><li>More power on a 2x2 comparison: `boschloo` or `barnard`, at higher computational cost</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                        |
    | Diff. Prevalence FDR Threshold                                 | <ul><li>Standard: `0.05`</li><li>Exploratory: `0.1`</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
    | Differential Abundance Test                                    | <ul><li>Independent groups: `mannwhitney`</li><li>Paired or matched samples: `wilcoxon`</li></ul> <Icon icon="warning" /> Select the test that matches your design rather than all of them.                                                                                                                                                                                                                                                                                                                                                                                                          |
    | Diff. Abundance FDR Threshold                                  | <ul><li>Standard: `0.05`</li><li>Exploratory: `0.1`</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
    | Kruskal-Wallis p-value Threshold                               | `0.05`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
    | Max Figures to Display                                         | <ul><li>Concise report: `1` to `5`</li><li>Exploratory review: `10` to `20`</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
  </Tab>

  <Tab title="Host-Agnostic Functional Profiling (WGS)">
    | Parameter                                                      | Recommended value                                                                                                                                                             |
    | :------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | Analysis Metric                                                | `relative_abundance`                                                                                                                                                          |
    | Taxonomic Rank                                                 | Not applicable                                                                                                                                                                |
    | Data Table Pre-processing Method                               | `raw` only                                                                                                                                                                    |
    | Read Depth                                                     | Not applicable with `raw`                                                                                                                                                     |
    | Rarefaction Seed                                               | Not applicable with `raw`                                                                                                                                                     |
    | Feature Relative Abundance Threshold                           | `0.0001`                                                                                                                                                                      |
    | Feature Prevalence Threshold                                   | <ul><li>Testing differential abundance: `0.05` to `0.1`</li><li>Testing differential prevalence: `0.01`</li></ul>                                                             |
    | Grouping Variable                                              | Biologically or technically relevant metadata column.                                                                                                                         |
    | Drop samples with missing metadata values in grouping variable | ✅                                                                                                                                                                             |
    | Differential Prevalence Test                                   | <ul><li>Standard choice: `fisher`, exact and reliable on small counts</li><li>More power on a 2x2 comparison: `boschloo` or `barnard`, at higher computational cost</li></ul> |
    | Diff. Prevalence FDR Threshold                                 | <ul><li>Standard: `0.05`</li><li>Exploratory: `0.1`</li></ul>                                                                                                                 |
    | Differential Abundance Test                                    | <ul><li>Independent groups: `mannwhitney`</li><li>Paired or matched samples: `wilcoxon`</li></ul>                                                                             |
    | Diff. Abundance FDR Threshold                                  | <ul><li>Standard: `0.05`</li><li>Exploratory: `0.1`</li></ul>                                                                                                                 |
    | Kruskal-Wallis p-value Threshold                               | `0.05`                                                                                                                                                                        |
    | Max Figures to Display                                         | <ul><li>Concise report: `1` to `5`</li><li>Exploratory review: `10` to `20`</li></ul>                                                                                         |
  </Tab>

  <Tab title="CHAMP Functional (GMM, GBM, KEGG)">
    | Parameter                                                      | Recommended value                                                                                                                                                                           |
    | :------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
    | Analysis Metric                                                | `cellular abundance`                                                                                                                                                                        |
    | Taxonomic Rank                                                 | Not applicable                                                                                                                                                                              |
    | Data Table Pre-processing Method                               | `raw` only                                                                                                                                                                                  |
    | Read Depth                                                     | Not applicable with `raw`                                                                                                                                                                   |
    | Rarefaction Seed                                               | Not applicable with `raw`                                                                                                                                                                   |
    | Feature Relative Abundance Threshold                           | `0.0001`                                                                                                                                                                                    |
    | Feature Prevalence Threshold                                   | <ul><li>Testing differential abundance: `0.05` to `0.1`</li><li>Testing differential prevalence: `0.01`</li></ul>                                                                           |
    | Grouping Variable                                              | Biologically or technically relevant metadata column.                                                                                                                                       |
    | Drop samples with missing metadata values in grouping variable | ✅                                                                                                                                                                                           |
    | Differential Prevalence Test                                   | <ul><li>Standard choice: `fisher`, exact and reliable on small counts</li><li>More power on a 2x2 comparison: `boschloo` or `barnard`, at higher computational cost</li></ul>               |
    | Diff. Prevalence FDR Threshold                                 | <ul><li>Standard: `0.05`</li><li>Exploratory: `0.1`</li></ul>                                                                                                                               |
    | Differential Abundance Test                                    | <ul><li>Independent groups: `mannwhitney`</li><li>Paired or matched samples: `wilcoxon`</li></ul> <Icon icon="warning" /> Select the test that matches your design rather than all of them. |
    | Diff. Abundance FDR Threshold                                  | <ul><li>Standard: `0.05`</li><li>Exploratory: `0.1`</li></ul>                                                                                                                               |
    | Kruskal-Wallis p-value Threshold                               | `0.05`                                                                                                                                                                                      |
    | Max Figures to Display                                         | <ul><li>Concise report: `1` to `5`</li><li>Exploratory review: `10` to `20`</li></ul>                                                                                                       |
  </Tab>

  <Tab title="AMR/VF - Functional">
    | Parameter                                                      | Recommended value                                                                                                                                                         |
    | :------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
    | Analysis Metric                                                | `relative_abundance`                                                                                                                                                      |
    | Taxonomic Rank                                                 | Not applicable                                                                                                                                                            |
    | Data Table Pre-processing Method                               | `raw` only                                                                                                                                                                |
    | Read Depth                                                     | Not applicable with `raw`                                                                                                                                                 |
    | Rarefaction Seed                                               | Not applicable with `raw`                                                                                                                                                 |
    | Feature Relative Abundance Threshold                           | `0.0001`, or `0` for binary presence and absence profiles                                                                                                                 |
    | Feature Prevalence Threshold                                   | `0.01` to `0.05`, raised if the table is very sparse                                                                                                                      |
    | Grouping Variable                                              | Biologically or technically relevant metadata column.                                                                                                                     |
    | Drop samples with missing metadata values in grouping variable | ✅                                                                                                                                                                         |
    | Differential Prevalence Test                                   | <ul><li>Sparse or binary profiles: `fisher`, strongly recommended</li><li>More power on a 2x2 comparison: `boschloo` or `barnard`, at higher computational cost</li></ul> |
    | Diff. Prevalence FDR Threshold                                 | <ul><li>Standard: `0.05`</li><li>Exploratory: `0.1`</li></ul>                                                                                                             |
    | Differential Abundance Test                                    | <ul><li>Independent groups: `mannwhitney`</li><li>Paired or matched samples: `wilcoxon`</li></ul>                                                                         |
    | Diff. Abundance FDR Threshold                                  | <ul><li>Standard: `0.05`</li><li>Exploratory: `0.1`</li></ul>                                                                                                             |
    | Kruskal-Wallis p-value Threshold                               | `0.05`                                                                                                                                                                    |
    | Max Figures to Display                                         | <ul><li>Concise report: `1` to `5`</li><li>Exploratory review: `10` to `20`</li></ul>                                                                                     |
  </Tab>
</Tabs>

## Parameter reference

<AccordionGroup>
  <Accordion title="Grouping Variable" icon="table-columns">
    The metadata column that defines the groups to compare. This is the comparison the whole module performs.

    **Options** · Categorical variables from the metadata table associated with the query used to create the analysis

    **Default** · `None`

    **Suggested** · A categorical variable reflecting your biological question, such as `disease status`, `treatment`, `response status`, `body site`, `cohort`, `time point`, or `HIV profile`.
  </Accordion>

  <Accordion title="Drop samples with missing grouping metadata" icon="filter-circle-xmark">
    Whether samples with missing values in the grouping variable are removed from the analysis.

    **Options** · `TRUE` or `FALSE`

    **Default** · `TRUE `
  </Accordion>

  <Accordion title="Differential Prevalence Test" icon="flask">
    One or more tests comparing feature **prevalence** (how often a feature is detected) across groups.

    **Options** · `fisher`, `barnard`, `boschloo`

    **Default** · `fisher`
  </Accordion>

  <Accordion title="Differential Prevalence Tests FDR Threshold" icon="filter">
    The FDR threshold for reporting significant differential-prevalence results after p-value adjustment.

    **Options** · `0.01` to `1.0`, step `0.01`

    **Default** · `0.1`
  </Accordion>

  <Accordion title="Differential Abundance Test" icon="flask">
    The statistical test used to compare alpha-diversity values between groups. Available when a **Grouping Variable** is selected. The right test depends on your study design, in particular whether samples are independent or paired/matched. In addition to the test(s) you choose here, **Kruskal-Wallis (followed by Dunn's post-hoc) is always run and reported**.

    **Options** · `Wilcoxon`, `Mann-Whitney`, `T-test`

    <Note>
      **Which test fits my design?**<br />First ask: *are the same subjects measured in more than one group, or are all subjects different?*

      * **Use** `Mann–Whitney U `**for independent groups.**<br />Example: You compare alpha diversity between 10 treated mice and 10 untreated mice. Each mouse appears in only one group, so values cannot be paired across groups. The groups are independent → `Mann–Whitney U` is appropriate.
      * **Use** `Wilcoxon `**for paired or matched samples.**<br />Example: You compare alpha diversity in the same 10 mice before and after treatment. Each mouse contributes one “before” and one “after” value, so every value has a natural partner from the same animal. The samples are paired → `Wilcoxon` tests the within-subject change.

      **Reminder:** Equal group sizes do **not** make a design paired. Two groups of 10 different mice are still independent, and `Mann–Whitney U` is the correct nonparametric test.
    </Note>
  </Accordion>

  <Accordion title="Differential Abundance Tests FDR Threshold" icon="filter">
    The FDR threshold for reporting significant differential-abundance results after p-value adjustment.

    **Options** · `0.01` to `1.0`, step `0.01`

    **Default** · `0.1`

    **Suggested** · `0.05` for standard analyses; `0.1` for exploratory or small studies; lower for high-dimensional or confirmatory analyses.

    <Note>
      Applied after multiple-testing correction. Lower values give a shorter, more conservative list; higher values increase sensitivity and false positives.
    </Note>
  </Accordion>

  <Accordion title="P-value Threshold" icon="percent">
    A fallback significance cutoff, applied only when there are too few tests for multiple-testing correction to be meaningful. In normal runs, significance is shown as  the  FDR thresholds instead, so this parameter usually has no effect.

    **Options** · `0.01` to `1.0`, step `0.01`

    **Default** · `0.05`
  </Accordion>

  <Accordion title="Max Figures to Display" icon="images">
    The maximum number of feature-level boxplots shown on screen per test.

    **Options** · `0` to `20`, step `1`

    **Default** · `5`

    **Suggested** · `5` for a concise output; `10–20` to inspect more significant results in the interface.
  </Accordion>
</AccordionGroup>
