From f106a4318379890f90709b7bb34c5d774eea33b5 Mon Sep 17 00:00:00 2001 From: erliuu Date: Fri, 4 Dec 2026 02:21:32 -0700 Subject: [PATCH 1/4] docs([md] icon): Add MarchR icon to pkgdown-sites --- README.md | 6 ++++-- _pkgdown.yml | 8 ++++++++ man/figures/MarchR_Icon.svg | 1 + 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 man/figures/MarchR_Icon.svg diff --git a/README.md b/README.md index fbe7dc4..75d8510 100644 --- a/README.md +++ b/README.md @@ -153,6 +153,8 @@ failed, the full error, and the output of `sessionInfo()`. 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 1.0.0. https://github.com/GreenleafLab/MarchR +Liu ESX, Abdi I, Corces MR, Greenleaf WJ (2026). MarchR: Multi-Assay Multi-Dataset +Disk-Backed Analysis. R package version 1.0.0. https://greenleaflab.github.io/MarchR/ ``` + +Run `citation("MarchR")` in R for the BibTeX entry. diff --git a/_pkgdown.yml b/_pkgdown.yml index 17ca46d..6cffc8b 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -9,6 +9,7 @@ template: navbar-bg: "#282828" includes: in_header: | + @@ -87,6 +88,13 @@ repo: home: https://github.com/GreenleafLab/MarchR issue: https://github.com/GreenleafLab/MarchR/issues user: https://github.com/ +home: + sidebar: + structure: [bug_links, license, community, citation, authors, dev] + components: + bug_links: + title: Links + text: "[Report a bug](https://github.com/GreenleafLab/MarchR/issues)" articles: - title: Tutorials contents: diff --git a/man/figures/MarchR_Icon.svg b/man/figures/MarchR_Icon.svg new file mode 100644 index 0000000..8becf71 --- /dev/null +++ b/man/figures/MarchR_Icon.svg @@ -0,0 +1 @@ +MarchRAAAWgmp1bWIAAAAeanVtZGMycGEAEQAQgAAAqgA4m3EDYzJwYQAAABZcanVtYgAAAEdqdW1kYzJtYQARABCAAACqADibcQN1cm46YzJwYTpmYzVlYWJkYS1kZWM0LTRjOGYt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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPZYQP3gy6ws3U9T510kFFslPetqGGTWZGaIOPsfQdaXbvCnwRMd+glIY9/ZMgrpTqbTMj6VmvhaqF2G0lGUsRu/tt4= From d60caead2ea9e35bef7e40b5a81ae0654b6b8391 Mon Sep 17 00:00:00 2001 From: erliuu Date: Fri, 4 Dec 2026 10:26:16 -0800 Subject: [PATCH 2/4] chore([md] tutorials, README): Update Citation, CSS code block formating, remove identifiable paths in tutorials --- README.md | 2 -- pkgdown/extra.scss | 45 ++++++++++++++++++------------ vignettes/marchr_chrombpnet.Rmd | 2 +- vignettes/marchr_hematopoiesis.Rmd | 2 +- vignettes/marchr_multiome.Rmd | 2 +- 5 files changed, 30 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 75d8510..0589fd9 100644 --- a/README.md +++ b/README.md @@ -156,5 +156,3 @@ If you use MarchR in your research, please cite: Liu ESX, Abdi I, Corces MR, Greenleaf WJ (2026). MarchR: Multi-Assay Multi-Dataset Disk-Backed Analysis. R package version 1.0.0. https://greenleaflab.github.io/MarchR/ ``` - -Run `citation("MarchR")` in R for the BibTeX entry. diff --git a/pkgdown/extra.scss b/pkgdown/extra.scss index b89b662..90cd015 100644 --- a/pkgdown/extra.scss +++ b/pkgdown/extra.scss @@ -1,5 +1,4 @@ -// Code styling: clean neutral "light gray box" look (NumPy-style), replacing -// gruvbox's yellow/colored syntax highlighting with calm, readable tones. +// Code styling: light gray code boxes with a GitHub-style syntax palette. // Code blocks: light gray box in light mode, muted dark box in dark mode. div.sourceCode, @@ -26,26 +25,36 @@ pre { background-color: rgba(255, 255, 255, 0.10); } -// Flatten syntax highlighting to neutral text so nothing renders yellow. -// !important is needed to beat gruvbox's per-token class selectors -// (e.g. `code span.at`), which outrank an element-only selector. -// Comments stay a muted gray so code is still easy to scan. -pre code span { - color: #24292f !important; -} -pre code span.co, -pre code span.cn { +// Syntax colors: functions purple, strings dark blue, numbers and constants blue, keywords red, +// argument names orange, comments gray italic. Other tokens (variables, operators) use the +// default text color, so none of gruvbox's colors show through. !important is needed to beat +// gruvbox's per-token class selectors (e.g. `code span.at`). +pre code span { color: #24292f !important; } +pre code span.fu { color: #8250df !important; } +pre code span.st { color: #0a3069 !important; } +pre code span.fl, +pre code span.dv, +pre code span.cn, +pre code span.bu { color: #0550ae !important; } +pre code span.kw, +pre code span.cf { color: #cf222e !important; } +pre code span.at { color: #953800 !important; } +pre code span.co { color: #6e7781 !important; font-style: italic; } -[data-bs-theme="dark"] pre code span { - color: #c9d1d9 !important; -} -[data-bs-theme="dark"] pre code span.co, -[data-bs-theme="dark"] pre code span.cn { - color: #8b949e !important; -} +[data-bs-theme="dark"] pre code span { color: #c9d1d9 !important; } +[data-bs-theme="dark"] pre code span.fu { color: #d2a8ff !important; } +[data-bs-theme="dark"] pre code span.st { color: #a5d6ff !important; } +[data-bs-theme="dark"] pre code span.fl, +[data-bs-theme="dark"] pre code span.dv, +[data-bs-theme="dark"] pre code span.cn, +[data-bs-theme="dark"] pre code span.bu { color: #79c0ff !important; } +[data-bs-theme="dark"] pre code span.kw, +[data-bs-theme="dark"] pre code span.cf { color: #ff7b72 !important; } +[data-bs-theme="dark"] pre code span.at { color: #ffa657 !important; } +[data-bs-theme="dark"] pre code span.co { color: #8b949e !important; } // Package version beside the navbar title, shown as a badge. The navbar background is // fixed in both themes, so one rule covers light and dark. !important beats the diff --git a/vignettes/marchr_chrombpnet.Rmd b/vignettes/marchr_chrombpnet.Rmd index cd36e83..eae3719 100644 --- a/vignettes/marchr_chrombpnet.Rmd +++ b/vignettes/marchr_chrombpnet.Rmd @@ -22,7 +22,7 @@ local({ buf <- new.env(parent = emptyenv()) buf$txt <- character(0) collect <- function(x, options) { - buf$txt <- c(buf$txt, x) + buf$txt <- c(buf$txt, gsub(path.expand("~"), "~", x, fixed = TRUE)) "" } esc <- function(x) { diff --git a/vignettes/marchr_hematopoiesis.Rmd b/vignettes/marchr_hematopoiesis.Rmd index 29d2191..6f5ffb2 100644 --- a/vignettes/marchr_hematopoiesis.Rmd +++ b/vignettes/marchr_hematopoiesis.Rmd @@ -22,7 +22,7 @@ local({ buf <- new.env(parent = emptyenv()) buf$txt <- character(0) collect <- function(x, options) { - buf$txt <- c(buf$txt, x) + buf$txt <- c(buf$txt, gsub(path.expand("~"), "~", x, fixed = TRUE)) "" } esc <- function(x) { diff --git a/vignettes/marchr_multiome.Rmd b/vignettes/marchr_multiome.Rmd index 86aa635..08a5f76 100644 --- a/vignettes/marchr_multiome.Rmd +++ b/vignettes/marchr_multiome.Rmd @@ -22,7 +22,7 @@ local({ buf <- new.env(parent = emptyenv()) buf$txt <- character(0) collect <- function(x, options) { - buf$txt <- c(buf$txt, x) + buf$txt <- c(buf$txt, gsub(path.expand("~"), "~", x, fixed = TRUE)) "" } esc <- function(x) { From 4d742e858b63d7782b5f7a1d7b9beb897bbded18 Mon Sep 17 00:00:00 2001 From: erliuu Date: Fri, 4 Dec 2026 13:29:44 -0800 Subject: [PATCH 3/4] chore([html] tutorials): Remove depreciated HTML tutorials --- vignettes/marchr_chrombpnet.html | 1986 -------------------------- vignettes/marchr_hematopoiesis.html | 2000 --------------------------- vignettes/marchr_multiome.html | 1853 ------------------------- vignettes/marchr_scE2G.html | 1730 ----------------------- 4 files changed, 7569 deletions(-) delete mode 100644 vignettes/marchr_chrombpnet.html delete mode 100644 vignettes/marchr_hematopoiesis.html delete mode 100644 vignettes/marchr_multiome.html delete mode 100644 vignettes/marchr_scE2G.html diff --git a/vignettes/marchr_chrombpnet.html b/vignettes/marchr_chrombpnet.html deleted file mode 100644 index 01d62b4..0000000 --- a/vignettes/marchr_chrombpnet.html +++ /dev/null @@ -1,1986 +0,0 @@ - - - - - - - - - - - - - - -Exporting Pseudobulks for ChromBPNet with MarchR (WIP) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
-
-
-
-
- -
- - - - - - - - -
-

Introduction

-

ChromBPNet learns base-resolution chromatin accessibility from DNA sequence while factoring out Tn5 sequence bias. It trains one model per pseudobulk, and for single-cell data it is suggested to aggregate the fragments by cluster instead of sample to train cluster-specific ChromBPNet models.

-

This tutorial provides instructions to setup your single-cell ATAC datasets from your MarchRProject directly for ChromBPNet model training. It continues from the end of the MarchR Hematopoiesis tutorial and exports the files that the ChromBPNet pipeline reads. We highly recommend you read the ChromBPNet Wiki prior to starting this tutorial.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ChromBPNet inputFlagSource
Fragments per cluster-ifragwrite_pseudobulk_fragments()
Peaks per cluster (10-column narrowPeak)-pwrite_pseudobulk_peaks()
Chromosome sizes-cwrite_pseudobulk_chrom_sizes()
Blacklist-br (prep nonpeaks)get_blacklist()
Reference genome FASTA-gDownloaded
Train / validation / test chromosome folds-flchrombpnet prep splits
GC-matched background regions-nchrombpnet prep nonpeaks
Bias model-bPre-trained, or chrombpnet bias pipeline
-

The last three come from ChromBPNet’s own tools, so they always match the ChromBPNet release you train with. Training needs a GPU and is not run in this tutorial; the shell commands are shown for reference.

-
-
-

