View source: R/expression_processing.R
get_pseudobulk_logCPM_exprs | R Documentation |
get_pseudobulk_logCPM_exprs
Calculate the 'library-size' normalized pseudbulk counts per sample for each gene - returned values are similar to logCPM.
get_pseudobulk_logCPM_exprs(sce, sample_id, celltype_id, group_id, covariates = NA, assay_oi_pb = "counts", fun_oi_pb = "sum")
sce |
SingleCellExperiment object of the scRNAseq data of interest. |
sample_id |
Name of the meta data column that indicates from which sample/patient a cell comes from (in sce) |
celltype_id |
Name of the column in the meta data of sce that indicates the cell type of a cell. |
group_id |
Name of the meta data column that indicates from which group/condition a cell comes from (in sce) |
covariates |
NA if no covariates should be corrected for. If there should be corrected for covariates, this argument should be the name(s) of the columns in the meta data that indicate the covariate(s). |
assay_oi_pb |
Indicates which information of the assay of interest should be used (counts, scaled data,...). Default: "counts". See 'muscat::aggregateData'. |
fun_oi_pb |
Indicates way of doing the pseudobulking. Default: "sum". See 'muscat::aggregateData'. |
Data frame with logCPM-like values of the library-size corrected pseudobulked counts ('pb_sample') per gene per sample. pb_sample = log2( ((pb_raw/effective_library_size) \* 1000000) + 1). effective_library_size = lib.size \* norm.factors (through edgeR::calcNormFactors).
## Not run: library(dplyr) sample_id = "tumor" group_id = "pEMT" celltype_id = "celltype" pseudobulk_logCPM_exprs = get_pseudobulk_logCPM_exprs(sce = sce, sample_id = sample_id, celltype_id = celltype_id, group_id = group_id) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.