get_abundance_info: get_abundance_info

View source: R/pipeline_wrappers.R

get_abundance_infoR Documentation

get_abundance_info

Description

get_abundance_info Visualize cell type abundances.

Usage

get_abundance_info(sce, sample_id, group_id, celltype_id, min_cells = 10, senders_oi, receivers_oi, batches = NA)

Arguments

sce

SingleCellExperiment object of the scRNAseq data of interest. Contains both sender and receiver cell types.

sample_id

Name of the meta data column that indicates from which sample/patient a cell comes from

group_id

Name of the meta data column that indicates from which group/condition a cell comes from

celltype_id

Name of the column in the meta data of sce that indicates the cell type of a cell.

min_cells

Indicates the minimal number of cells that a sample should have to be considered in the DE analysis. Default: 10. See 'muscat::pbDS'.

senders_oi

Default NULL: all celltypes will be considered as senders. If you want to select specific senders_oi: you can add this here as character vector.

receivers_oi

Default NULL: all celltypes will be considered as receivers. If you want to select specific receivers_oi: you can add this here as character vector.

batches

NA if no batches should be corrected for. If there should be corrected for batches during DE analysis and pseudobulk expression calculation, this argument should be the name(s) of the columns in the meta data that indicate the batch(s). Should be categorical. Pseudobulk expression values will be corrected for the first element of this vector.

Value

List containing cell type abundance plots and abundance_data data frame.

Examples

## Not run: 
library(dplyr)
sample_id = "tumor"
group_id = "pEMT"
celltype_id = "celltype"
senders_oi = SummarizedExperiment::colData(sce)[,celltype_id] %>% unique()  
receivers_oi = SummarizedExperiment::colData(sce)[,celltype_id] %>% unique() 
abundance_celltype_info = get_abundance_info(sce = sce, sample_id = sample_id, group_id = group_id, celltype_id =  celltype_id, min_cells = 10, senders_oi = senders_oi, receivers_oi = receivers_oi)

## End(Not run)


saeyslab/multinichenetr documentation built on Jan. 15, 2025, 7:55 p.m.