View source: R/caesar_enrichscore.R
CAESAR.CTDEP | R Documentation |
This function tests whether specific pathways are differentially enriched in particular cell types with cell types stored in a Seurat object. The function applies the Wilcoxon rank-sum test to compare the pathway scores between cells of a given cell type and all other cells. It supports parallel computation to speed up the testing process.
CAESAR.CTDEP(
seu,
pathway_scores,
ident = NULL,
cts = NULL,
parallel = TRUE,
ncores = 10,
seed = 1
)
seu |
A Seurat object containing the single-cell RNA-seq data. |
pathway_scores |
A matrix of pathway scores where rows represent cells and columns represent different pathways. |
ident |
A character string specifying the column name in the Seurat object's metadata to use as the cell type labels. If |
cts |
A character vector specifying the cell types to test. If |
parallel |
Logical, indicating whether to run the computation in parallel. Default is |
ncores |
An integer specifying the number of cores to use for parallel computation. Default is 10. |
seed |
An integer specifying the random seed for reproducibility in parallel computation. Default is 1. |
A matrix of p-values where rows represent the pathways and columns represent the tested cell types.
wilcox.test
for the Wilcoxon rank-sum test.
CAESAR.enrich.score
for spot level pathway enrich scores.
data(toydata)
seu <- toydata$seu
pathway_list <- toydata$pathway_list
cts <- levels(seu)[1:2]
enrich.score <- CAESAR.enrich.score(seu, pathway_list)
dep.pvals <- CAESAR.CTDEP(seu, enrich.score, cts = cts)
print(dep.pvals)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.