assignCelltype {ccfindR} | R Documentation

## Cell type assignment via GSEA

### Description

Computes GSEA enrichment score of marker sets in meta gene list

### Usage

    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 (Subramanian et al. 2005).

### Value

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

### References

Subramanian A, Tamayo P, Mootha VK, Mukherjee S, Ebert BL, Gillette MA, Paulovich A, Pomeroy SL, Golub TR, Lander ES, Mesirov JP (2005). “Gene set enrichment analysis: A knowledge-based approach for interpreting genome-wide expression profiles.” Proc. Natl. Acad. Sci., USA, 102(43), 15545–15550. doi: 10.1073/pnas.0506580102, https://doi.org/10.1073/pnas.0506580102.

### Examples

    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

[Package ccfindR version 1.12.0 Index]