compute.spec: This is to calculate the similarity between: 1. the label...

View source: R/gsdensity_functions.R

compute.specR Documentation

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 class 'spec'
compute(cell_df, metadata, cell_group)

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

Value

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

Examples


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"
                     )


gsdensity documentation built on March 31, 2023, 8:32 p.m.