
Fits a residual model for meta cells
rs_mc_fit_residuals.Rd
In-memory version of
rs_sc_fit_residuals(). Meta cell counts are
summed UMIs, so the negative binomial the residual models describe is still
defined; it just sits at a much greater depth than a single cell.
Arguments
- sparse_data
A named list that needs to have
data,indptr,indices,nrow,ncolandcs_type. Shape is (metacells, genes). Pass raw counts.- method
String. One of
c("sctransform", "analytic_pearson").- group_of_cell
Integer vector or
NULL. Group label per meta cell. (0-indexed, dense!)NULLfits one model.- covariates
Named list of numeric vectors, one per covariate, each of length
nrow. scTransform only.- params
Named list. See
params_sc_sctransform()orparams_sc_apr().- seed
Integer. Seed for the step-1 subsample.
- verbose
Integer.
0L- quiet;1L- normal verbosity;2L- detailed verbosity.
Value
A list as described in rs_sc_fit_residuals().