Each of 2,000 simulated genes gets a baseline expression level and, for ~15% of them, a real ("ground truth") log₂ fold-change between a control and treatment condition. n independent replicate measurements per group are drawn with per-gene biological noise that shrinks as baseline expression rises — the same mean–variance trend real RNA-seq count data shows (low-count genes are noisier).
For every gene a Welch two-sample t-test is computed from the simulated replicates, evaluated exactly via the regularized incomplete beta function:
t = (x̄_B − x̄_A) / √(s²_A/n_A + s²_B/n_B)
ν = (s²_A/n_A + s²_B/n_B)² / [ (s²_A/n_A)²/(n_A−1) + (s²_B/n_B)²/(n_B−1) ]
p = I_{ν/(ν+t²)}(ν/2, 1/2) (regularized incomplete beta — exact two-tailed t p-value)
Testing 2,000 genes at once means some will look "significant" by chance alone. The Benjamini-Hochberg procedure controls the false discovery rate: sort all p-values ascending, find the largest rank i where p₍ᵢ₎ ≤ (i/m)·α, and call every gene at or below that rank significant. Points spring-settle to their new volcano-plot position each time the experiment is resampled or the significance calls change — a damped-oscillator integrator (semi-implicit Euler on v += (k·Δx − c·v)·dt), not a plain fade, so genes crossing the significance boundary visibly ease into their new spot.
- Replicates (n) — more replicates shrink the standard error, raising statistical power to detect real effects.
- log₂FC cutoff — the volcano plot's horizontal "no small effects" gate; a gene must clear both the fold-change and FDR bars to be called.
- FDR threshold (α) — the accepted rate of false discoveries among everything called significant; raising it calls more genes but admits more false positives.
- True positive rate / observed FDR — because this simulation knows which genes were truly perturbed, it can score itself: TPR = correctly-called ÷ all true DE genes; observed FDR = false calls ÷ all calls.
Real pipelines (DESeq2, edgeR) go further — modelling counts as negative-binomial and sharing variance information across genes (empirical Bayes shrinkage) — but the fold-change / significance / multiple-testing logic visualised here is exactly the core of every RNA-seq differential expression analysis.