English | 中文
—— An end-to-end walkthrough from count matrix to functional enrichment, on the public airway dataset
—— 2024.12.01
A reproducible pipeline for RNA-seq downstream analysis: starting from a gene count matrix and working through quality control, differential expression, and functional / pathway enrichment.
To keep the example realistic without exposing any unpublished data, the repo uses the public dataset airway as its demo input:
- Source: Himes et al. 2014 (PLoS ONE), GEO accession GSE52778
- Content: whole-transcriptome RNA-seq of 4 human airway smooth muscle (ASM) cell lines, dexamethasone (a glucocorticoid) treated vs. untreated — 8 samples in total
- Question: which genes and pathways does the glucocorticoid regulate in airway smooth muscle?
01_QC → 02_DEGs → 03_ID_Conversion → 04_GO_Enrichment → 05_KEGG_Enrichment → 06_Enrichment_Network → 07_GSEA
A single main line running from the raw count matrix through differential expression to GO / KEGG / GSEA enrichment.
| Stage | Description |
|---|---|
| 01_QC | Sample-level PCA for exploratory QC (2D / 3D) |
| 02_DEGs | DESeq2 differential expression + volcano / MA plots |
| 03_ID_Conversion | Gene ID conversion (Ensembl → Entrez / Symbol) |
| 04_GO_Enrichment | GO enrichment + bar plot / chord diagram |
| 05_KEGG_Enrichment | KEGG pathway enrichment + bubble chart |
| 06_Enrichment_Network | Functional network from GO / KEGG results |
| 07_GSEA | GSEA gene-set enrichment (KEGG + GO) |
| Setup.md | R version & package installation |
| prepare_example_data.R | Generate the starting inputs (count matrix + sample metadata) |
Result figures for each stage are shown in that stage's README.
① Install dependencies (see Setup.md; the airway data package is also needed)
BiocManager::install("airway")② Generate the starting data — run prepare_example_data.R. It exports airway as a control/treated-labelled count matrix and sample table into the input/ folders of 01_QC and 02_DEGs.
③ Run stage by stage — from 01_QC onward, run each stage's scripts in order. Along the main line, each step's output feeds the next (downstream scripts already read the previous stage's output/). Every script writes to its own output/ (PDF / CSV) and figures/ (PNG).
Paths: the scripts use absolute paths, defaulting to the repo at
C:\Users\Lamarck\Desktop\001_RNAseq_Downstream_Pipeline. To move the repo or switch machines, just edit the path prefix in the config block (# ==== 用户配置 ====) at the top of each script.
Every plotting script exports both a PDF (to output/) and a PNG (to figures/) — the PNG is what each stage's README embeds. The one exception is 01_QC/PCA_3D.R, which produces an interactive HTML.
The demo data is the published airway dataset (Himes et al., PLoS ONE 2014; GSE52778), distributed through Bioconductor and free for research and teaching. It is used here purely to demonstrate the method; the repo contains no unpublished raw data.