omics.co.in logo omics.co.in

13: Reproducible Research with Quarto & R Markdown

๐Ÿ“Š Downloadable Lesson R Script 3.7 KB

r13_reproducible_quarto_notebook.R

Automated generation of parameterized Quarto computational notebooks (.qmd), literate programming best practices, and pipeline environment locking via sessionInfo().

$ Rscript r13_reproducible_quarto_notebook.R

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
  1. Immutable Raw Data: Never overwrite raw sequencing reads or primary count matrices.
  2. Set Random Seeds: Explicitly call set.seed() prior to UMAP, t-SNE, or clustering runs.
  3. Locked Dependencies: Commit renv.lock with specific Bioconductor build versions.
  4. Parameterization: Decouple data file paths from analytical algorithms.
  5. Open Code & Data: Deposit scripts to GitHub and raw data to NCBI GEO / SRA.
← Return to Home Hub Scroll to Top ↑