R for Bioinformatics: Bioconductor, tidyverse, and ggplot2

Bioconductor · SummarizedExperiment · limma · DESeq2 · tidyverse · ggplot2

Published 2026 · Last updated 2026-09-27 · Hailu Zhou

R remains the default language of statistical genomics for a simple reason: the methods community publishes its primary implementations here first. If you want the reference implementation of a differential-expression method, an annotation package, or a class designed by the people who defined the data standard, you usually get it on Bioconductor, not elsewhere. Python has caught up in single-cell and deep learning, but for bulk omics statistics and publication figures, R is still where the field agrees.

Why Bioconductor is a standard, not a package

Bioconductor is not one library; it is a curated ecosystem with a release cadence tied to R versions and its own review process for new packages 1. That curation matters. Packages must pass checks, document their methods, and interoperate through shared S4 classes. The payoff is that a SummarizedExperiment handed to you by one package is the same object another package expects, so you stop writing glue code for every new tool. It also has a proper infrastructure paper describing the design principles behind the shared data containers and annotation resources 2.

SummarizedExperiment: the container you should default to

A SummarizedExperiment holds an assay matrix (genes by samples, say), a rowData table describing features, a colData table describing samples, and optional metadata. The key discipline it enforces is that samples are rows in colData and columns in the assay — they move together under subsetting, so you cannot accidentally drop a genotype label while slicing out a batch. Once you internalise this, most of your pipeline is wrangling colData and adding assays rather than tracking parallel vectors that drift out of sync.

Differential expression: limma and DESeq2

For microarray and, increasingly, RNA-seq counts that have been transformed and quality-weighted, limma with its empirical Bayes moderation of variances remains the workhorse 3. Its linear-model interface — a design matrix plus contrasts — scales from a two-group comparison to complex factorial or time-course designs without new code. For raw counts in a negative-binomial framework, DESeq2 provides shrinkage of fold changes and dispersion estimates, plus a stable variance-stabilising transform for downstream clustering and PCA 4. The two are not competitors so much as different likelihood models; pick by data type and study design.

Wrangling with tidyverse without breaking the biology

The tidyverse gives R a coherent grammar for data manipulation: dplyr for verbs, tidyr for reshaping, purrr for iteration over lists of results 5. The productive pattern is to keep the statistical objects in Bioconductor classes, extract tidy tibbles at the boundaries (differential results, sample metadata, pathway annotations), do all reshaping there, and only convert back when a plotting or modelling function demands a matrix.

Publication-quality figures with ggplot2

The grammar of graphics means a figure is a specification: data, an aesthetic mapping, and layers 6. That abstraction is what makes reproducible figures possible — you can reuse one theme across dozens of plots and change dimensions without touching the plotting code. The practical rules that matter most: set a consistent colour scale with scale_fill_viridis or a colourblind-safe palette, use facets instead of hand-stitched multi-panel layouts, and export with ggsave at explicit size and DPI so reviewers get vector PDFs at the intended aspect ratio rather than rescaled screenshots.

Reproducibility: pinning the ecosystem

R dependencies rot faster than most. Between one Bioconductor release and the next, APIs shift, and a script that worked last semester can fail silently on updated statistics. Pin your environment. Record R and package versions explicitly, and use BiocManager to install against a specific Bioconductor release rather than whatever is current. Container images are the most reliable route; a lockfile is the minimum. Reproducible code is also the foundation of the analysis infrastructure that makes computational results auditable rather than anecdotal 7.

Where R still wins, and where it does not

R wins at statistically sophisticated, small-to-medium data: bulk differential expression, linear mixed models, survival analysis, and the figure layer that ends up in the paper. It loses when you need heavy string or network I/O, large-scale deep learning, or production services. The pragmatic architecture is R for statistics and figures, Python (or shell) for data movement and computation, and a shared, version-controlled intermediate format — BED, TSV, or HDF5 — as the contract between them. If you are working with single-cell data at scale, note that the Python ecosystem has its own mature analysis toolkit, and the honest answer is to use whichever community maintains the method you need 8.

Getting started without drowning

Install R and RStudio, then BiocManager::install() your first packages. Build one small end-to-end pipeline: counts to SummarizedExperiment, DESeq2 to results, dplyr to filter, ggplot2 to a volcano plot and a PCA. Read the vignettes — Bioconductor documentation is unusually good and underused. Do not try to learn the whole ecosystem first; learn the one container, the two or three statistics packages your field uses, and the figure grammar. The rest is searchable the day you need it.

References

  1. Gentleman RC, Carey VJ, Bates DM, et al. Bioconductor: open software development for computational biology and bioinformatics. Genome Biol. 2004;5(10):R80.
  2. Huber W, Carey VJ, Gentleman R, et al. Orchestrating high-throughput genomic analysis with Bioconductor. Nat Methods. 2015;12(2):115-121.
  3. Ritchie ME, Phipson B, Wu D, et al. limma powers differential expression analyses for RNA-sequencing and microarray studies. Nucleic Acids Res. 2015;43(7):e47.
  4. Love MI, Huber W, Anders S. Moderated estimation of fold change and dispersion for RNA-seq data with DESeq2. Genome Biol. 2014;15(12):550.
  5. Wickham H, Averick M, Bryan J, et al. Welcome to the Tidyverse. J Open Source Softw. 2019;4(43):1686.
  6. Wickham H. ggplot2: Elegant Graphics for Data Analysis. 2nd ed. New York: Springer; 2016.
  7. Sandve GK, Nekrutenko A, Taylor J, Hovig E. Ten simple rules for reproducible computational research. PLoS Comput Biol. 2013;9(10):e1003285.
  8. Wolf FA, Angerer P, Theis FJ. SCANPY: large-scale single-cell gene expression data analysis. Genome Biol. 2018;19(1):15.