MarchR is an R package for analyzing large-scale multi-omics datasets with disk-backed storage, built on top of BPCells, and feature-rich ArchR functionality. It provides object-oriented interfaces for managing genomic datasets containing matrices (gene expression, ATAC-seq), fragments (ATAC-seq), and associated metadata.
Alpha release. MarchR is under active development. The API is experimental and may change without a deprecation cycle. Pin a release tag rather than tracking
main, and please report issues.
- R >= 4.4.0
- A C++20-capable compiler (MarchR compiles C++ via Rcpp). On Linux use GCC >= 10 or Clang >= 11; on macOS install the Xcode command-line tools.
- The HDF5 C library, required by BPCells:
# Debian/Ubuntu sudo apt install libhdf5-dev # macOS brew install hdf5
Once the system requirements are available, install MarchR from R:
install.packages(
c("BiocManager", "remotes"),
repos = "https://cloud.r-project.org"
)
options(repos = BiocManager::repositories())
# Alpha build currently requires BPCells main branch
remotes::install_github("bnprks/BPCells/r")
# Installs MarchR and the packages required by the tutorial.
install.packages("uwot") # Upgraded needed for v0.2.0 --> v0.3.0
remotes::install_github("GreenleafLab/MarchR@v0.3.0", upgrade = "never")
# For Alpha-users, you may need to clone this repo and install locally:
# git clone https://github.com/GreenleafLab/MarchR.git ~/software/MarchR
# git -C ~/software/MarchR fetch --tags && git -C ~/software/MarchR checkout v0.3.0
remotes::install_local("~/software/MarchR", upgrade = "never")
# Replace CRAN igraph with development build, which fixes a memory overflow
# in cluster_graph_leiden() on large datasets (igraph PR #2627, not yet on CRAN)
install.packages("igraph", repos = "https://igraph.r-universe.dev")
packageVersion("igraph") # Should be 2.3.3.9040 or later
library(MarchR)
packageVersion("MarchR")The required tutorial stack includes uwot, RcppHNSW, RcppAnnoy,
igraph, Seurat, MASS, patchwork, circlize, and
ComplexHeatmap. Installation may take several minutes when packages need to
be compiled.
Depending on your Linux/Ubuntu installation, you may not have certain required libraries. Run the following:
sudo apt update
sudo apt install -y \
r-base r-base-dev build-essential git \
libhdf5-dev libcurl4-openssl-dev libssl-dev libxml2-dev \
libfontconfig1-dev libfreetype6-dev libharfbuzz-dev libfribidi-dev \
libpng-dev libtiff-dev libjpeg-dev
Afterward, run the R installation commands above.
The packages below support analyses outside the hematopoiesis tutorial and are loaded only when those features are used. Install the groups you need.
From CRAN:
install.packages(c(
"harmony", # batch correction / integration
"Rtsne", # t-SNE embeddings
"scattermore", # fast embedding scatter plots
"ggrepel", # non-overlapping plot labels
"ggseqlogo", # motif sequence logos (plot_motif_logo)
"dplyr", "tidyr"
))From Bioconductor:
# install.packages("BiocManager")
BiocManager::install(c(
"chromVAR", "motifmatchr", # TF motif deviations & matching
"TFBSTools", "JASPAR2020", # motif databases
"BSgenome", "Biostrings", # genome sequence access
"BSgenome.Hsapiens.UCSC.hg19", # hg19 reference (swap for your genome)
"GenomicRanges", "IRanges",
"SummarizedExperiment", "S4Vectors"
))From GitHub:
# Curated motif sets used by motif enrichment / chromVAR
remotes::install_github("GreenleafLab/chromVARmotifs")- Peak calling requires MACS
(MACS3 preferred, MACS2 supported) on your
PATH. Install viapip install macs3.
To work on MarchR from a local clone, package_setup_script.R bootstraps a
development environment. Install the system requirements for your platform,
clone the repository, and from its root run:
source("package_setup_script.R")MarchR is built around three main classes:
MarchRProject: Top-level container managing multiple datasets, genome annotations, dimensionality reductions, and analysis resultsMarchRDataset: Single dataset containing aligned matrices, fragments, cell metadata, QC results, and doublet scoresGenome: Reference genome information - chromosome sizes, gene/transcript annotations, blacklist regions
- Getting Started Tutorial - Hematopoiesis scATAC-seq workflow
- Function documentation (WIP)
- GitHub Repository
Until the pkgdown site is published, developers can build and preview the rendered tutorial and function reference locally:
install.packages("pkgdown")
pkgdown::build_site()
pkgdown::preview_site()The first tutorial build downloads the hematopoiesis fragment files and runs the complete analysis.
If you use MarchR in your research, please cite:
Liu E, Abdi I. (2026). MarchR: Multi-Assay Multi-Dataset Disk-Backed Analysis.
R package version 0.3.0. https://github.com/GreenleafLab/MarchR