assignCelltype: Cell type assignment via GSEA

Description Usage Arguments Details Value References Examples

View source: R/gsea.R

Description

Computes GSEA enrichment score of marker sets in meta gene list

Usage

1
2
3
assignCelltype(obj, rank, gset, gene_names = NULL, p = 0,
  remove.na = FALSE, p.value = FALSE, nperm = 1000,
  progress.bar = TRUE, grp.prefix = c("IG"))

Arguments

obj

Object of class scNMFSet.

rank

Rank to examine

gset

List of gene sets to be used as markers

gene_names

Names of genes to be used for meta-gene identification

p

Enrichment score exponent.

remove.na

Remove gene sets with no overlap

p.value

Estimatte p values using permutation

nperm

No. of permutation replicates

progress.bar

Display progress bar for p value computation

grp.prefix

Gene name prefix to search for with wildcard matches in query

Details

If obj is of clas scNMFSet, it computes meta gene list using meta_gene.cv. Otherwise, obj is expected to be a data frame of the same structure as the output of meta_gene.cv; the number of rows same as the total number of metagenes per cluster, three columns per each cluster (gene name, meta-gene score, and coefficient of variation). The argument gset is a list of gene sets to be checked for enrichment in each cluster meta gene list. The enrichment score is computed using the GSEA algorithm \insertCitesubramanian_etalccfindR.

Value

Matrix of enrichment score statistics with cell types in rows and clusters in columns

References

\insertRef

subramanian_etalccfindR

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
dir <- system.file('extdata',package='ccfindR')
pbmc <- read_10x(dir)
pbmc <- vb_factorize(pbmc, ranks=5)
meta <- meta_gene.cv(pbmc,rank=5, gene_names=rowData(pbmc)[,2])
markers <- list('B cell'=c('CD74','IG','HLA'),
                'CD8+ T'=c('CD8A','CD8B','GZMK','CCR7','LTB'),
                'CD4+ T'=c('CD3D','CD3E','IL7R','LEF1'),
                'NK'=c('GNLY','NKG7','GZMA','GZMH'),
                'Macrophage'=c('S100A8','S100A9','CD14','LYZ','CFD'))
gsea <- assignCelltype(meta, rank=5, gset=markers, grp.prefix=c('IG','HLA'))
gsea

ccfindR documentation built on Nov. 8, 2020, 5:12 p.m.