Overview
Curated: · Written: · Reviewed:
Gene Expression Analysis & RNA-Seq
In one line
Count reads per gene, normalize for library composition, and test differential expression with a negative binomial model fit to raw integer counts. Reach for it when a condition comparison must rest on a design that can separate the condition from everything else in the experiment.
Key definitions
- Biological replicate: an independent RNA extraction from a separate flask, animal or patient. Libraries split from one extraction are technical replicates and add no independent biology.
- Size factor: the per-sample scaling from DESeq2's median-of-ratios or edgeR's TMM, fitted inside the model.
- Dispersion (alpha): the extra variance beyond Poisson, shrunk toward a mean-dependent trend across genes.
- BH FDR: the expected proportion of false discoveries among the genes you call, not the chance that any one gene is false.
- Confounding: condition and batch share columns of the design, so the model cannot assign the difference to either.
- Shrunken LFC: a fold change pulled toward zero for low-count genes. Use it for ranking and plots; significance comes from the unshrunken test.
Formulas and complexity
How it works
Reads are aligned with a splice-aware aligner such as STAR, or pseudo-aligned with Salmon or kallisto, then summed to genes under explicit strandedness and feature rules. DESeq2 or edgeR fits a negative binomial GLM to the integer counts, with size factors and a dispersion trend borrowed across genes. The design formula sets the coefficients, and you test a declared contrast. BH adjusts the p-values across roughly 20,000 genes.
When to use and when not to
| Situation | Do this | Avoid |
|---|---|---|
| Gene-level comparison with 3 or more biological replicates per group | DESeq2 or edgeR on raw integer counts | TPM or FPKM as the test input |
| Claim about one isoform | Transcript quantification with bootstrap uncertainty | Gene-level p-values read as isoform evidence |
| Condition fully confounded with batch | Redesign or report that the effect is not identifiable | Batch correction that hides the confound |
| Global transcriptional shift | Spike-ins with controlled recovery | Median-of-ratios size factors that absorb the shift |
| Expression change in a mixed tissue | Deconvolution, histology or single-cell data | Claiming regulation within cells |
| Pilot with 40 hits at 3 vs 3 | Check power, dispersion and independent validation | Trusting the list on the p-value alone |
Traps interviewers probe
- Feeding TPM to DESeq2. The negative binomial likelihood needs integer counts. Fix: pass featureCounts output or tximport counts, and use TPM only for within-sample comparison and display.
- Reading FDR 0.05 as a 5% chance a gene is false. Fix: say that about 5% of the called set is expected to be false under repeated use.
- Adding batch when condition is confounded. A rank-deficient design cannot separate the two. Fix: check the design matrix before fitting, and report that the effect cannot be assigned to condition or batch.
- Wrong strandedness flag in counting. Counts for correctly stranded genes drop sharply. Fix: confirm the library protocol, then set the flag and check the assignment rate against the expected value.
- Joining counts to annotation by gene symbol. Symbols duplicate and retire across releases. Fix: join on versioned ENSG IDs and attach symbols as attributes.
Interview tips
Open with the pipeline, not the test: "RNA-seq is a measurement instrument, so I first check what the counts measure: design, library, reference and counting rule, then the model."
Expect these follow-ups:
- Why not TPM for differential expression?
- What do 40 genes at FDR 0.05 with 3 vs 3 replicates tell you?
- How do you handle batch when it is partly confounded with condition?
- Why are transcript-level p-values weaker than gene-level ones?
- What changes if the whole transcriptome shifts?
30-second outline: Design first: replicates are biological, and batch must cross condition. Then the library: strandedness and selection. Then counting: integer gene counts with declared rules. Then the model: negative binomial GLM with dispersion shrinkage and a named contrast. Then the result: BH FDR together with effect size, shrunken for ranking. Close by naming the validation you would run and the confound check you already did.
Feedback on this overview
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.