Skip to content

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.

Raw reads (FASTQ)
Quality control
Alignment or pseudoalignment
Quantification
Count matrix (genes by samples)
Normalization
Differential expression
Pathway analysis
Biological interpretation

Quality 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.

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
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 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: RangedSummarizedExperiment
dim: 63677 8
metadata(1): ''
assays(1): counts
rownames(63677): ENSG00000000003 ENSG00000000005 ... ENSG00000273492
ENSG00000273493
rowData names(10): gene_id gene_name ... seq_coord_system symbol
colnames(8): SRR1039508 SRR1039509 ... SRR1039520 SRR1039521
colData names(9): SampleName cell ... Sample BioSample
[1] 63677 8

The 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 albut
SRR1039508 N61311 untrt untrt
SRR1039509 N61311 trt untrt
SRR1039512 N052611 untrt untrt
SRR1039513 N052611 trt untrt
SRR1039516 N080611 untrt untrt
SRR1039517 N080611 trt untrt
SRR1039520 N061011 untrt untrt
SRR1039521 N061011 trt untrt

The 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.