Setup

-

Load MarchR and set the session thread count.

-
library(MarchR)
-set_threads(4)
-

The Hematopoiesis tutorial saved its project to cache_dir. The export is written next to it, in export_dir.

-
cache_dir <- path.expand("~/.cache/marchr_hematopoiesis")
-export_dir <- file.path(cache_dir, "chrombpnet_tutorial")
-proj <- load_project(file.path(cache_dir, "saved_project"))
-proj
-
Output
## MarchRProject Object
-## Directory: /home/eric1126/.cache/marchr_hematopoiesis/saved_project
-## 3 Datasets:
-##   scATAC_BMMC_R1:
-##     4696 cells: scATAC_BMMC_R1#TAGGAGGGTTAACCGT-1, scATAC_BMMC_R1#CCTTGGTAGTTCTCCC-1, scATAC_BMMC_R1#GCCAGCAGTTCTGAGT-1, scATAC_BMMC_R1#TAGCATGGTGACCAGA-1 ... scATAC_BMMC_R1#GTGGATTCATCACAGT-1
-##     Assays: TileMatrix, GeneScoreMatrix, IterativeLSI
-##     Fragments: ATAC
-##     Cell metadata: 3 features (atac_clusters, UMAP_1, UMAP_2)
-##   scATAC_CD34_BMMC_R1:
-##     3173 cells: scATAC_CD34_BMMC_R1#ATTTGTCTCAATCGTG-1, scATAC_CD34_BMMC_R1#CACATGAGTGATAAGT-1, scATAC_CD34_BMMC_R1#GCATTCCTCGTTGTTT-1, scATAC_CD34_BMMC_R1#TGCTTTAGTAACAATG-1 ... scATAC_CD34_BMMC_R1#AACGAGGTCTGAAAGA-1
-##     Assays: TileMatrix, GeneScoreMatrix, IterativeLSI
-##     Fragments: ATAC
-##     Cell metadata: 3 features (atac_clusters, UMAP_1, UMAP_2)
-##   scATAC_PBMC_R1:
-##     2402 cells: scATAC_PBMC_R1#CAGGGCTTCTTTCGAT-1, scATAC_PBMC_R1#GATGATCCACGTTACA-1, scATAC_PBMC_R1#TTTGCGCTCTATCTAC-1, scATAC_PBMC_R1#ATGTACGAGTATGCTC-1 ... scATAC_PBMC_R1#TTCGGTCTCATTCGGA-1
-##     Assays: TileMatrix, GeneScoreMatrix, IterativeLSI
-##     Fragments: ATAC
-##     Cell metadata: 3 features (atac_clusters, UMAP_1, UMAP_2)
-## All datasets aligned.
-## Assays:
-##   TileMatrix: 
-##     6072620 features
-##   GeneScoreMatrix: 
-##     20561 features
-##   IterativeLSI: 
-##     29 features
-## Genome object: 
-##   Chromosomes: 
-##     chr1, chr2 ... chr21
-##   Annotation names: 
-##     transcripts, genes ... blacklist
-##   Sequence: 
-##     BSgenome.Hsapiens.UCSC.hg19
-## DimReductions: IterativeLSI
-## Impute Weights: 2 blocks (embedding = IterativeLSI)
-
-
-
-

Calling Peaks per Cluster

-

ChromBPNet trains each cluster’s model on that cluster’s own peaks. add_group_coverages() builds pseudobulk replicates for each cluster, and add_reproducible_peak_set() calls peaks on them with MACS3. It stores the merged peak set in proj$peak_set and each cluster’s reproducible peaks in proj$group_peak_sets, which is what gets exported below.

-

ChromBPNet recommends relaxed peak calls (“MACS2 with p-value parameter threshold set to 0.01”), so -p 0.01 is appended to the default MACS arguments.

-
proj <- add_group_coverages(proj, group_by = "atac_clusters", verbose = TRUE)
-
proj <- add_reproducible_peak_set(
-  proj,
-  group_by = "atac_clusters",
-  additional_params = paste(
-    "--call-summits --keep-dup all --shift -75 --extsize 150 --nomodel --nolambda",
-    "-p 0.01"
-  ),
-  verbose = TRUE
-)
-
Output
## 2026-10-23 00:49:26 Group coverages: 10,271 cells in 11 groups by 'atac_clusters', 3 samples
-## Split 11 groups into 22 replicates (48-500 cells each) [0.0s]
-## 2026-10-23 00:49:26 Group coverages finished [0.0s]: added group coverages 'atac_clusters' (11 groups, 22 replicates)
-## 2026-10-23 00:49:26 Peak calling: 22 replicates in 11 groups (6,646 cells), macs3, reproducibility 2
-## C8_Rep1: called 178,033 summits from 500 cells [24.0s]
-## C8_Rep2: called 149,597 summits from 500 cells [21.1s]
-## C4_Rep1: called 524,841 summits from 255 cells [49.2s]
-## C4_Rep2: called 505,807 summits from 173 cells [47.3s]
-## C2_Rep1: called 772,402 summits from 500 cells [73.5s]
-## C2_Rep2: called 225,696 summits from 67 cells [21.1s]
-## C6_Rep1: called 492,310 summits from 189 cells [47.2s]
-## C6_Rep2: called 530,878 summits from 189 cells [52.1s]
-## C5_Rep1: called 562,721 summits from 168 cells [53.0s]
-## C5_Rep2: called 311,965 summits from 145 cells [31.7s]
-## C10_Rep1: called 198,509 summits from 500 cells [26.4s]
-## C10_Rep2: called 245,096 summits from 343 cells [31.1s]
-## C1_Rep1: called 195,083 summits from 500 cells [30.2s]
-## C1_Rep2: called 527,671 summits from 279 cells [50.9s]
-## C9_Rep1: called 187,243 summits from 500 cells [25.2s]
-## C9_Rep2: called 621,225 summits from 201 cells [58.0s]
-## C3_Rep1: called 156,732 summits from 500 cells [24.3s]
-## C3_Rep2: called 154,818 summits from 48 cells [14.7s]
-## C7_Rep1: called 770,095 summits from 358 cells [77.1s]
-## C7_Rep2: called 232,441 summits from 88 cells [22.2s]
-## C11_Rep1: called 175,068 summits from 500 cells [24.3s]
-## C11_Rep2: called 340,654 summits from 143 cells [32.3s]
-## C8: kept 72,869 reproducible peaks (2 replicates) [12.6s]
-## C4: kept 86,125 reproducible peaks (2 replicates) [81.4s]
-## C2: kept 57,013 reproducible peaks (2 replicates) [84.3s]
-## C6: kept 95,956 reproducible peaks (2 replicates) [88.3s]
-## C5: kept 95,402 reproducible peaks (2 replicates) [70.4s]
-## C10: kept 99,365 reproducible peaks (2 replicates) [23.6s]
-## C1: kept 77,834 reproducible peaks (2 replicates) [54.9s]
-## C9: kept 91,391 reproducible peaks (2 replicates) [65.0s]
-## C3: kept 38,690 reproducible peaks (2 replicates) [11.7s]
-## C7: kept 70,884 reproducible peaks (2 replicates) [105.5s]
-## C11: kept 70,714 reproducible peaks (2 replicates) [28.5s]
-## Merged 856,243 group peaks into 306,316 peaks [5.2s]
-## Annotated 306,316 peaks: 114,959 Distal, 164,432 Intronic, 26,925 Promoter [4.9s]
-## 2026-10-23 01:13:10 Peak calling finished [1486.0s]: added peak set (306,316 peaks) and 11 group peak sets
-
-
-
-

Grouping Fragments by Cluster

-

Each of the atac_clusters from the Hematopoiesis tutorial becomes one pseudobulk, one fragment file, and one ChromBPNet model.

-
plot_embedding(proj, col_name = "atac_clusters", title = "UMAP - Clusters")
-

-

pseudobulk_fragments() groups cells by a metadata column and returns one lazy fragment set per group. Fragments are pooled across the three datasets and pass through the same blacklist and chromosome filters as peak calling, so the exported fragments and peaks cover the same regions.

-
pb <- pseudobulk_fragments(proj, group_by = "atac_clusters", verbose = TRUE)
-
pb
-
Output
## 2026-10-23 01:13:11 Pseudobulk: 10,271 cells in 11 groups by 'atac_clusters', 3 datasets
-## 2026-10-23 01:13:11 Pseudobulk finished [0.0s]: 11 fragment sets (37,183,949 fragments)
-## MarchRPseudobulk: 11 groups (by atac_clusters)
-## # A tibble: 11 × 5
-##    group n_cells n_fragments median_tss_enrichment passed_depth_gate
-##    <chr>   <int>       <dbl>                 <dbl> <lgl>            
-##  1 C8       2546     8770439                  16.3 NA               
-##  2 C4        434     1379563                  19.2 NA               
-##  3 C2       1352     3081804                  19.5 NA               
-##  4 C6        378     1264174                  15.8 NA               
-##  5 C5        322     1213031                  14.5 NA               
-##  6 C10      1188     5179436                  14.5 NA               
-##  7 C1        862     4411933                  20.7 NA               
-##  8 C9        876     3102157                  16.7 NA               
-##  9 C3        574     2762631                  22.4 NA               
-## 10 C7        446     1508948                  16.9 NA               
-## 11 C11      1293     4509833                  17.7 NA
-
-

The manifest reports cells, fragments, and median TSS enrichment for each cluster. Each ChromBPNet model learns its own count scale, so clusters do not need matched depth. To leave shallow clusters out of the export, set min_fragments with on_low_depth = "drop". ChromBPNet does not publish a minimum depth, so pick the floor for your own data.

-
-
-

Writing Fragment Files

-

write_pseudobulk_fragments() writes one gzipped, 10x-style fragment file per cluster to export_dir/fragments/. These are the -ifrag inputs.

-
pb <- write_pseudobulk_fragments(pb, export_dir, verbose = TRUE)
-
Output
## 2026-10-23 01:13:11 Fragment export: 11 groups to '/home/eric1126/.cache/marchr_hematopoiesis/chrombpnet_tutorial'
-## C8: wrote fragments for 2,546 cells [5.0s]
-## C4: wrote fragments for 434 cells [1.3s]
-## C2: wrote fragments for 1,352 cells [2.1s]
-## C6: wrote fragments for 378 cells [1.2s]
-## C5: wrote fragments for 322 cells [1.2s]
-## C10: wrote fragments for 1,188 cells [3.2s]
-## C1: wrote fragments for 862 cells [2.7s]
-## C9: wrote fragments for 876 cells [2.1s]
-## C3: wrote fragments for 574 cells [1.9s]
-## C7: wrote fragments for 446 cells [1.3s]
-## C11: wrote fragments for 1,293 cells [2.8s]
-## 2026-10-23 01:13:35 Fragment export finished [24.8s]: added manifest column 'fragments_path' (11 files)
-
-
read.delim(pb$manifest$fragments_path[[1]], header = FALSE, nrows = 5)
-
Output
##     V1     V2     V3                                V4
-## 1 chr1 750947 751028 scATAC_PBMC_R1#GCGCATGTCTCTCAAT-1
-## 2 chr1 750989 751069 scATAC_BMMC_R1#AATGGCTTCTTGTGCC-1
-## 3 chr1 751650 751736 scATAC_PBMC_R1#CAAGCTAAGTGCCCTG-1
-## 4 chr1 751658 751726 scATAC_BMMC_R1#TTCTGTAGTAATGTAG-1
-## 5 chr1 751663 751804 scATAC_PBMC_R1#CATAACGTCGAGCGCT-1
-
-

