13: Reproducible Research with Quarto & R Markdown
Chapter 13: Capstone: Reproducible Research with Quarto & R Markdown
Reproducibility is the foundational currency of modern scientific inquiry. Parameterized computational notebooks authored with Quarto (.qmd) and R Markdown (.Rmd) seamlessly interweave biological narrative, statistical code, and publication figures into self-contained HTML/PDF reports.
1. Anatomy of a Quarto Genomic Notebook
---
title: "Precision Oncology Multi-Omics Report"
author: "Omics Portal Core"
format:
html:
toc: true
code-fold: show
self-contained: true
params:
cohort: "NSCLC_Tumors"
fdr_cutoff: 0.01
---2. Environment Provenance & Package Locking
Recording precise software versions guarantees analysis reproducibility decades later:
# Capture exact session dependencies
sessionInfo()
# Initialize renv for project lockfile
# renv::init()
# renv::snapshot()The 5-Step Computational Biology Reproducibility Audit
- Immutable Raw Data: Never overwrite raw sequencing reads or primary count matrices.
- Set Random Seeds: Explicitly call
set.seed()prior to UMAP, t-SNE, or clustering runs. - Locked Dependencies: Commit
renv.lockwith specific Bioconductor build versions. - Parameterization: Decouple data file paths from analytical algorithms.
- Open Code & Data: Deposit scripts to GitHub and raw data to NCBI GEO / SRA.