Skip to content
Tech Interview Prep
Technical interview guide

Gene Expression Analysis & RNA-Seq

Quantifying which genes are active and by how much: read counting, normalization, and differential expression testing.

Minutes to read
3
Practice MCQs
25
Interview Q&A
25
Edition
v6
Editorial status
Reviewed

Scope: DESeq2, edgeR, voom, STAR, Salmon, kallisto, featureCounts, tximport and MultiQC source publications; GENCODE, GA4GH and ENCODE guidance reviewed 2026-09-04.

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

Var(K)=μ+αμ2\mathrm{Var}(K) = \mu + \alpha\mu^2 CPM=reads for genelibrary size×106\mathrm{CPM} = \frac{\text{reads for gene}}{\text{library size}} \times 10^6 BH: reject up to the largest i with p(i)≤iN q\text{BH: reject up to the largest } i \text{ with } p_{(i)} \le \frac{i}{N}\,q

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.

RNA extraction and library Reads with strandedness recorded STAR alignment or Salmon quantification featureCounts or tximport integer gene counts Size factors and dispersion trend NB GLM with declared design and contrast Shrunken LFC for ranking BH adjusted p-values

When to use and when not to

SituationDo thisAvoid
Gene-level comparison with 3 or more biological replicates per groupDESeq2 or edgeR on raw integer countsTPM or FPKM as the test input
Claim about one isoformTranscript quantification with bootstrap uncertaintyGene-level p-values read as isoform evidence
Condition fully confounded with batchRedesign or report that the effect is not identifiableBatch correction that hides the confound
Global transcriptional shiftSpike-ins with controlled recoveryMedian-of-ratios size factors that absorb the shift
Expression change in a mixed tissueDeconvolution, histology or single-cell dataClaiming regulation within cells
Pilot with 40 hits at 3 vs 3Check power, dispersion and independent validationTrusting the list on the p-value alone

Traps interviewers probe

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.