Differential expression¶
Availability
Populations is available on Enterprise accounts. It is hidden on other accounts.
The Differential section compares two saved populations of metacells. The engine fits a linear model on log coverage per metacell with a study fixed effect, a per-gene depth slope and an assay term where both assays are present, and clusters the standard errors on study, because metacells from one study share donor, protocol and library preparation. When the shared studies cannot identify the contrast it estimates the difference at study level instead and says so. Benjamini and Hochberg correction runs over every tested gene.
The page is verdict first. The comparison reports one of five verdicts before any number, and the verdict decides what the rest of the page may present:
| verdict | what it means |
|---|---|
| A calibrated list you can use | both populations were measured the same way, the list survives removing one study at a time, and shuffling the labels produces far fewer genes than the real contrast |
| Not enough data to answer | one or both populations are too small to separate a real difference from noise; only direction and effect size are reported |
| The populations differ by measurement | genes that cannot differ move together, so the fold changes describe a protocol difference |
| No evidence beyond the studies | shuffling the label inside the studies reproduces the observed list |
| The genes do not survive study removal | removing one study at a time changes which genes are called |
Only the first verdict supports a gene list used for a downstream decision.
Running a comparison¶
- Select at least two populations in the rail.
- Choose Population A (reference) and Population B, or use the swap button.
- Select Run comparison.
A full comparison fits the model, removes each study in turn, then shuffles the labels and refits, so it takes between 10 seconds and 2 minutes on the atlas. The previous result stays on screen, dimmed, while a new run is live.
Reading the result¶
The result opens on one line and a small grid of tiles. Everything longer sits behind a disclosure below the grid, closed until you open it.
- Verdict strip — the verdict word, the genes passing the gate split into up (higher in population A) and down (higher in population B), the model in a few words, and whether the list may be used. The word states the verdict; the colour marks it a second time.
- Tiles — one number each: genes up, genes down, metacells per side, studies holding both populations, stability, genes expected by chance, the false discovery rate, and the median study agreement. A tile that warns (few shared studies, weak calibration, too few cells or studies) is tinted and carries one short line saying what it means.
- Disclosures — closed by default:
- How far this result reaches, How to get an answer or What to do about it — the verdict in one sentence, plus the numbered next step for an underpowered or technical result;
- Model and study overlap — the fitted model, the share of each population that sits in studies holding both conditions, the model rows, and one Studies line that opens the lists of studies holding both populations, only A, or only B;
- What limits this result — the quality flags that fired, housekeeping drift, the global shift and detection depth at a glance, then every row: housekeeping, depth, breadth, assay, and the calibration that says how many genes the same pipeline calls when the labels carry no information. A row out of its limit prints its definition in place; a row inside its limits keeps it behind What this means;
- What was removed and why — every metacell that did not enter the model, counted per population.
- Gene table — the main body of the page. The model gate is an adjusted p below 0.05 and an absolute log2 fold change of at least 1. The table and the volcano both use that gate; the min |log2FC| and max adjusted p inputs only change what is displayed, never what is called, and the footer reports both counts.
- Sign convention — a positive log2 fold change means higher coverage in population A, the reference. A negative value means higher in population B. The value is a log ratio of detected transcript windows, not a fold change in molecules: a window count saturates at the length of the transcript.
- Stability — the number of leave-one-study-out reruns, out of the reruns performed, in which the gene kept the sign of its effect. A gene is stable at 85 percent or more. replicates in is a different number: the share of the studies that hold both populations in which the gene moves with the pooled sign.
- Separation — twice the distance of the area under the rank curve from 0.5. It is rank based, so it does not move with sequencing depth.
- Local FDR, when the engine reports it, is the probability that this particular gene is a false call. It answers a different question from the adjusted p value, which controls the expected share of false calls in the whole list. The definition of every column is behind the small info button in its header.
Table controls and export¶
The table renders 500 rows at a time; Show 500 more appends the next page and the footer always reports how many rows are shown, how many match the display filters, how many the model called and how many genes were tested.
Download table and design writes two files from the current selection:
de-<A>-vs-<B>-genes.csv, the full matched set with the verdict, both population names, the dataset id, the method, the transform and the run time on every row;de-<A>-vs-<B>-design.json, the verdict, the whole design block, the column definitions, the display filters in force and the same provenance.
Pathway enrichment is offered only for a certified list and for the stable genes
of an unstable one, where the run is labelled DE (unstable) A vs B.
Progress and ETA¶
Differential expression can take tens of seconds on large groups. The progress bar shows the stage (for example “Aggregating”, “Size factors”, “Testing genes” or “FDR”), elapsed time and a smoothed estimate of the remaining time. The estimate appears after a few percent of progress and is hidden until it is stable.
Python API¶
Use malva_client.differential_expression(...) with metacell IDs, or
differential_expression_from_cells(...) when starting from cell IDs. See
Python client and analysis API.