Skip to contents

Given cell to metacell association, summarise atac read counts to generate a McCounts object. This can take a while - around 5 minutes using 24 cores on the PBMC dataset.

Usage

scc_to_mcc(sc_counts, cell_to_metacell, ignore_metacells = c(-1, -2))

scc_project_on_mc(sc_counts, cell_to_metacell, ignore_metacells = c(-1, -2))

Arguments

sc_counts

A ScCounts object

cell_to_metacell

a data.frame with columns cell_id and metacell containing the mapping from single cell names to metacell names, or the name of an 'h5ad' file containing this information at the 'obs' slot. In such a case, the 'obs' slot should contain a column named metacell and the rownames should be the cell names.

ignore_metacells

a vector of metacells to ignore. Default: -1, -2 (the "outliers" metacell in the metacell2 python package).

Value

A McCounts object

Examples

if (FALSE) {
data(cell_to_metacell_pbmc_example)
scc_to_mcc(sc_counts, cell_to_metacell_pbmc_example)
}