RNA-seq Overview
RNA-seq measures gene expression across the transcriptome. The full workflow runs from raw reads to biological interpretation. This section owns the second half, everything from a count matrix onward.
The workflow
Section titled “The workflow”Raw reads (FASTQ) Quality control Alignment or pseudoalignment QuantificationCount matrix (genes by samples) Normalization Differential expression Pathway analysisBiological interpretationQuality control through quantification is pipeline work. The nf-core/rnaseq guide runs that part on a real dataset. This section begins at the count matrix.
Experimental design
Section titled “Experimental design”A differential expression analysis rests on four decisions that are settled before any code runs.
| Decision | Guideline |
|---|---|
| Biological replicates | at least 3 per condition, 6 or more preferred |
| Sequencing depth | 20 to 30 million reads for differential expression |
| Library type | poly-A, total RNA, or stranded |
| Read length | 50 to 150 bp, paired-end preferred |
Library preparation
Section titled “Library preparation”| Method | Captures | Use case |
|---|---|---|
| Poly-A selection | mRNA only | standard gene expression |
| Ribo-depletion | all RNA minus rRNA | non-coding RNA, degraded samples |
| Stranded | preserves strand info | antisense transcription, overlapping genes |
About 20 percent of genes overlap a gene on the opposite strand, and an unstranded library cannot say which strand a read came from. Those genes are quantified ambiguously. A stranded library resolves them.
The airway dataset
Section titled “The airway dataset”The running example is the airway dataset from Himes et al. 2014, RNA-seq of human
airway smooth muscle cells treated with dexamethasone, a synthetic glucocorticoid. It
ships as a Bioconductor RangedSummarizedExperiment, so counts and sample metadata
arrive in one object.
library(DESeq2)library(airway)
# Load the dataset.data(airway)
# The object: genes by samples, with assays and metadata.airway
# Dimensions: rows are genes, columns are samples.dim(airway)class: RangedSummarizedExperimentdim: 63677 8metadata(1): ''assays(1): countsrownames(63677): ENSG00000000003 ENSG00000000005 ... ENSG00000273492 ENSG00000273493rowData names(10): gene_id gene_name ... seq_coord_system symbolcolnames(8): SRR1039508 SRR1039509 ... SRR1039520 SRR1039521colData names(9): SampleName cell ... Sample BioSample[1] 63677 8The eight samples are four untreated controls and four treated with dexamethasone, paired by cell line.
# Sample metadata.col_data <- as.data.frame(colData(airway))col_data[, c("cell", "dex", "albut")] cell dex albutSRR1039508 N61311 untrt untrtSRR1039509 N61311 trt untrtSRR1039512 N052611 untrt untrtSRR1039513 N052611 trt untrtSRR1039516 N080611 untrt untrtSRR1039517 N080611 trt untrtSRR1039520 N061011 untrt untrtSRR1039521 N061011 trt untrtThe cell column holds the donor cell line, dex the treatment, and albut the
albuterol status. Because each cell line is measured untreated and treated, the
differential expression model can account for the pairing. The next page covers the
nf-core pipelines that turn reads into this matrix.