The columns are chromosome, start, end, and cell barcode. ChromBPNet reads only the first three: its fragment reader expects “tsv with columns chr, start, end and optionally more columns”, so Cell Ranger’s fifth duplicate-count column is not needed. Coordinates are written unshifted, because ChromBPNet estimates and corrects the Tn5 shift itself; its guide notes that “you do not need to worry about pre-shifting the fragments”.

-

ArchR’s getGroupFragments() writes the same four columns. One difference is that MarchR has already removed fragments in blacklisted regions and on chrM.

-
-
-

Writing Peaks

-

write_pseudobulk_peaks() writes each cluster’s peaks to export_dir/peaks/. scope = "group" skips the merged peak set; the default, "both", also writes it as union.narrowPeak.

-
pb <- write_pseudobulk_peaks(pb, export_dir, scope = "group", verbose = TRUE)
-
read.delim(pb$manifest$peaks_path[[1]], header = FALSE, nrows = 5)
-
Output
## 2026-10-23 01:13:35 Peak export: 11 groups to '/home/eric1126/.cache/marchr_hematopoiesis/chrombpnet_tutorial'
-## Wrote 11 group peak files (38,690-99,365 peaks) [2.4s]
-## 2026-10-23 01:13:37 Peak export finished [2.4s]: added manifest column 'peaks_path' (11 files)
-##      V1        V2        V3   V4   V5 V6      V7      V8 V9 V10
-## 1 chr14  77234591  77235092 C8_1 1000  . 314.012 314.012 -1 250
-## 2  chr2  64977998  64978499 C8_2 1000  . 211.867 211.867 -1 250
-## 3  chr7  36192419  36192920 C8_3 1000  . 211.867 211.867 -1 250
-## 4  chr8 103251243 103251744 C8_4 1000  . 293.821 293.821 -1 250
-## 5 chr19  42579873  42580374 C8_5 1000  . 285.221 285.221 -1 250
-
-

ChromBPNet’s -p takes a “10 column bed file of peaks” and centers each training window at start (column 2) plus summit (column 10). MarchR peaks are 501 bp wide around the MACS summit, and column 10 holds the stored summit offset.

-

plot_browser_track() shows the signal each cluster’s model will learn. At the CD14 locus, nearby gene promoters are open in every cluster, while several distal peaks are open mainly in C8, so each cluster’s model trains on a different accessibility profile. The peaks track shows the merged peak set.

-
region <- gene_region(
-  get_gene_annotations(proj, "genes"),
-  gene_symbol = "CD14",
-  upstream = 50000L,
-  downstream = 50000L
-)
-
-plot_browser_track(
-  proj,
-  region = region,
-  group_by = "atac_clusters",
-  frags_name = "ATAC",
-  tracks = c("coverage", "peaks", "gene"),
-  bins = 400L,
-  norm_method = "ReadsInTSS",
-  title = "CD14"
-)
-

-
-
-

Chromosome Sizes and Blacklist

-

chrombpnet prep splits assigns every chromosome in the chromosome sizes file to a fold, so the file should list only the chromosomes to train on. This project’s chromosome sizes already cover just chr1-22, chrX, and chrY, the same set the ChromBPNet tutorial uses.

-
pb <- write_pseudobulk_chrom_sizes(pb, export_dir, get_chrom_sizes(proj))
-readLines(pb$params$chrom_sizes_path, n = 3)
-
Output
## [1] "chr1\t249250621" "chr2\t243199373" "chr3\t198022430"
-
-

ChromBPNet uses the blacklist twice: to filter peaks and to keep background regions out of blacklisted sequence. Writing the project’s own blacklist keeps it consistent with the fragment filtering above.

-
blacklist <- get_blacklist(proj)
-write.table(
-  blacklist[, c("chr", "start", "end")],
-  file.path(export_dir, "blacklist.bed"),
-  sep = "\t", quote = FALSE, row.names = FALSE, col.names = FALSE
-)
-
-
-

Writing the Manifest

-

write_pseudobulk_manifest() writes manifest.tsv, which works as a samplesheet for workflow managers, and manifest.json, which also records the export parameters and package versions. Each writer above added its file paths to the manifest as a new column.

-
write_pseudobulk_manifest(pb, export_dir)
-colnames(pb$manifest)
-
Output
## [1] "group"                 "n_cells"               "n_fragments"          
-## [4] "median_tss_enrichment" "passed_depth_gate"     "fragments_path"       
-## [7] "peaks_path"
-
-
list.files(export_dir, recursive = TRUE)
-
Output
##  [1] "blacklist.bed"        "chrom.sizes"          "fragments/C1.tsv.gz" 
-##  [4] "fragments/C10.tsv.gz" "fragments/C11.tsv.gz" "fragments/C2.tsv.gz" 
-##  [7] "fragments/C3.tsv.gz"  "fragments/C4.tsv.gz"  "fragments/C5.tsv.gz" 
-## [10] "fragments/C6.tsv.gz"  "fragments/C7.tsv.gz"  "fragments/C8.tsv.gz" 
-## [13] "fragments/C9.tsv.gz"  "manifest.json"        "manifest.tsv"        
-## [16] "peaks/C1.narrowPeak"  "peaks/C10.narrowPeak" "peaks/C11.narrowPeak"
-## [19] "peaks/C2.narrowPeak"  "peaks/C3.narrowPeak"  "peaks/C4.narrowPeak" 
-## [22] "peaks/C5.narrowPeak"  "peaks/C6.narrowPeak"  "peaks/C7.narrowPeak" 
-## [25] "peaks/C8.narrowPeak"  "peaks/C9.narrowPeak"
-
-

If you train your own bias model (below), use a deep cluster so the model sees as many background reads as possible. The deepest cluster here is:

-
pb$manifest$group[which.max(pb$manifest$n_fragments)]
-
Output
## [1] "C8"
-
-
-
-

Preparing ChromBPNet Inputs

-

The remaining steps run in a shell where ChromBPNet is installed, and follow its Preprocessing, Bias model training, and ChromBPNet training pages. The tutorial fragments are aligned to hg19, so every reference below is hg19, whereas the ChromBPNet tutorial uses hg38.

-
DATA=~/.cache/marchr_hematopoiesis/chrombpnet_tutorial
-mkdir -p $DATA/downloads
-
-wget https://hgdownload.soe.ucsc.edu/goldenPath/hg19/bigZips/hg19.fa.gz -O $DATA/downloads/hg19.fa.gz
-gunzip $DATA/downloads/hg19.fa.gz
-

ChromBPNet reads 2,114 bp of sequence around each summit, so peaks must also stay clear of the blacklist “extended by 1057 bp on both sides”:

