Skip to content

The Workflow & the Dataset

RNA-seq measures gene expression across the transcriptome. The full workflow runs from raw reads to biological interpretation, and the code in this section starts halfway, at the count matrix.

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 pipelines and STAR & Salmon pages describe it without running it, and the nf-core/rnaseq guide runs it on a real dataset. From QC onward, every page runs its code on the count matrix.

A differential expression analysis rests on four decisions that are settled before any code runs: the number of biological replicates, the sequencing depth, the library type and the read length. The experimental design page covers the first three, and What is RNA-seq covers read length and paired-end reads.

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.

The count object comes from Michael Love’s airway 1.32.0 data package, which declares LGPL. It represents the Himes and colleagues experiment, deposited as GSE52778 and SRP033351. The source and license notice identifies the original object. This lesson derives its summaries and analysis results from that 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.

Himes and colleagues, 2014 report the experiment that supplies the airway dataset.

Love, Huber, and Anders, 2014 describe the DESeq2 count model and its shrinkage of dispersion and fold change estimates.

The airway dataset vignette identifies the eight samples and their donor and treatment metadata. It is the source record for the count object used across this section.

The Bioconductor RNA-seq workflow connects count preparation, exploratory plots, and a paired differential-expression model. It explains how the same sample metadata carry through those stages.