get_avg_frac_exprs_abund: get_avg_frac_exprs_abund

View source: R/expression_processing.R

get_avg_frac_exprs_abundR Documentation

get_avg_frac_exprs_abund

Description

get_avg_frac_exprs_abund Calculate the average and fraction of expression of each gene per sample and per group. Calculate relative abundances of cell types as well.

Usage

get_avg_frac_exprs_abund(sce, sample_id, celltype_id, group_id, covariates = NA)

Arguments

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).

Value

List containing data frames with average and fraction of expression per sample and per group (and pseudobulked), and relative cell type abundances as well.

Examples

## Not run: 
library(dplyr)
sample_id = "tumor"
group_id = "pEMT"
celltype_id = "celltype"
celltype_info = get_avg_frac_exprs_abund(sce = sce, sample_id = sample_id, celltype_id =  celltype_id, group_id = group_id)

## End(Not run)


saeyslab/muscatWrapper documentation built on March 11, 2023, 6:14 p.m.