> For the complete documentation index, see [llms.txt](https://docs.mithrl.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mithrl.com/getting-started/inference-algorithms/toxicity-endpoint-analysis.md).

# Toxicity Endpoint Analysis

{% hint style="info" %}
**Which toxicity endpoints are over-represented in my molecular signature?** Toxicity Endpoint Analysis (Tox) connects a molecular signature to curated toxicity endpoints and surfaces the genes, evidence, directional context, and endpoint overlap behind each result. The inference tests 26 curated endpoints against the background your experiment could observe and can add reference-compound direction where signed evidence supports it.
{% endhint %}

### How it works

1. **Provide the experiment.** Upload the selected genes or a feature table that can be narrowed, the assayed background, and a reference compound for directional context.
2. **Test endpoints.** The inference constructs each endpoint's gene set from curated disease, process, and pathway knowledge, then tests the signature overlap.
3. **Review context.** Explore ranked endpoints, p/q-values, contributing genes, evidence, direction when available, and the overlap among endpoint definitions.

### Example input and output

**Feature table**

```csv
entity,effect,adj_p_value
IL1B,1.30,0.003
TNF,1.10,0.005
CASP3,0.85,0.012
NQO1,0.70,0.018
GCLC,0.62,0.024
```

**Background and run settings**

```
Assayed background: 18,432 genes
Reference compound: Acetaminophen
Significance column: adj_p_value
Significance cutoff: ≤ 0.05
Effect column: effect
```

**Result**

| Toxicity endpoint | Overlapping genes            | q-value | Predicted direction | Overlap group |
| ----------------- | ---------------------------- | ------- | ------------------- | ------------- |
| Hepatotoxicity    | IL1B, TNF, CASP3, NQO1, GCLC | 0.004   | increased           | Group A       |
| Inflammation      | IL1B, TNF, CASP3             | 0.021   | increased           | Group A       |
| Oxidative stress  | NQO1, GCLC                   | 0.039   | overlap\_only       | Group B       |

> Hepatotoxicity and inflammation share both genes and an overlap group, so they should be interpreted as related evidence rather than two independent findings. `overlap_only` means the enrichment is reportable but no confident direction call was made.

{% hint style="warning" %}
Illustrative only — names and values above are simplified and fabricated to demonstrate the input and output shape. They are not a toxicity assessment, diagnosis, or biological result.
{% endhint %}

### What the result contains

* **Endpoint name and gene-set size** for each curated toxicity concept.
* **p-value and q-value** relative to the run's measured background and selected endpoint family.
* **Overlapping genes** that connect the submitted signature to the endpoint.
* **Predicted direction** — `increased`, `decreased`, or `overlap_only` — when a reference-compound profile and the measured effects provide enough signed evidence.
* **Knowledge sources and publications** behind the endpoint memberships and reference profile.
* **Endpoint-overlap information** showing which results share much of the same gene evidence.

### Why endpoint overlap is shown

Toxicity concepts are biologically related and can share many genes. For example, organ-toxicity and cell-death endpoints may respond to the same underlying signature. The inference reports a pairwise overlap matrix and groups strongly related endpoints so several significant rows are not automatically mistaken for several independent signals.

* **Static, versioned family.** The default inference tests the same 26 curated endpoints. Any explicit narrowing is validated because changing the family changes every q-value.
* **Experiment-aware background.** Only endpoint genes that the assay could observe contribute to the statistical universe.
* **Direction requires evidence.** If the signed reference profile is incomplete or too thin, the result remains `overlap_only` instead of presenting an unsupported directional score.

### Reading the result responsibly

* Endpoint enrichment means the signature is consistent with a curated toxicity concept; it is not a diagnosis or proof that the compound causes that outcome.
* Highly overlapping endpoints should be interpreted together. The matrix describes dependence; it does not claim that one label is the uniquely correct label.
* Direction depends on the selected reference compound, signed chemical–gene evidence, and measured effect direction. Enrichment and direction answer related but different questions.
* p-values and q-values are specific to the run's signature, background, endpoint map, and knowledge-graph build.

{% hint style="success" %}
**In short:** Tox offers an evidence-linked view of how a molecular signature aligns with curated toxicity endpoints, while exposing overlap and withholding directional or multiple-testing claims when the required evidence is incomplete.
{% endhint %}

Next: [Running and managing Inference](/guides/workflow-cli.md).
