View source: R/prioritization.R
calculate_de | R Documentation |
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.
calculate_de(seurat_obj, celltype_colname, condition_oi = NA, condition_colname = NA, assay_oi = "RNA", ...)
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 |
... |
Arguments passed to Seurat::FindAllMarkers(by default: features = NULL, min.pct = 0, logfc.threshold = 0, return.thresh = 1) |
A dataframe containing the DE results
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.