calculate_de: Calculate differential expression of one cell type versus all...

View source: R/prioritization.R

calculate_deR Documentation

Calculate differential expression of one cell type versus all other cell types

Description

calculate_de Calculate differential expression of one cell type versus all other cell types using Seurat::FindAllMarkers. If condition_oi is provided, only consider cells from that condition.

Usage

calculate_de(seurat_obj, celltype_colname, condition_oi = NA, condition_colname = NA, assay_oi = "RNA", ...)

Arguments

seurat_obj

Seurat object

celltype_colname

Name of the meta data column that indicates the cell type of a cell

condition_oi

If provided, subset seurat_obj so DE is only calculated for cells belonging to condition_oi

condition_colname

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

assay_oi

Which assay need to be used for DE calculation. If NULL, will use DefaultAssay

...

Arguments passed to Seurat::FindAllMarkers(by default: features = NULL, min.pct = 0, logfc.threshold = 0, return.thresh = 1)

Value

A dataframe containing the DE results

Examples

## Not run: 
seurat_obj = readRDS(url("https://zenodo.org/record/3531889/files/seuratObj.rds"))
seurat_obj$celltype <- make.names(seurat_obj$celltype)
# Calculate cell-type specific markers across conditions
calculate_de(seurat_obj, "celltype")
# Calculate LCMV-specific cell-type markers
calculate_de(seurat_obj, "celltype", condition_oi = "LCMV", condition_colname = "aggregate")

## End(Not run)


saeyslab/nichenetr documentation built on April 27, 2024, 9:24 p.m.