> 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/upstream-regulator-analysis.md).

# Upstream Regulator Analysis

{% hint style="info" %}
**Which upstream regulators have an unexpectedly large number of known targets in my molecular signature?** Upstream Regulator Analysis (URA) moves from a list of changed genes or molecular features to the regulators that may best explain the observed pattern — highlighting transcription factors, signaling regulators, drugs, and other regulatory entities connected to the submitted features.
{% endhint %}

### How it works

1. **Provide the signal.** Upload the features you want to investigate and the background your assay could have detected. If the upload includes significance values, choose the cutoff for this run.
2. **Test regulators.** The inference compares each regulator's known targets with your signature, relative to the measured background.
3. **Review evidence.** Explore ranked regulators, overlapping targets, statistical values, direction fields where supported, knowledge sources, publications, and a network view.

### Example input and output

**Feature table**

```csv
entity,effect,adj_p_value
IL1B,1.42,0.003
CXCL8,1.18,0.006
NFKBIA,0.91,0.012
JUN,-0.76,0.018
HMOX1,0.72,0.021
```

**Background and run settings**

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

**Result**

| Regulator     | Result group | Overlapping targets      | q-value | Direction       |
| ------------- | ------------ | ------------------------ | ------- | --------------- |
| RELA          | gene         | IL1B, CXCL8, NFKBIA, JUN | 0.008   | Activated       |
| MAPK14        | gene         | IL1B, JUN, HMOX1         | 0.031   | Inconclusive    |
| Dexamethasone | chemical     | IL1B, CXCL8, NFKBIA      | 0.044   | not\_computable |

> RELA has four known targets in the submitted signature and is significant within the gene-regulator family. The chemical row belongs to a separately corrected family and should not be globally ranked against the gene rows.

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

### How the result is organized

Regulators are reported in separate gene, chemical, and other groups. Each group receives its own multiple-testing correction. This makes gene results easier to interpret and prevents growth in a chemical knowledge source from silently changing gene q-values.

* **p-value:** how surprising the observed overlap is under the run's measured background.
* **q-value:** the p-value adjusted for the regulator family in that result group.
* **Overlap:** the submitted features that are known targets of the regulator.
* **Direction:** an activation-oriented call — `Activated`, `Inhibited`, or `Inconclusive` — when the submitted effects and regulatory evidence support it; `Biased` when dataset skew rules out a reliable call; `not_computable` when there is not enough signed evidence. A regulator without a direction call keeps its enrichment result.
* **Evidence:** the knowledge sources and available publications behind the regulator–target relationships.

### What makes the statistics trustworthy

* **The query is explicit.** The inference tests the narrowed signature, not an entire measurement table by accident.
* **The background is experiment-aware.** Only entities that the assay could observe and the tested regulatory network could contain contribute to the statistical universe.
* **Incomplete families are visible.** If the system cannot establish the full hypothesis family, it withholds q-values instead of presenting an overconfident correction.

### Reading the result responsibly

* Compare q-values within a regulator group. Do not merge the gene, chemical, and other tables and treat the union as one jointly controlled 5% result.
* A regulator can rank even when the regulator itself was not measured. URA is designed to find upstream explanations, including regulators activated after transcription.
* Results describe consistency with curated regulatory knowledge; they do not prove causality.
* p-values and q-values are conditioned on this run's measured background and build. They should not be compared directly across different datasets or knowledge-graph builds.

{% hint style="success" %}
**In short:** URA provides a ranked, evidence-linked set of upstream explanations for a molecular signature, while making the tested population, background, multiple-testing scope, and any statistical limitations visible in the result.
{% endhint %}

Next: [Toxicity Endpoint Analysis](/getting-started/inference-algorithms/toxicity-endpoint-analysis.md).
