Lesson 13 of 13 · 10 min
Wrap-up and Where to Go Next
Across this course you went from raw FASTQ files to a ranked list of differentially expressed genes and the biological pathways they light up. This final lesson stitches that pipeline back together, shows how to make every step reproducible, and points you toward the analyses that build on it.
From Reads To Biology
The arc is always the same. You check read quality with FastQC and MultiQC, trim adapters and low-quality bases, then quantify expression one of two ways: quasi-map to the transcriptome with Salmon and import its transcript-level counts with tximport, or align to the genome with STAR and count reads per gene with featureCounts. Either route gives you a count matrix that you test for differential expression with DESeq2 or edgeR, before interpreting the hits through GO and pathway enrichment with clusterProfiler or fgsea. The rest of this lesson turns those one-off commands into a scripted workflow, driven by a manager like Snakemake or Nextflow so the whole pipeline reruns from a single command.
Script The Workflow
rule salmon_quant:
input:
r1="reads/{sample}_R1.fastq.gz",
r2="reads/{sample}_R2.fastq.gz",
index="index/salmon",
output:
"quant/{sample}/quant.sf",
threads: 8
conda:
"envs/rnaseq.yaml"
shell:
"salmon quant -i {input.index} -l A "
"-1 {input.r1} -2 {input.r2} "
"-p {threads} --gcBias --seqBias "
"-o quant/{wildcards.sample}"Pin Tools With Conda
conda create -n rnaseq -c conda-forge -c bioconda \
salmon=1.10.3 star=2.7.11b subread=2.0.6 samtools=1.21 \
fastqc=0.12.1 multiqc=1.25 snakemake-minimal=8.20.3 -y
conda activate rnaseq
conda env export --no-builds > envs/rnaseq.yamlReuse And Extend
nextflow run nf-core/rnaseq -r 3.14.0 \
-profile docker \
--input samplesheet.csv \
--outdir results \
--genome GRCh38 \
--aligner star_salmonYou do not need to generate your own reads to keep practicing. The Gene Expression Omnibus (GEO) and its linked Sequence Read Archive (SRA) host thousands of published studies whose raw data you can pull with sra-tools and push straight through nf-core/rnaseq, and from there the field branches out toward single-cell RNA-Seq for per-cell resolution, transcript- and isoform-level testing for alternative splicing, and batch correction for when you combine datasets from different labs or sequencing runs.
# one run from the airway study SRP033351
prefetch SRR1039508
fasterq-dump SRR1039508 --split-files --threads 8 --outdir fastq/
gzip fastq/SRR1039508_1.fastq fastq/SRR1039508_2.fastqTry it yourself: prefetch the airway dataset (GEO series GSE52778, SRA study SRP033351), quantify the untreated versus dexamethasone-treated samples with your pinned Salmon, and confirm that glucocorticoid-response genes such as DUSP1 and PER1 surface when you run DESeq2 with cell line in the design (~ cell + dex).