> For the complete documentation index, see [llms.txt](https://docs.owkin.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.owkin.com/explore-and-analyse-data/data-analysis/general-purpose/differential-expression-t-test.md).

# Differential expression (t-test)

Identify features that differ between two groups using Welch's t-test with false-discovery-rate correction, applied to continuous measurements such as proteomics intensities.

Identify features that differ between two groups using Welch's t-test with false-discovery-rate correction, applied to continuous measurements such as proteomics intensities.

## Welch's t-test DEA (modality-agnostic)

### Description

#### Analysis summary

Identifies features — for example proteins — whose continuous measurement differs between two groups, ranking them by a two-sample test that does not assume equal variances.

#### Computation

A continuous value per (sample, feature) is optionally log-transformed, then each feature is tested with Welch's two-sample t-test, which compares the two groups' means without assuming equal variances. P-values are corrected across features with the Benjamini-Hochberg false-discovery-rate procedure, and each feature gets an effect size (difference of the group means on the transformed scale, positive = higher in the first group). Features with too many missing values, or too few non-missing samples in either group, are dropped before testing. The results table carries one row per feature with the effect size, raw and adjusted p-value and a significance label naming the group each feature is higher in.

#### When to use

Continuous per-(sample, feature) measurements with exactly two groups, of any modality — e.g. proteomics intensities. Use bulk\_dea for raw RNA-seq counts.

#### Caveats

Exactly two groups are supported. The test assumes roughly normal, unpaired distributions on the transformed scale; strongly skewed or zero-inflated data can distort p-values. Corrected significance does not imply a large effect — read significance and effect size together. The full feature set must be passed in so the correction is computed over all features. The result depends on the transform chosen and the per-group sample counts.

### Example questions

<details>

<summary><code>example questions</code></summary>

* Proteomics differential expression analysis between two groups (Welch's t-test)

</details>

### Input columns

<details>

<summary><code>input columns</code></summary>

| column      | type        | required | description                                                                                                                                                      |
| ----------- | ----------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| index       | any         | required | Sample identifier — one row per (sample, feature) in the long-form input.                                                                                        |
| value       | numeric     | required | Continuous measurement per (sample, feature). Must be positive and finite. Apply `log_transform='log2'` for unscaled positive inputs (caller must ensure value … |
| gene\_name  | categorical | required | Feature identifier — gene or protein name. Drives the volcano plot's hover and labels. Do NOT filter to a subset in WHERE — the full per-feature table is neede… |
| y\_group    | categorical | required | Contrast variable — clinical/metadata column defining exactly two groups to compare. The SQL query MUST produce exactly 2 distinct values; >2 raises AnalysisRu… |
| patient\_id | any         | required | Patient identifier — used to count unique patients in the stats summary.                                                                                         |

</details>

### Visualizations

* `volcano` How to read: Each dot is one feature (e.g. a protein). Horizontal position is the effect size — right of centre means higher in the first arm of the contrast, left means higher in the second; vertical position is significance as -log10 adjusted p-value, so higher is more significant. Dotted lines mark the significance cut-offs on both axes. Red dots are features significantly higher in the first arm, blue in the second, grey not significant. The most significant features are labelled (plus any explicitly highlighted ones), and hovering a dot shows its effect size, mean in the positive group, raw p-value and adjusted p-value.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.owkin.com/explore-and-analyse-data/data-analysis/general-purpose/differential-expression-t-test.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
