Skip to contents

given an McCounts object and peaks, summarise the counts over the peaks and return a McPeaks object

Usage

mcc_to_mcatac(
  mc_counts,
  peaks,
  metacells = NULL,
  metadata = NULL,
  mc_size_eps_q = 0.1
)

Arguments

mc_counts

a McCounts object

peaks

a data frame with the peak intervals (chrom, start, end) and a column called "peak_name"

metacells

names of metacells to include. Default: all metacells.

metadata

(optional) per-metacell metadata. A data frame with a column called 'metacell' and additional metacell annotations.

mc_size_eps_q

(optional) quantile of MC size (in UMIs) to scale the number of UMIs per metacell. \(egc_ij\) would then be the fraction of peak i in metacell j multiplied by the mc_size_eps_q quantile of metacell sizes.

Value

a McPeaks object

Examples

if (FALSE) {
atac_sc <- import_from_10x("pbmc_data", genome = "hg38")
mc_counts <- mcc_read("pbmc_reads_mc")
atac_mc <- mcc_to_mcatac(mc_counts, atac_sc@peaks)
}