Learn R Programming

gsdensity (version 0.1.2)

compute.spec: This is to calculate the similarity between: 1. the label propagation probability of cells for gene sets and 2. the identify of cells in partitions

Description

This is to calculate the similarity between: 1. the label propagation probability of cells for gene sets and 2. the identify of cells in partitions

Usage

# S3 method for spec
compute(cell_df, metadata, cell_group)

Value

specificity of a pathway activity and other levels of cell annotations (e.g., cell type) in object@meta.data)

Arguments

cell_df

the output of run.rwr.list

metadata

a data frame with cell information (each row is a cell; usually object@meta.data)

cell_group

cell partition vector (usually a column name

Examples

Run this code
# \donttest{
cells <- colnames(pbmc.mtx)
el <- gsdensity::compute.nn.edges(coembed = ce, nn.use = 300)
cv <- gsdensity::run.rwr.list(el = el, gene_set = gene.set.list[1:30], cells = cells)
jsd.df <- compute.spec(cell_df = cv,
                      metadata = pbmc.meta,
                      cell_group = "seurat_annotations"
                     )
# }

Run the code above in your browser using DataLab