-
bedtools slop -i $DATA/blacklist.bed -g $DATA/chrom.sizes -b 1057 > $DATA/blacklist_slop1057.bed
-
-mkdir -p $DATA/peaks_no_blacklist
-for peaks in $DATA/peaks/*.narrowPeak; do
-  bedtools intersect -v -a $peaks -b $DATA/blacklist_slop1057.bed \
-    > $DATA/peaks_no_blacklist/$(basename $peaks)
-done
-

Split chromosomes into training, validation, and test sets. This is fold 0 of the standard ENCODE folds used by the ChromBPNet tutorial:

-
mkdir -p $DATA/splits
-chrombpnet prep splits -c $DATA/chrom.sizes -tcr chr1 chr3 chr6 -vcr chr8 chr20 \
-  -op $DATA/splits/fold_0
-

Generate GC-matched background regions for each cluster. Each run writes nonpeaks/<cluster>/output_negatives.bed:

-
for peaks in $DATA/peaks_no_blacklist/*.narrowPeak; do
-  group=$(basename $peaks .narrowPeak)
-  mkdir -p $DATA/nonpeaks/$group
-  chrombpnet prep nonpeaks \
-    -g $DATA/downloads/hg19.fa \
-    -p $peaks \
-    -c $DATA/chrom.sizes \
-    -fl $DATA/splits/fold_0.json \
-    -br $DATA/blacklist.bed \
-    -o $DATA/nonpeaks/$group/output
-done
-
-
-

Choosing a Bias Model

-

The bias model captures Tn5 sequence preference so the main model can learn TF activity apart from it. There are two options.

-

Pre-trained. ChromBPNet’s FAQ advises picking “a pre-trained bias model that is similar in experimental setting to the current dataset”. The ChromBPNet tutorial’s ATAC bias model is:

-
mkdir -p $DATA/bias_model
-wget https://storage.googleapis.com/chrombpnet_data/input_files/bias_models/ATAC/ENCSR868FGK_bias_fold_0.h5 \
-  -O $DATA/bias_model/ENCSR868FGK_bias_fold_0.h5
-BIAS=$DATA/bias_model/ENCSR868FGK_bias_fold_0.h5
-

Trained on one cluster. Train a single bias model on a deep cluster and reuse it for every cluster, as the HDMA atlas does. -b is the bias threshold factor, for which ChromBPNet recommends starting at 0.5 for ATAC.

-
BIAS_GROUP=C8
-mkdir -p $DATA/bias_model/$BIAS_GROUP
-chrombpnet bias pipeline \
-  -ifrag $DATA/fragments/$BIAS_GROUP.tsv.gz \
-  -d "ATAC" \
-  -g $DATA/downloads/hg19.fa \
-  -c $DATA/chrom.sizes \
-  -p $DATA/peaks_no_blacklist/$BIAS_GROUP.narrowPeak \
-  -n $DATA/nonpeaks/$BIAS_GROUP/output_negatives.bed \
-  -fl $DATA/splits/fold_0.json \
-  -b 0.5 \
-  -o $DATA/bias_model/$BIAS_GROUP/
-BIAS=$DATA/bias_model/$BIAS_GROUP/models/bias.h5
-

Read evaluation/overall_report.html before using a trained bias model. It should learn the expected Tn5 bias motif and no TF motifs; the FAQ explains how to tune -b when it does not.

-
-
-

Training ChromBPNet per Cluster

-

Train one bias-factorized model per cluster. Each run is a GPU job, so on a cluster submit one job per cluster instead of running the loop as written.

-
for frag in $DATA/fragments/*.tsv.gz; do
-  group=$(basename $frag .tsv.gz)
-  mkdir -p $DATA/chrombpnet_model/$group
-  chrombpnet pipeline \
-    -ifrag $frag \
-    -d "ATAC" \
-    -g $DATA/downloads/hg19.fa \
-    -c $DATA/chrom.sizes \
-    -p $DATA/peaks_no_blacklist/$group.narrowPeak \
-    -n $DATA/nonpeaks/$group/output_negatives.bed \
-    -fl $DATA/splits/fold_0.json \
-    -b $BIAS \
-    -o $DATA/chrombpnet_model/$group/
-done
-

Each model’s evaluation/overall_report.html is its quality check. The bias-corrected model, models/chrombpnet_nobias.h5, should learn the expected TF motifs and no enzyme bias. For production models, the FAQ recommends training all five folds and averaging the predictions and contribution scores across them.

-
-
-

Optional: Coverage Tracks

-

ChromBPNet builds its own signal tracks from the fragment files, so no coverage file is needed for training. To view observed signal next to model predictions in a genome browser, MarchR can write per-cluster insertion coverage in a single pass over the fragments:

-
pb <- write_pseudobulk_coverage(pb, export_dir)
-pb <- write_pseudobulk_bigwig(pb, export_dir, get_chrom_sizes(proj))
-
- - - -
-
- -
- - - - - - - - - - - - - - - - diff --git a/vignettes/marchr_hematopoiesis.html b/vignettes/marchr_hematopoiesis.html deleted file mode 100644 index 126c242..0000000 --- a/vignettes/marchr_hematopoiesis.html +++ /dev/null @@ -1,2000 +0,0 @@ - - - - - - - - - - - - - - -MarchR Hematopoiesis tutorial - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
-
-
-
-
- -
- - - - - - - - -
-

Introduction

-

This is a brief MarchR tutorial, based upon the ArchR “Hematopoiesis” Tutorial. It does not showcase all of MarchR’s functionality or each step in detail. Importantly, this tutorial assumes that your are running MarchR locally.

-
-
-

Setup

-

First, load MarchR. If this fails, we recommend revisiting the MarchR installation instructions.

-
library(MarchR)
-

set_threads() sets a session-wide thread count for operations that benefit from parallelization (Certain functions will remain single-threaded).

-
set_threads(4)
-
Output
## Set default MarchR threads to 4.
-
-

Downloads and references are cached in cache_dir so they are reused across runs; the project itself is written to a temporary directory. MarchR creates each directory as needed.

-
cache_dir <- path.expand("~/.cache/marchr_hematopoiesis")
-data_dir <- file.path(cache_dir, "data")
-ref_dir <- file.path(cache_dir, "references")
-project_dir <- file.path(tempdir(), "marchr_project")
-
-
-

Download Fragments

-

get_tutorial_data() downloads the same three fragment files as ArchR’s getTutorialData("Hematopoiesis"), skipping any already in dir. The dataset contains three scATAC-seq fragment files (bone marrow, CD34+sorted bone marrow, and PBMC).

-
input_files <- get_tutorial_data("hematopoiesis", dir = data_dir)
-input_files
-
Output
##                                                                         scATAC_BMMC_R1 
-##      "/home/eric1126/.cache/marchr_hematopoiesis/data/scATAC_BMMC_R1.fragments.tsv.gz" 
-##                                                                    scATAC_CD34_BMMC_R1 
-## "/home/eric1126/.cache/marchr_hematopoiesis/data/scATAC_CD34_BMMC_R1.fragments.tsv.gz" 
-##                                                                         scATAC_PBMC_R1 
-##      "/home/eric1126/.cache/marchr_hematopoiesis/data/scATAC_PBMC_R1.fragments.tsv.gz"
-
-
-
-

Initialize a MarchRProject

-

Each sample becomes its own MarchRDataset within one MarchRProject, all backed by the same on-disk project directory.

-
proj <- MarchRProject(dir = project_dir)
-for (sample_name in names(input_files)) {
-  frags <- open_fragments_10x(input_files[[sample_name]]) %>%
-    write_fragments_dir(file.path(project_dir, "fragments", sample_name))
-  proj <- add_fragments(
-    proj,
-    frags,
-    frags_name = "ATAC",
-    dataset_name = sample_name
-  )
-}
-proj
-
Output
## MarchRProject Object
-## Directory: /tmp/RtmprU04Ui/marchr_project
-## 3 Datasets:
-##   scATAC_BMMC_R1:
-##     5000 cells: scATAC_BMMC_R1#TAGGAGGGTTAACCGT-1, scATAC_BMMC_R1#CCTTGGTAGTTCTCCC-1, scATAC_BMMC_R1#GCCAGCAGTTCTGAGT-1, scATAC_BMMC_R1#TAGCATGGTGACCAGA-1 ... scATAC_BMMC_R1#CTGCTCAAGTGTCGGA-1
-##     Fragments: ATAC
-##   scATAC_CD34_BMMC_R1:
-##     3723 cells: scATAC_CD34_BMMC_R1#ATTTGTCTCAATCGTG-1, scATAC_CD34_BMMC_R1#CACATGAGTGATAAGT-1, scATAC_CD34_BMMC_R1#GCATTCCTCGTTGTTT-1, scATAC_CD34_BMMC_R1#TGTACAGAGGTAGGAA-1 ... scATAC_CD34_BMMC_R1#AACTTGGAGCGTTAGG-1
-##     Fragments: ATAC
-##   scATAC_PBMC_R1:
-##     3000 cells: scATAC_PBMC_R1#CAGGGCTTCTTTCGAT-1, scATAC_PBMC_R1#GATGATCCACGTTACA-1, scATAC_PBMC_R1#TTTGCGCTCTATCTAC-1, scATAC_PBMC_R1#ATGTACGAGTATGCTC-1 ... scATAC_PBMC_R1#CACAACACAGTAACTC-1
-##     Fragments: ATAC
-## All datasets aligned.
-## Empty genome object
-
-
-
-

Genome Annotations

-

The ArchR tutorial fragments are aligned to hg19. Transcripts are used for TSS enrichment QC, genes for gene scores, and exons for the gene track in genome browser plots.

-
proj <- set_gene_annotations(
-  proj,
-  annotation_type = "transcripts",
-  name = "transcripts",
-  dir_name = ref_dir,
-  release = "19",
-  transcript_choice = "all",
-  annotation_set = "comprehensive"
-)
-proj <- set_gene_annotations(
-  proj,
-  annotation_type = "genes",
-  name = "genes",
-  dir_name = ref_dir,
-  release = "19",
-  annotation_set = "comprehensive"
-)
-proj <- set_gene_annotations(
-  proj,
-  annotation_type = "exons",
-  name = "exons",
-  dir_name = ref_dir,
-  release = "19",
-  transcript_choice = "all",
-  annotation_set = "comprehensive"
-)
-proj <- set_blacklist(proj, genome = "hg19", dir_name = ref_dir)
-proj <- set_chrom_sizes(proj, genome = "hg19", dir_name = ref_dir)
-proj <- set_genome_sequence(proj, genome = "hg19")
-
-
-

Quality Control

-

Filter cells with qc_fragments() using the ArchR tutorial’s thresholds (minFrags = 1000, minTSS = 4).

-
for (sample_name in names(input_files)) {
-  proj <- qc_fragments(
-    proj,
-    dataset_name = sample_name,
-    frags_name = "ATAC",
-    n_frags = 1000,
-    tss_enrichment = 4
-  )
-}
-

Inspect the TSS enrichment vs. fragment count relationship and fragment length distribution per sample.

-
for (sample_name in names(input_files)) {
-  p_tss <- plot_tss_scatter(
-    proj, dataset_name = sample_name, frags_name = "ATAC",
-    min_tss = 4
-  )
-  p_frag <- plot_fragment_length(
-    proj, dataset_name = sample_name, frags_name = "ATAC"
-  )
-  print(p_tss + p_frag)
-}
-

-

Plot normalized Tn5 insertion signal around the TSS, aggregated per sample.

-
plot_tss_profile(proj)
-

-
-
-

Tile Matrix and Gene Score Matrix

-

Build a genome-wide 500bp tile matrix and a gene score matrix across all three datasets.

-
proj <- add_tile_matrix(proj, frags_name = "ATAC")
-proj <- add_gene_score_matrix(proj, frags_name = "ATAC")
-

align_cells() reconciles the fragments and every matrix onto a single, consistent set of cells; it needs at least one matrix built first.

-
proj <- align_cells(proj)
-
-
-

Doublet Scoring and Filtering

-

add_doublet_scores() simulates synthetic doublets and scores each real cell by its local doublet enrichment, matching ArchR’s addDoubletScores() defaults.

-
proj <- add_doublet_scores(
-  proj,
-  assay_name = "TileMatrix",
-  verbose = TRUE
-)
-
Output
## 2026-10-23 00:07:23 Doublet scoring: 3 datasets, 10,681 cells, 4 threads
-## [scATAC_BMMC_R1]
-##   Transposed TileMatrix storage order [5.3s]
-##   Simulated 20,000 doublets (1,000 x 20 trials)
-##   Iterative LSI: 4,939 cells, 2 iterations, 30 dims, 4 threads
-##     [Iteration 1/2]
-##       Selected 25,000 features (top accessible) [2.6s]
-##       Fit LSI on 4,939 cells [1.2s]
-## Warning in .fn(threads = 1L, verbose = FALSE, k = 20L, metric = "euclidean", :
-## KNN search didn't find self-neighbor for 19 datapoints. Try higher ef value
-##       Found 15 clusters, merged to 6 [0.6s]
-##       Pseudobulked 6 clusters [0.7s]
-##       Iteration finished [5.2s]
-##     [Iteration 2/2]
-##       Selected 25,000 variable features [0.2s]
-##       Fit LSI on 4,939 cells [1.5s]
-##       Iteration finished [1.7s]
-##   Iterative LSI finished [8.1s]: 4,939 x 30 embedding
-##   Projected 20,000 doublets into LSI [6.4s]
-##   Fit UMAP, re-projection R^2 = 0.984 [4.8s]
-##   Projected 20,000 doublets into UMAP [1.2s]
-##   Scored 4,939 cells by doublet neighbors in UMAP [0.7s]
-##   Dataset finished [26.4s]
-## [scATAC_CD34_BMMC_R1]
-##   Transposed TileMatrix storage order [6.1s]
-##   Simulated 15,000 doublets (1,000 x 15 trials)
-##   Iterative LSI: 3,280 cells, 2 iterations, 30 dims, 4 threads
-##     [Iteration 1/2]
-##       Selected 25,000 features (top accessible) [1.1s]
-##       Fit LSI on 3,280 cells [1.0s]
-## Warning in .fn(threads = 1L, verbose = FALSE, k = 20L, metric = "euclidean", :
-## KNN search didn't find self-neighbor for 16 datapoints. Try higher ef value
-##       Found 13 clusters, merged to 6 [0.4s]
-##       Pseudobulked 6 clusters [0.6s]
-##       Iteration finished [3.2s]
-##     [Iteration 2/2]
-##       Selected 25,000 variable features [0.2s]
-##       Fit LSI on 3,280 cells [0.8s]
-##       Iteration finished [1.1s]
-##   Iterative LSI finished [5.5s]: 3,280 x 30 embedding
-##   Projected 15,000 doublets into LSI [5.0s]
-##   Fit UMAP, re-projection R^2 = 0.994 [4.2s]
-##   Projected 15,000 doublets into UMAP [0.7s]
-##   Scored 3,280 cells by doublet neighbors in UMAP [0.5s]
-##   Dataset finished [22.0s]
-## [scATAC_PBMC_R1]
-##   Transposed TileMatrix storage order [5.7s]
-##   Simulated 10,000 doublets (1,000 x 10 trials)
-##   Iterative LSI: 2,462 cells, 2 iterations, 30 dims, 4 threads
-##     [Iteration 1/2]
-##       Selected 25,000 features (top accessible) [1.1s]
-##       Fit LSI on 2,462 cells [0.9s]
-## Warning in .fn(threads = 1L, verbose = FALSE, k = 20L, metric = "euclidean", :
-## KNN search didn't find self-neighbor for 19 datapoints. Try higher ef value
-##       Found 12 clusters, merged to 6 [0.3s]
-##       Pseudobulked 6 clusters [0.3s]
-##       Iteration finished [2.7s]
-##     [Iteration 2/2]
-##       Selected 25,000 variable features [0.5s]
-##       Fit LSI on 2,462 cells [1.1s]
-##       Iteration finished [1.6s]
-##   Iterative LSI finished [5.3s]: 2,462 x 30 embedding
-##   Projected 10,000 doublets into LSI [4.0s]
-##   Fit UMAP, re-projection R^2 = 0.951 [4.0s]
-##   Projected 10,000 doublets into UMAP [0.5s]
-##   Scored 2,462 cells by doublet neighbors in UMAP [0.3s]
-##   Dataset finished [20.0s]
-## 2026-10-23 00:08:29 Doublet scoring finished [68.5s]: added doublet scores to 3 datasets (10,681 cells)
-
-
for (sample_name in names(input_files)) {
-  print(plot_doublet_scores(proj, dataset_name = sample_name))
-}
-

-

filter_doublets() removes the highest-enrichment predicted doublets from every dataset in the project.

-
proj <- filter_doublets(proj, verbose = TRUE)
-
Output
## 2026-10-23 00:08:33 Doublet filtering: 3 datasets, 10,681 cells (enrichment >= 1, filter ratio 1)
-## scATAC_BMMC_R1: removed 243 of 4,939 cells (4.9%) [0.0s]
-## scATAC_CD34_BMMC_R1: removed 107 of 3,280 cells (3.3%) [0.0s]
-## scATAC_PBMC_R1: removed 60 of 2,462 cells (2.4%) [0.0s]
-## 2026-10-23 00:08:33 Doublet filtering finished [0.0s]: removed 410 of 10,681 cells (3.8%), cleared doublet data
-
-
-
-

Iterative LSI

-

IterativeLSI() alternates between low-resolution clustering and TF-IDF/SVD feature reselection, following ArchR’s iterative LSI procedure.

-
proj <- IterativeLSI(
-  proj, assay_name = "TileMatrix",
-  cluster_method = cluster_cells_graph(
-    knn_method = knn_hnsw(k = 20L),
-    knn_to_graph_method = knn_to_snn_graph,
-    cluster_graph_method = cluster_graph_leiden(resolution = 0.2)
-  ),
-  max_clusters = 25,
-  verbose = TRUE
-)
-
Output
## 2026-10-23 00:08:37 Iterative LSI: 10,271 cells, 2 iterations, 30 dims, 4 threads
-## [Iteration 1/2]
-##   Selected 25,000 features (top accessible) [2.0s]
-##   Fit LSI on 9,596 cells, projected 404 depth outliers [9.8s]
-##   Dropped LSI component 1 (r = 0.80 with log10(nFrags))
-##   Found 8 clusters [1.4s]
-##   Pseudobulked 8 clusters [3.5s]
-##   Iteration finished [16.9s]
-## [Iteration 2/2]
-##   Selected 25,000 variable features [0.2s]
-##   Fit LSI on 9,859 cells, projected 412 depth outliers [8.5s]
-##   Dropped LSI component 1 (r = 0.77 with log10(nFrags))
-##   Iteration finished [8.9s]
-## 2026-10-23 00:09:06 Iterative LSI finished [29.1s]: added dim reduction 'IterativeLSI' (10,271 x 29)
-
-
-
-

Clustering

-

To call clusters in the reduced dimension sub-space, use the add_clusters() function.

-
proj <- add_clusters(
-  proj,
-  embedding_name = "IterativeLSI",
-  col_name = "atac_clusters",
-  verbose = TRUE,
-  cluster_graph_method = cluster_graph_leiden(resolution = 0.8),
-  knn_method = knn_hnsw(k = 20L)
-)
-
Output
## 2026-10-23 00:09:08 Clustering: 10,271 cells on 'IterativeLSI' (29 dims)
-## Found 11 clusters [1.8s]
-## 2026-10-23 00:09:09 Clustering finished [1.8s]: added cell metadata column 'atac_clusters' (11 clusters)
-
-
-
-

UMAP Embedding

-

To visualize the data, we can use a 2-dimensional representation such as Uniform Manifold Approximation and Projection (UMAP) This function uses the uwot package with the updated umap2() function.

-
proj <- add_umap(
-  proj,
-  embedding_name = "IterativeLSI",
-  n_neighbors = 30L,
-  min_dist = 0.5,
-  verbose = TRUE
-)
-
Output
## 2026-10-23 00:09:09 UMAP: 10,271 cells on 'IterativeLSI' (29 dims), 4 threads
-## Fit 2D UMAP (30 neighbors, min_dist 0.5, cosine) [6.1s]
-## Saved UMAP model [0.2s]
-## 2026-10-23 00:09:16 UMAP finished [6.3s]: added cell metadata columns 'UMAP_1', 'UMAP_2', embedding model 'UMAP'
-
-

We can visualize the attributes of our cells, using the plot_embedding() function, specifying the coloration via the col_name parameter.

-
plot_embedding(proj, col_name = "atac_clusters", title = "UMAP - Clusters") +
-  plot_embedding(proj, col_name = "dataset_name", title = "UMAP - Samples")
-

-
-
-

Assigning Clusters with Gene Scores

-

We can assign biological labels to our atac_clusters using gene scores of known hematopoietic regulators. The marker gene scores overlayed onto the UMAP embedding and visualized:

-
gene_score_markers <- c(
-  "CD34",                 # Early progenitor
-  "GATA1",                # Erythroid
-  "PAX5", "MS4A1", "MME", # B-cell trajectory
-  "CD14", "MPO",          # Monocytes
-  "CD3D", "CD8A"          # T cells
-)
-
-plot_gene_scores(
-  proj,
-  genes = gene_score_markers,
-  impute = FALSE,
-  colors_continuous = palette_continuous("horizonExtra"),
-  patchwork = TRUE
-)
-

-

Raw gene scores can be noisy at the single-cell level. add_impute_weights() computes MAGIC diffusion weights from the LSI embedding.

-
proj <- add_impute_weights(proj, embedding_name = "IterativeLSI", verbose = TRUE)
-
Output
## 2026-10-23 00:09:25 Impute weights: 10,271 cells on 'IterativeLSI' (29 dims), 2 replicates x 2 blocks (~5,136 cells), td = 3, ka = 4
-## Replicate 1/2: built 2 diffusion graphs [2.8s]
-## Replicate 2/2: built 2 diffusion graphs [2.5s]
-## 2026-10-23 00:09:30 Impute weights finished [5.4s]: added impute weights (2 replicates x 2 blocks)
-
-
plot_gene_scores(
-  proj,
-  genes = gene_score_markers,
-  impute = TRUE,
-  quant_cut = c(0.01, 0.95),
-  colors_continuous = palette_continuous("horizonExtra"),
-  patchwork = TRUE
-)
-

-
-
-

Genome Browser Tracks

-

We can use the plot_browser_track() to browse the local chromatin accessibility at these marker genes (e.g. CD14) on a per cluster basis. The gene track draws each gene body as a line, with its merged exons from the exons annotation as thicker blocks.

-
region <- gene_region(
-  get_gene_annotations(proj, "genes"),
-  gene_symbol = "CD14",
-  upstream = 50000L,
-  downstream = 50000L
-)
-
-plot_browser_track(
-  proj,
-  region = region,
-  group_by = "atac_clusters",
-  frags_name = "ATAC",
-  tracks = c("coverage", "gene"),
-  bins = 400L,
-  norm_method = "ReadsInTSS",
-  title = "CD14"
-)
-

-
-
-

Project Saving

-

save_project() writes a self-contained copy of the MarchRProject so you can run load_project() and load your project into a fresh R session.

-
saved_project_dir <- file.path(cache_dir, "saved_project")
-proj <- save_project(proj, path = saved_project_dir, overwrite = TRUE)
-

When you are ready to load the saved project, simply provide the cached project directory,

-
proj <- load_project(saved_project_dir)
-proj
-
Output
## MarchRProject Object
-## Directory: /home/eric1126/.cache/marchr_hematopoiesis/saved_project
-## 3 Datasets:
-##   scATAC_BMMC_R1:
-##     4696 cells: scATAC_BMMC_R1#TAGGAGGGTTAACCGT-1, scATAC_BMMC_R1#CCTTGGTAGTTCTCCC-1, scATAC_BMMC_R1#GCCAGCAGTTCTGAGT-1, scATAC_BMMC_R1#TAGCATGGTGACCAGA-1 ... scATAC_BMMC_R1#GTGGATTCATCACAGT-1
-##     Assays: TileMatrix, GeneScoreMatrix, IterativeLSI
-##     Fragments: ATAC
-##     Cell metadata: 3 features (atac_clusters, UMAP_1, UMAP_2)
-##   scATAC_CD34_BMMC_R1:
-##     3173 cells: scATAC_CD34_BMMC_R1#ATTTGTCTCAATCGTG-1, scATAC_CD34_BMMC_R1#CACATGAGTGATAAGT-1, scATAC_CD34_BMMC_R1#GCATTCCTCGTTGTTT-1, scATAC_CD34_BMMC_R1#TGCTTTAGTAACAATG-1 ... scATAC_CD34_BMMC_R1#AACGAGGTCTGAAAGA-1
-##     Assays: TileMatrix, GeneScoreMatrix, IterativeLSI
-##     Fragments: ATAC
-##     Cell metadata: 3 features (atac_clusters, UMAP_1, UMAP_2)
-##   scATAC_PBMC_R1:
-##     2402 cells: scATAC_PBMC_R1#CAGGGCTTCTTTCGAT-1, scATAC_PBMC_R1#GATGATCCACGTTACA-1, scATAC_PBMC_R1#TTTGCGCTCTATCTAC-1, scATAC_PBMC_R1#ATGTACGAGTATGCTC-1 ... scATAC_PBMC_R1#TTCGGTCTCATTCGGA-1
-##     Assays: TileMatrix, GeneScoreMatrix, IterativeLSI
-##     Fragments: ATAC
-##     Cell metadata: 3 features (atac_clusters, UMAP_1, UMAP_2)
-## All datasets aligned.
-## Assays:
-##   TileMatrix: 
-##     6072620 features
-##   GeneScoreMatrix: 
-##     20561 features
-##   IterativeLSI: 
-##     29 features
-## Genome object: 
-##   Chromosomes: 
-##     chr1, chr2 ... chr21
-##   Annotation names: 
-##     transcripts, genes ... blacklist
-##   Sequence: 
-##     BSgenome.Hsapiens.UCSC.hg19
-## DimReductions: IterativeLSI
-## Impute Weights: 2 blocks (embedding = IterativeLSI)
-
-
- - - -
-
- -
- - - - - - - - - - - - - - - - diff --git a/vignettes/marchr_multiome.html b/vignettes/marchr_multiome.html deleted file mode 100644 index 71a1bea..0000000 --- a/vignettes/marchr_multiome.html +++ /dev/null @@ -1,1853 +0,0 @@ - - - - - - - - - - - - - - -MarchR Multiome (ATAC + RNA) Tutorial (WIP) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
-
-
-
-
- -
- - - - - - - - -
-

Introduction

-

This is a brief MarchR multiome tutorial, based upon the ArchR “Analyze Multiome” tutorial. It uses the 10x Genomics PBMC unsorted 10k Multiome sample (hg38), which measures scATAC-seq and scRNA-seq in the same nuclei. Importantly, this tutorial assumes that you are running MarchR locally. It downloads a ~2.9 GB fragments file and a ~150 MB RNA HDF5.

-
-
-

Setup

-

First, load MarchR. If this fails, we recommend revisiting the MarchR installation instructions.

-
library(MarchR)
-

set_threads() sets a session-wide thread count for operations that benefit from parallelization (Certain functions will remain single-threaded).

-
set_threads(4)
-
Output
## Set default MarchR threads to 4.
-
-

Downloads and references are cached in cache_dir so they are reused across runs; the project itself is written to a temporary directory.

-
sample_name <- "PBMC_10k"
-cache_dir <- path.expand("~/.cache/marchr_multiome")
-data_dir <- file.path(cache_dir, "data")
-ref_dir <- file.path(cache_dir, "references")
-project_dir <- file.path(tempdir(), "marchr_project")
-
-
-

Download Data

-

Both modalities come from the same 10x Multiome sample: the ATAC fragments and the RNA feature-barcode HDF5. Files already in data_dir are not downloaded again.

-
url_base <- "https://cf.10xgenomics.com/samples/cell-arc/2.0.0/pbmc_unsorted_10k/pbmc_unsorted_10k_"
-atac_gz <- file.path(data_dir, "pbmc_10k_atac_fragments.tsv.gz")
-rna_h5 <- file.path(data_dir, "pbmc_10k_filtered_feature_bc_matrix.h5")
-
-dir.create(data_dir, recursive = TRUE, showWarnings = FALSE)
-options(timeout = 3600)
-if (!file.exists(atac_gz)) {
-  download.file(paste0(url_base, "atac_fragments.tsv.gz"), atac_gz, mode = "wb")
-}
-if (!file.exists(rna_h5)) {
-  download.file(paste0(url_base, "filtered_feature_bc_matrix.h5"), rna_h5, mode = "wb")
-}
-
-
-

Initialize a MarchRProject

-

The ATAC fragments become a single MarchRDataset; the RNA modality is added to the same dataset later.

-
proj <- MarchRProject(dir = project_dir)
-frags <- open_fragments_10x(atac_gz) %>%
-  write_fragments_dir(file.path(project_dir, "fragments", sample_name))
-proj <- add_fragments(proj, frags, frags_name = "ATAC", dataset_name = sample_name)
-proj
-
Output
## MarchRProject Object
-## Directory: /tmp/RtmpLETOrO/marchr_project
-## 1 Dataset:
-##   PBMC_10k:
-##     671397 cells: PBMC_10k#GTAGGTGCATAACGGG-1, PBMC_10k#CCAACCCGTGGAAGGC-1, PBMC_10k#ACGGGAAGTTTACGTC-1, PBMC_10k#TAGGTTGGTTTGTGGA-1 ... PBMC_10k#GTTTCCTCACCTACGG-1
-##     Fragments: ATAC
-## All datasets aligned.
-## Empty genome object
-
-
-
-

Genome Annotations

-

The sample is aligned to hg38. Transcripts are used for TSS enrichment QC.

-
proj <- set_gene_annotations(
-  proj,
-  annotation_type = "transcripts",
-  name = "transcripts",
-  dir_name = ref_dir,
-  release = "44",
-  transcript_choice = "all",
-  annotation_set = "comprehensive"
-)
-proj <- set_blacklist(proj, genome = "hg38", dir_name = ref_dir)
-proj <- set_chrom_sizes(proj, genome = "hg38", dir_name = ref_dir)
-
-
-

Quality Control

-

Filter cells on fragment count and TSS enrichment with qc_fragments().

-
proj <- qc_fragments(proj, frags_name = "ATAC", n_frags = 1000, tss_enrichment = 4)
-
-
-

Tile Matrix

-

Build a genome-wide 500bp tile matrix, then align_cells() reconciles the fragments and matrix onto a single, consistent set of cells.

-
proj <- add_tile_matrix(proj, frags_name = "ATAC")
-proj <- align_cells(proj)
-
-
-

Doublet Scoring and Filtering

-

add_doublet_scores() simulates synthetic doublets and scores each real cell by its local doublet enrichment; filter_doublets() removes the highest-enrichment predicted doublets.

-
proj <- add_doublet_scores(proj, assay_name = "TileMatrix", verbose = TRUE)
-
proj <- filter_doublets(proj, verbose = TRUE)
-
Output
## 2026-10-23 00:12:40 Doublet scoring: 1 dataset, 13,164 cells, 4 threads
-## [PBMC_10k]
-##   Transposed TileMatrix storage order [16.5s]
-##   Simulated 65,000 doublets (1,000 x 65 trials)
-##   Iterative LSI: 13,164 cells, 2 iterations, 30 dims, 4 threads
-##     [Iteration 1/2]
-##       Selected 25,000 features (top accessible) [2.4s]
-##       Fit LSI on 10,000 cells [10.8s]
-## Warning in .fn(threads = 1L, verbose = FALSE, k = 20L, metric = "euclidean", :
-## KNN search didn't find self-neighbor for 371 datapoints. Try higher ef value
-##       Found 29 clusters, merged to 6 [1.6s]
-##       Pseudobulked 6 clusters [2.1s]
-##       Iteration finished [17.0s]
-##     [Iteration 2/2]
-##       Selected 25,000 variable features [1.3s]
-##       Fit LSI on 13,164 cells [11.2s]
-##       Iteration finished [12.5s]
-##   Iterative LSI finished [32.1s]: 13,164 x 30 embedding
-##   Projected 65,000 doublets into LSI [54.4s]
-##   Fit UMAP, re-projection R^2 = 0.902 [7.6s]
-##   Projected 65,000 doublets into UMAP [3.3s]
-##   Scored 13,164 cells by doublet neighbors in UMAP [3.2s]
-##   Dataset finished [117.3s]
-## 2026-10-23 00:14:32 Doublet scoring finished [117.3s]: added doublet scores to 1 dataset (13,164 cells)
-## 2026-10-23 00:14:32 Doublet filtering: 1 dataset, 13,164 cells (enrichment >= 1, filter ratio 1)
-## PBMC_10k: removed 1,732 of 13,164 cells (13.2%) [0.0s]
-## 2026-10-23 00:14:32 Doublet filtering finished [0.0s]: removed 1,732 of 13,164 cells (13.2%), cleared doublet data
-
-
-
-

Import RNA

-

import_feature_matrix_10x() adds the Gene Expression features as a GeneExpressionMatrix assay in the existing ATAC dataset, keeping only barcodes shared by both modalities. Rows are Ensembl IDs, with gene symbols stored in the feature metadata.

-
proj <- import_feature_matrix_10x(proj, input = rna_h5, verbose = TRUE)
-
proj <- align_cells(proj)
-head(get_feature_metadata(proj, assay_names = "GeneExpressionMatrix"))
-
Output
## 2026-10-23 00:14:32 Feature import: 'pbmc_10k_filtered_feature_bc_matrix.h5' (Gene Expression) into 'PBMC_10k'
-## Matched 10,010 barcodes, dropped 1,422 ATAC-only and 2,002 RNA-only cells
-## 2026-10-23 00:14:32 Feature import finished [0.3s]: added assay 'GeneExpressionMatrix' (36,601 features x 10,010 cells), feature metadata 'gene_symbol'
-##                 gene_symbol           assay_name
-## ENSG00000243485 MIR1302-2HG GeneExpressionMatrix
-## ENSG00000237613     FAM138A GeneExpressionMatrix
-## ENSG00000186092       OR4F5 GeneExpressionMatrix
-## ENSG00000238009  AL627309.1 GeneExpressionMatrix
-## ENSG00000239945  AL627309.3 GeneExpressionMatrix
-## ENSG00000239906  AL627309.2 GeneExpressionMatrix
-
-
-
-

Iterative LSI

-

Each modality is reduced separately with IterativeLSI(). ATAC uses the defaults; RNA uses non-binarized counts and selects 2,500 variable genes from the first iteration.

-
proj <- IterativeLSI(
-  proj,
-  assay_name = "TileMatrix",
-  output_assay_name = "LSI_ATAC",
-  dim_reduction_name = "LSI_ATAC",
-  verbose = TRUE
-)
-
proj <- IterativeLSI(
-  proj,
-  assay_name = "GeneExpressionMatrix",
-  output_assay_name = "LSI_RNA",
-  dim_reduction_name = "LSI_RNA",
-  binarize = FALSE,
-  first_selection = "var",
-  feature_selection_method = select_features_variance(num_feats = 2500L),
-  verbose = TRUE
-)
-
Output
## 2026-10-23 00:14:32 Iterative LSI: 10,010 cells, 2 iterations, 30 dims, 4 threads
-## [Iteration 1/2]
-##   Selected 25,000 features (top accessible) [2.6s]
-##   Fit LSI on 9,599 cells, projected 401 depth outliers [39.3s]
-##   Dropped LSI component 1 (r = 0.95 with log10(nFrags))
-## Warning in .fn(threads = 1L, verbose = FALSE, k = 20L, metric = "euclidean", :
-## KNN search didn't find self-neighbor for 1 datapoints. Try higher ef value
-##   Found 22 clusters, merged to 6 [1.4s]
-##   Pseudobulked 6 clusters [6.6s]
-##   Iteration finished [50.0s]
-## [Iteration 2/2]
-##   Selected 25,000 variable features [0.6s]
-##   Fit LSI on 9,608 cells, projected 402 depth outliers [31.7s]
-##   Dropped LSI component 1 (r = 0.96 with log10(nFrags))
-##   Iteration finished [32.4s]
-## 2026-10-23 00:15:59 Iterative LSI finished [91.0s]: added dim reduction 'LSI_ATAC' (10,010 x 29)
-## 2026-10-23 00:16:00 Iterative LSI: 10,010 cells, 2 iterations, 30 dims, 4 threads
-## [Iteration 1/2]
-##   Selected 2,500 variable features [24.3s]
-##   Fit LSI on 9,598 cells, projected 402 depth outliers [16.0s]
-##   Found 27 clusters, merged to 6 [1.3s]
-##   Pseudobulked 6 clusters [3.1s]
-##   Iteration finished [44.8s]
-## [Iteration 2/2]
-##   Selected 2,500 variable features [0.0s]
-##   Fit LSI on 9,608 cells, projected 402 depth outliers [96.3s]
-##   Iteration finished [96.4s]
-## 2026-10-23 00:18:39 Iterative LSI finished [166.0s]: added dim reduction 'LSI_RNA' (10,010 x 30)
-
-
-
-

Combining Modalities

-

add_combined_dims() variance-normalizes each modality’s reduction and concatenates them into a single joint embedding.

-
proj <- add_combined_dims(
-  proj,
-  embedding_names = c("LSI_ATAC", "LSI_RNA"),
-  output_name = "LSI_Combined"
-)
-
-
-

Clustering

-

Call clusters on the joint embedding with add_clusters(); raise resolution for finer clusters.

-
proj <- add_clusters(
-  proj,
-  embedding_name = "LSI_Combined",
-  cluster_graph_method = cluster_graph_leiden(resolution = 0.4),
-  verbose = TRUE
-)
-
table(get_cell_metadata(proj)$clusters)
-
Output
## 2026-10-23 00:18:39 Clustering: 10,010 cells on 'LSI_Combined' (59 dims)
-## Warning in .fn(threads = 1L, verbose = FALSE, k = 20L, metric = "euclidean", :
-## KNN search didn't find self-neighbor for 2 datapoints. Try higher ef value
-## Found 16 clusters [2.0s]
-## 2026-10-23 00:18:41 Clustering finished [2.0s]: added cell metadata column 'clusters' (16 clusters)
-## 
-##   C1  C10  C11  C12  C13  C14  C15  C16   C2   C3   C4   C5   C6   C7   C8   C9 
-##  228 2852  477   98   34  338  364  401 1092 1143 1128  343  657  124  567  164
-
-
-
-

UMAP Embedding

-

Compute a UMAP for each modality and for the joint embedding.

-
for (emb in c("ATAC", "RNA", "Combined")) {
-  proj <- add_umap(
-    proj,
-    embedding_name = paste0("LSI_", emb),
-    output_assay_name = paste0("UMAP_", emb),
-    min_dist = 0.8,
-    verbose = TRUE
-  )
-}
-
Output
## 2026-10-23 00:18:41 UMAP: 10,010 cells on 'LSI_ATAC' (29 dims), 4 threads
-## Fit 2D UMAP (40 neighbors, min_dist 0.8, cosine) [5.4s]
-## Saved UMAP model [0.2s]
-## 2026-10-23 00:18:47 UMAP finished [5.6s]: added cell metadata columns 'UMAP_ATAC_1', 'UMAP_ATAC_2', embedding model 'UMAP_ATAC'
-## 2026-10-23 00:18:47 UMAP: 10,010 cells on 'LSI_RNA' (30 dims), 4 threads
-## Fit 2D UMAP (40 neighbors, min_dist 0.8, cosine) [5.1s]
-## Saved UMAP model [0.2s]
-## 2026-10-23 00:18:52 UMAP finished [5.3s]: added cell metadata columns 'UMAP_RNA_1', 'UMAP_RNA_2', embedding model 'UMAP_RNA'
-## 2026-10-23 00:18:52 UMAP: 10,010 cells on 'LSI_Combined' (59 dims), 4 threads
-## Fit 2D UMAP (40 neighbors, min_dist 0.8, cosine) [5.3s]
-## Saved UMAP model [0.2s]
-## 2026-10-23 00:18:56 UMAP finished [5.5s]: added cell metadata columns 'UMAP_Combined_1', 'UMAP_Combined_2', embedding model 'UMAP_Combined'
-
-

All three embeddings, colored by the joint clusters:

-
plot_embedding(proj, embedding = "UMAP_ATAC", title = "ATAC") +
-  plot_embedding(proj, embedding = "UMAP_RNA", title = "RNA") +
-  plot_embedding(proj, embedding = "UMAP_Combined", title = "Combined") +
-  patchwork::plot_layout(guides = "collect")
-

-
- - - -
-
- -
- - - - - - - - - - - - - - - - diff --git a/vignettes/marchr_scE2G.html b/vignettes/marchr_scE2G.html deleted file mode 100644 index ed7371b..0000000 --- a/vignettes/marchr_scE2G.html +++ /dev/null @@ -1,1730 +0,0 @@ - - - - - - - - - - - - - - -MarchR scE2G tutorial (WIP) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
-
-
-
-
- -
- - - - - - - -
-

Introduction

-

scE2G predicts which enhancers regulate which genes in each cell cluster, from scATAC-seq alone or from multiome (paired ATAC and RNA) data. Its models are trained on CRISPR perturbations of more than 10,000 element-gene pairs, and benchmarked against CRISPR data, fine-mapped eQTLs, and GWAS variant-gene associations (Sheth, Qiu et al.).

-

add_peak2gene_links() correlates accessibility with gene expression and needs an RNA assay. scE2G instead scores links within each cluster, and its ATAC-only model needs no RNA at all.

-

scE2G runs as its own Snakemake pipeline. MarchR writes the inputs with write_sce2g_inputs(); you then run scE2G and read its predictions back into R for plotting. This tutorial continues from the hematopoiesis tutorial (vignette("marchr_hematopoiesis")): an hg19 scATAC-seq project with clusters stored in atac_clusters.

-
-
-

Requirements

-
    -
  • Human data. scE2G’s models are trained on human cells. Its default reference files are hg38; hg19 is covered under Run scE2G.
  • -
  • Linux with conda. Singularity or Apptainer is needed for scE2G’s recommended container route. scE2G recommends at least 32 GB of RAM.
  • -
  • Rsamtools, which write_sce2g_inputs() uses to compress and index fragment files:
  • -
-
BiocManager::install("Rsamtools")
-
-
-

Setup

-

Load MarchR and the project saved at the end of the hematopoiesis tutorial.

-
library(MarchR)
-cache_dir <- path.expand("~/.cache/marchr_hematopoiesis")
-proj <- load_project(file.path(cache_dir, "saved_project"))
-
-
-

Group Fragments by Cluster

-
pb <- pseudobulk_fragments(
-  proj,
-  group_by = "atac_clusters",
-  # Keep blacklisted regions. scE2G removes blacklisted candidate regions itself and then adds
-  # gene promoters back, so fragments filtered out here would leave any promoter inside a
-  # blacklisted region with no signal.
-  blacklist = FALSE,
-  verbose = TRUE
-)
-pb
-

Each group becomes one scE2G cell cluster. For multiome data, scE2G computes its RNA-accessibility correlation on a random sample of 20,000 cells from any larger cluster, and write_sce2g_inputs() warns when that applies.

-
-
-

Write scE2G Inputs

-
input_dir <- file.path(cache_dir, "scE2G_inputs")
-pb <- write_sce2g_inputs(pb, dir = input_dir, verbose = TRUE)
-

This writes:

-
    -
  • fragments/<cluster>.tsv.gz: one fragment file per cluster, compressed with bgzip and indexed with tabix (a .tbi file alongside).
  • -
  • config_cell_clusters.tsv: the cluster table scE2G reads. It holds absolute file paths and the model to apply, scATAC_powerlaw_v3 for ATAC-only data.
  • -
-

write_sce2g_inputs() stops with an error if the fragments use chromosome names without the chr prefix, because scE2G would discard every fragment.

-
-

Fragment Files from Outside MarchR

-

scE2G needs bgzip-compressed fragment files with a tabix index; a plain gzip file cannot be indexed. write_sce2g_inputs() handles this for you. To prepare a fragment file yourself:

-
Rsamtools::bgzip("fragments.tsv.gz", dest = "fragments.bgz.tsv.gz")
-Rsamtools::indexTabix("fragments.bgz.tsv.gz", format = "bed")
-

bgzip() reads plain gzip input directly. The file also needs 5 columns (chr, start, end, cell barcode, count). scE2G’s multiome step reads fragments through Signac, which rejects files with 4 columns but never uses the count value.

-
-
-

Multiome Data

-

For paired ATAC and RNA data, also pass the raw RNA counts. scE2G then applies its multiome model, which adds RNA-accessibility correlation features.

-
pb <- write_sce2g_inputs(
-  pb,
-  dir = input_dir,
-  rna = proj[["RNA", by_dataset = FALSE]],  # raw RNA counts assay
-  verbose = TRUE
-)
-

RNA is written per cluster as rna/<cluster>.h5ad:

-
    -
  • Use .h5ad, not a 10x .h5 file. scE2G reads both extensions with read_h5ad(), so a 10x HDF5 file fails.
  • -
  • Counts must be unnormalized. scE2G normalizes them itself.
  • -
  • Gene names must be unique, and every exported cell must be in the matrix. write_sce2g_inputs() checks both.
  • -
  • Gene names must match the gene_name field of the GTF set as gene_annotations in scE2G’s config/config.yaml. The default is GENCODE v43; for CellRanger output, use the GENCODE version CellRanger was built with.
  • -
-
-
-
-

Install scE2G

-
git clone --recurse-submodules --shallow-submodules --depth 1 https://github.com/EngreitzLab/scE2G.git
-cd scE2G
-git submodule update --init --recursive
-
-conda config --set channel_priority flexible
-conda env create -f workflow/envs/run_snakemake.yml
-conda activate run_snakemake
-

The first run also builds scE2G’s software environments, which takes 30-40 minutes. The scE2G README has tips for HPC clusters.

-
-
-

Run scE2G

-

Run Snakemake from inside the scE2G directory. The --config flags point scE2G at the MarchR cluster table and an output directory without editing scE2G’s own config/config.yaml. Use absolute paths.

-

For hg38 data:

-
snakemake -j1 --use-conda --use-singularity \
-  --configfile config/config.yaml \
-  --config cell_clusters=/path/to/scE2G_inputs/config_cell_clusters.tsv \
-           results_dir=/path/to/scE2G_results/
-

Drop --use-singularity to build every environment with conda instead of using scE2G’s container. Raise -j to run steps in parallel. On a workstation, also cap memory with --resources mem_mb=<MB>, for example --resources mem_mb=12000 on a 16 GB machine. Otherwise Snakemake can run memory-heavy steps for several clusters at once, and the operating system kills one of them.

-
-

hg19 Data

-

scE2G’s default reference files are hg38, but the ABC pipeline bundled inside it ships hg19 equivalents. Point the config at them; these paths are relative to the scE2G directory:

-
snakemake -j1 --use-conda --use-singularity \
-  --configfile config/config.yaml \
-  --config cell_clusters=/path/to/scE2G_inputs/config_cell_clusters.tsv \
-           results_dir=/path/to/scE2G_results/ \
-           chr_sizes=ENCODE_rE2G/ABC/reference/hg19/chrom_sizes.tsv \
-           regions_blocklist=ENCODE_rE2G/ABC/reference/hg19/wgEncodeHg19ConsensusSignalArtifactRegions.bed \
-           gene_TSS500=ENCODE_rE2G/ABC/reference/hg19/CollapsedGeneBounds.hg19.TSS500bp.bed \
-           genes=ENCODE_rE2G/ABC/reference/hg19/CollapsedGeneBounds.hg19.bed
-

The hematopoiesis project is hg19, so use this command for it. scE2G itself documents only hg38. Its model features (distances, accessibility ranks, and gene annotations joined by gene symbol) do not depend on the assembly, but the hg19 gene list differs slightly from the hg38 list the models were calibrated on.

-
-
- - - - -
-
- -
- - - - - - - - - - - - - - - - From a6c3268d71787a7e7ea41c3920ec3520e743e270 Mon Sep 17 00:00:00 2001 From: erliuu Date: Fri, 4 Dec 2026 13:43:28 -0800 Subject: [PATCH 4/4] chore([md] tutorials): Additional tutorial modifications, link README to correct Github Pages --- .gitignore | 1 + README.md | 8 ++++---- _pkgdown.yml | 8 ++++---- vignettes/marchr_chrombpnet.Rmd | 10 ++++++---- vignettes/marchr_hematopoiesis.Rmd | 6 +++--- vignettes/marchr_multiome.Rmd | 4 ++-- vignettes/marchr_scE2G.Rmd | 8 +++++--- 7 files changed, 25 insertions(+), 20 deletions(-) diff --git a/.gitignore b/.gitignore index a2cc3fc..74ea656 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ renv.lock *.tar.gz .worktrees/ docs +vignettes/*.html \ No newline at end of file diff --git a/README.md b/README.md index 0589fd9..20235ea 100644 --- a/README.md +++ b/README.md @@ -143,10 +143,10 @@ failed, the full error, and the output of `sessionInfo()`. ## Documentation -- [Hematopoiesis tutorial](vignettes/marchr_hematopoiesis.Rmd) for a first scATAC-seq analysis -- [Multiome tutorial](vignettes/marchr_multiome.Rmd) for joint ATAC and RNA analysis (work in progress) -- [Function documentation](man/) -- [Release notes](NEWS.md) +- [Hematopoiesis Tutorial](https://greenleaflab.github.io/MarchR/articles/marchr_hematopoiesis.html) for a first scATAC-seq analysis +- [Multiome Tutorial](https://greenleaflab.github.io/MarchR/articles/marchr_multiome.html) for joint ATAC and RNA analysis +- [Function Documentation](https://greenleaflab.github.io/MarchR/reference/index.html) +- [Release Notes](https://greenleaflab.github.io/MarchR/news/index.html) ### Citation diff --git a/_pkgdown.yml b/_pkgdown.yml index 6cffc8b..0f8be72 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -75,12 +75,12 @@ navbar: text: Tutorials icon: fa-book-open menu: - - text: Hematopoiesis + - text: Quick Tutorial href: articles/marchr_hematopoiesis.html - - text: ChromBPNet Export - href: articles/marchr_chrombpnet.html - text: Multiome href: articles/marchr_multiome.html + - text: ChromBPNet Export + href: articles/marchr_chrombpnet.html - text: scE2G Export href: articles/marchr_scE2G.html repo: @@ -99,8 +99,8 @@ articles: - title: Tutorials contents: - marchr_hematopoiesis - - marchr_chrombpnet - marchr_multiome + - marchr_chrombpnet - marchr_scE2G reference: - title: All Functions diff --git a/vignettes/marchr_chrombpnet.Rmd b/vignettes/marchr_chrombpnet.Rmd index eae3719..aab3bec 100644 --- a/vignettes/marchr_chrombpnet.Rmd +++ b/vignettes/marchr_chrombpnet.Rmd @@ -1,5 +1,5 @@ --- -title: "Exporting Pseudobulks for ChromBPNet with MarchR (WIP)" +title: "Exporting Pseudobulks for ChromBPNet with MarchR" author: "Eric Liu" output: html_document: @@ -82,6 +82,8 @@ details.marchr-log .marchr-log-body { } ``` +> **Tutorial is currently a work in progress (WIP).** + ## Introduction [ChromBPNet](https://github.com/kundajelab/chrombpnet) learns base-resolution chromatin accessibility @@ -91,7 +93,7 @@ fragments by cluster instead of sample to train cluster-specific ChromBPNet mode This tutorial provides instructions to setup your single-cell ATAC datasets from your MarchRProject directly for ChromBPNet model training. -It continues from the end of the [MarchR Hematopoiesis tutorial](marchr_hematopoiesis.html) and +It continues from the end of the [MarchR Hematopoiesis Tutorial](marchr_hematopoiesis.html) and exports the files that the ChromBPNet pipeline reads. **We highly recommend you read the [ChromBPNet Wiki](https://github.com/kundajelab/chrombpnet/wiki) prior to starting this tutorial.** @@ -120,7 +122,7 @@ library(MarchR) set_threads(4) ``` -The Hematopoiesis tutorial saved its project to `cache_dir`. +The Hematopoiesis Tutorial saved its project to `cache_dir`. The export is written next to it, in `export_dir`. ```{r} @@ -158,7 +160,7 @@ proj <- add_reproducible_peak_set( ## Grouping Fragments by Cluster -Each of the `atac_clusters` from the Hematopoiesis tutorial becomes one pseudobulk, one fragment +Each of the `atac_clusters` from the Hematopoiesis Tutorial becomes one pseudobulk, one fragment file, and one ChromBPNet model. ```{r fig.width=7, fig.height=6} diff --git a/vignettes/marchr_hematopoiesis.Rmd b/vignettes/marchr_hematopoiesis.Rmd index 6f5ffb2..1849ab9 100644 --- a/vignettes/marchr_hematopoiesis.Rmd +++ b/vignettes/marchr_hematopoiesis.Rmd @@ -1,5 +1,5 @@ --- -title: "MarchR Hematopoiesis tutorial" +title: "MarchR Hematopoiesis Tutorial" author: "Eric Liu" output: html_document: @@ -7,7 +7,7 @@ output: toc_float: true toc_depth: 2 vignette: > - %\VignetteIndexEntry{MarchR Hematopoiesis tutorial} + %\VignetteIndexEntry{MarchR Hematopoiesis Tutorial} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- @@ -84,7 +84,7 @@ details.marchr-log .marchr-log-body { ## Introduction -This is a brief MarchR tutorial, based upon the [ArchR "Hematopoiesis" Tutorial](https://www.archrproject.com/articles/Articles/tutorial.html). +This is a brief MarchR tutorial, based upon the [ArchR Tutorial](https://www.archrproject.com/articles/Articles/tutorial.html). It does not showcase all of MarchR's functionality or each step in detail. **Importantly, this tutorial assumes that your are running MarchR locally.** diff --git a/vignettes/marchr_multiome.Rmd b/vignettes/marchr_multiome.Rmd index 08a5f76..d4803a7 100644 --- a/vignettes/marchr_multiome.Rmd +++ b/vignettes/marchr_multiome.Rmd @@ -1,5 +1,5 @@ --- -title: "MarchR Multiome (ATAC + RNA) Tutorial (WIP)" +title: "MarchR Multiome (ATAC + RNA) Tutorial" author: "Eric Liu" output: html_document: @@ -7,7 +7,7 @@ output: toc_float: true toc_depth: 2 vignette: > - %\VignetteIndexEntry{MarchR Multiome (ATAC + RNA) Tutorial (WIP)} + %\VignetteIndexEntry{MarchR Multiome (ATAC + RNA) Tutorial} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- diff --git a/vignettes/marchr_scE2G.Rmd b/vignettes/marchr_scE2G.Rmd index a8615de..831371d 100644 --- a/vignettes/marchr_scE2G.Rmd +++ b/vignettes/marchr_scE2G.Rmd @@ -1,5 +1,5 @@ --- -title: "MarchR scE2G tutorial (WIP)" +title: "MarchR scE2G tutorial" author: "Eric Liu" output: html_document: @@ -16,6 +16,8 @@ vignette: > knitr::opts_chunk$set(collapse = FALSE, eval = FALSE) ``` +> **Tutorial is currently a work in progress (WIP).** + ## Introduction [scE2G](https://github.com/EngreitzLab/scE2G) predicts which enhancers regulate which genes in @@ -29,7 +31,7 @@ scE2G instead scores links within each cluster, and its ATAC-only model needs no scE2G runs as its own Snakemake pipeline. MarchR writes the inputs with `write_sce2g_inputs()`; you then run scE2G and read its predictions back into R for plotting. -**This tutorial continues from the hematopoiesis tutorial** (`vignette("marchr_hematopoiesis")`): +**This tutorial continues from the Hematopoiesis Tutorial** (`vignette("marchr_hematopoiesis")`): an hg19 scATAC-seq project with clusters stored in `atac_clusters`. ## Requirements @@ -46,7 +48,7 @@ BiocManager::install("Rsamtools") ## Setup -Load MarchR and the project saved at the end of the hematopoiesis tutorial. +Load MarchR and the project saved at the end of the Hematopoiesis Tutorial. ```{r} library(MarchR)