Skip to contents

Simulates pseudo-single-cells from each bulk sample's peak counts and projects them through a fitted reduction, placing bulk samples alongside single cells in LSI and UMAP space.

Usage

project_bulk_atac(x, se_atac, ...)

Arguments

x

(DimReduction or MarchRProject) Fitted reduction, or a project holding one.

se_atac

(RangedSummarizedExperiment) Bulk ATAC counts with rowRanges peak coordinates.

...

Passed to methods.

dim_reduction_name

(character) Reduction to project into. Auto-selected if only one exists.

embedding_name

(character; optional) UMAP cell metadata column prefix. NULL returns reduced dimensions only. Default: "UMAP".

assay_name

(character) Assay in se_atac holding counts. Default: "counts".

reduced_dims_assay

(character; optional) Assay holding cell embeddings. Defaults to dim_reduction_name.

dataset_names

(character) Datasets to draw cells from. Defaults to all.

n

(numeric) Pseudo-cells per bulk sample. Default: 250.

iteration

(numeric; optional) Reduction iteration whose features set the simulated depth. Defaults to the final iteration.

umap_params

(list) Arguments for uwot::umap() when rebuilding the model. Should match those passed to add_umap. Default: list().

n_check_cells

(numeric) Real cells re-transformed to validate the model. Default: 5000.

min_corr

(numeric) Reprojection correlation below which a warning is raised. Default: 0.8.

force

(logical) Proceed when under 25% of reduction features are covered. Default: FALSE.

seed

(numeric) Random seed. Default: 1.

threads

(integer) Threads for the UMAP transform in the MarchRProject method. Default get_threads(). The DimReduction method projects single-threaded (default NULL).

verbose

(logical) Print progress messages. Default getOption("MarchR.verbose", FALSE).

Value

A list with simulated_reduced_dims, overlap_ratio and depth_n, plus simulated_umap, cell_umap and projection_corr unless embedding_name is NULL.

Details

Bulk counts are treated as a multinomial over the reduction's features. New projects use the exact transform model persisted by add_umap(). Projects created before transform-model persistence fall back to rebuilding a model pinned to their stored coordinates, with a warning.

ArchR correspondence

Corresponds to ArchR's projectBulkATAC(). Scaling follows the reduction's scale_dims setting rather than being applied unconditionally, and features are drawn by weight rather than by count expansion, which keeps non-integer counts intact.