Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Package: MarchR
Type: Package
Title: Multi-Assay Multi-Dataset Disk-Backed Analysis
Version: 0.2.0
Version: 0.3.0
Authors@R: c(
person("Eric", "Liu", , "erliu1@stanford.edu", role = c("aut", "cre")),
person("Immanuel", "Abdi", , "iabdi@stanford.edu", role = c("aut")),
person("Stanford University", role=c("cph", "fnd")))
Date: 2026-09-29
Date: 2026-10-26
Description: Multi-Assay Multi-Dataset Disk-Backed Analysis.
License: MIT + file LICENSE
Encoding: UTF-8
Expand Down
42 changes: 21 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
MIT License
Copyright (c) 2026 MarchR Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
MIT License

Copyright (c) 2026 MarchR Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ S3method(align_cells,MarchRDataset)
S3method(align_cells,MarchRProject)
S3method(apply_to_assay,MarchRDataset)
S3method(apply_to_assay,MarchRProject)
S3method(as.data.frame,MarkerResult)
S3method(cell_names,MarchRDataset)
S3method(cell_names,MarchRProject)
S3method(custom_enrichment,MarchRProject)
Expand Down Expand Up @@ -249,7 +250,6 @@ export(add_umap)
export(align_assays)
export(align_cells)
export(apply_to_assay)
export(as.data.frame.MarkerResult)
export(assert_that)
export(cell_names)
export(create_example_project)
Expand Down
29 changes: 28 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1 +1,28 @@
# MarchR 0.2.0
# MarchR 0.3.0

## New features

* Reworked progress logging across modules, with per-step and total elapsed times. set `options(MarchR.verbose = TRUE)` to enable `verbose` logging in session globally.
* `write_sce2g_inputs()` exports project data for the scE2G enhancer-gene linkage pipeline.
* `add_background_peaks()` reimplements betterChromVAR on BPCells streaming, with chunked on-disk output to cap memory.
* `get_tutorial_data()` downloads the hematopoiesis tutorial fragment files.
* New tutorials: scE2G, ChromBPNet pseudobulk export, and multiome (work in progress).

## Performance

* `TileMatrix` is stored column-major by default, speeding up IterativeLSI.
* Per-assay feature totals are stored and reused by doublet scoring and IterativeLSI, and are updated when cells are removed.

## Behavior changes

* UMAP uses `uwot::umap2()` and accepts `batch`; requires uwot >= 0.2.5.
* An assay must use one storage order across datasets; `add_matrix()` errors otherwise.
* `get_values()` returns a single assay.
* Default doublet simulation trials are now `5 * max(floor(n_cells / n_doublets), 1)`.
* `project()`, `project_bulk_atac()`, `add_module_score()`, and `add_gene_integration_matrix()`
run their BPCells matrix passes single-threaded by default.

## Bug fixes

* Gene tracks merge exons within the plotting window and warn when a gene has no exon annotations.
* `add_marker_features()` bias matching now searches `k` neighbors (capped at the background pool size); previously it used the KNN method's own default (10 for `knn_hnsw()`).
4 changes: 2 additions & 2 deletions R/fragment_ops.R
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ add_tile_matrix <- function(
#' @export
add_tile_matrix.MarchRDataset <- function(
proj,
frags_name = NULL,
frags_name = character(0),
output_assay_name = "TileMatrix",
genome = NULL,
ranges = NULL,
Expand Down Expand Up @@ -255,7 +255,7 @@ add_tile_matrix.MarchRDataset <- function(
#' @export
add_tile_matrix.MarchRProject <- function(
proj,
frags_name = NULL,
frags_name = character(0),
dataset_names = character(0),
output_assay_name = "TileMatrix",
ranges = NULL,
Expand Down
1 change: 1 addition & 0 deletions R/markers.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ print.MarkerResult <- function(x, ...) {
))
}

#' @method as.data.frame MarkerResult
#' @export
as.data.frame.MarkerResult <- function(x, ...) {
as.data.frame(x$results)
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,13 @@ options(repos = BiocManager::repositories())
remotes::install_github("bnprks/BPCells/r")

# Installs MarchR and the packages required by the tutorial.
remotes::install_github("GreenleafLab/MarchR@v0.2.0", upgrade = "never")
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:
# remotes::install_local("~/software/MarchR", upgrade = "never")
# 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)
Expand Down Expand Up @@ -166,5 +169,5 @@ 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.2.0. https://github.com/GreenleafLab/MarchR
R package version 0.3.0. https://github.com/GreenleafLab/MarchR
```
4 changes: 2 additions & 2 deletions man/add_tile_matrix.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions tests/testthat/test-fragment_ops.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ test_that("add_tile_matrix stores a column-major TileMatrix in the project direc
expect_identical(as(stored, "dgCMatrix"), as(lazy, "dgCMatrix"))
})

test_that("add_tile_matrix auto-selects the only fragment set", {
ds <- .add_test_tiles(create_test_dataset(include_fragments = TRUE))
proj <- .add_test_tiles(.tile_test_project())

expect_true("TileMatrix" %in% names(ds$matrices))
expect_true("TileMatrix" %in% names(proj$datasets$d1$matrices))
})

test_that("add_tile_matrix keeps the existing matrix when overwrite = FALSE", {
proj <- .add_test_tiles(.tile_test_project(), frags_name = "ATAC")
before <- as(proj$datasets$d1$matrices$TileMatrix, "dgCMatrix")
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ test_that("partial_apply keeps new arguments when re-wrapping its own partial",
s3 <- partial_apply(LSI(n_dimensions = 5L), threads = 2L, .missing_args_error = FALSE)
expect_identical(attr(s3, "fn"), LSI)
expect_identical(attr(s3, "args")$n_dimensions, 5L)
})

test_that("log_progress prints a timestamp and the message", {
expect_null(.log_clock$start)
msgs <- capture_messages(log_progress("Computing LSI"))
Expand Down
Loading