pseudobulk_sce: Generate a Pseudo-bulk SingleCellExperiment from a...

View source: R/pseudobulk_sce.R

pseudobulk_sceR Documentation

Generate a Pseudo-bulk SingleCellExperiment from a SingleCellExperiment

Description

Generate a pseudo-bulk of a SingleCellExperiment by summing counts of all cells from the same sample_var and celltype_var. The SCE is then re-annotated and library sizes calculated based on cell numbers.

Usage

pseudobulk_sce(
  sce,
  sample_var = "individual",
  celltype_var = "cluster_celltype",
  assay_name = "counts",
  keep_vars = c("individual", "group", "sex", "age", "PMI", "RIN", "seqdate")
)

Arguments

sce

a SingleCellExperiment object

sample_var

the variable name identifying unique samples

celltype_var

the variable name identifying cell types

assay_name

the assay name for pseudobulking (e.g. "counts")

keep_vars

metadata variables to keep from the SingleCellExperiment

Value

pb_sce a pseudobulk SingleCellExperiment object

See Also

Other differential gene expression: .filter_sce_genes_for_de(), .generate_model_from_vars(), .perform_de_with_mast(), .preprocess_sce_for_de(), perform_de(), report_de(), volcano_plot()


combiz/scFlow documentation built on Feb. 25, 2024, 10:25 a.m.