census: Applies the Census count transformation on a count matrix

View source: R/census.R

censusR Documentation

Applies the Census count transformation on a count matrix

Description

needs a sparse matrix with cells in columns and genes in rows. You can find the detailed explaination here: http://cole-trapnell-lab.github.io/monocle-release/docs/#census

Usage

census(
  matrix,
  exp_capture_rate = 0.25,
  expr_threshold = 0,
  BPPARAM = BiocParallel::bpparam(),
  run_parallel = FALSE
)

Arguments

matrix

sparse count matrix; cells in columns, genes in rows

exp_capture_rate

expected capture rate; default=0.25

expr_threshold

expression threshold; default=0

BPPARAM

BiocParallel::bpparam() by default; if specific number of threads x want to be used, insert: BiocParallel::MulticoreParam(workers = x)

run_parallel

boolean, decide if multi-threaded calculation will be run. FALSE by default

Value

a vector for each cell-type, with a scaling factor which can be used to transform the counts of the matrix

Examples


tpm <- Matrix::Matrix(matrix(rpois(3e5, 5), ncol = 300), sparse = TRUE)
tpm <- Matrix::t(1e6 * Matrix::t(tpm) / Matrix::colSums(tpm))
cen <- SimBu::census(tpm)


omnideconv/SimBu documentation built on May 5, 2024, 12:33 p.m.