R/construct.R
music_basis.Rd
This function is used for generating cell type specific cross-subject mean and variance for each gene. Cell type specific library size is also calcualted.
music_basis(
x,
non.zero = TRUE,
markers = NULL,
clusters,
samples,
select.ct = NULL,
cell_size = NULL,
ct.cov = FALSE,
verbose = TRUE
)
SingleCellExperiment, single cell dataset
logical, default as TRUE. If true, remove all gene with zero expression.
vector or list of gene names. Default as NULL. If NULL, then use all genes provided.
character, the colData used as clusters;
character,the colData used as samples;
vector of cell types. Default as NULL. If NULL, then use all cell types provided.
data.frame of cell sizes. 1st column contains the names of cell types, 2nd column has the cell sizes per cell type. Default as NULL. If NULL, then estimate cell size from data.
logical. If TRUE, use the covariance across cell types.
logical, default as TRUE.
a list of
gene by cell type matrix of Design matrix;
subject by celltype matrix of Library size;
vector of average library size for each cell type;
gene by celltype matrix of average relative abundance;
gene by celltype matrix of cross-subject variation.