Convert sc-matrix to simulated bulk

as_bulk(m, groups = NULL, isLog = TRUE, by = "mean")

Arguments

m

non-row-centered logTPM or TPM matrix.

groups

if not NULL, return a simulated bulk column per group in groups. Default: NULL

isLog

set to FALSE if 'm' is in TPM form. Default: TRUE

Value

simulated bulk matrix. If groups is NULL, one column is returned for the average across all cells. Else one column per group in 'groups'.