RunCellGSEA: Run Gene Set Enrichment Analysis on cells

Description Usage Arguments Value Examples

View source: R/gsea.R

Description

Calculate cells gene specificty ranking and then perform geneset enrichment analysis on it.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
RunCellGSEA(X, pathways, reduction, dims, features, cells, nperm, minSize,
  maxSize, gseaParam, n.core)

## S3 method for class 'Seurat'
RunCellGSEA(X, pathways, reduction = "mca",
  dims = seq(50), features = NULL, cells = NULL, nperm = 1000,
  minSize = 10, maxSize = 500, gseaParam = 0, n.core = 1)

## S3 method for class 'SingleCellExperiment'
RunCellGSEA(X, pathways,
  reduction = "mca", dims = seq(50), features = NULL, cells = NULL,
  nperm = 1000, minSize = 10, maxSize = 500, gseaParam = 0,
  n.core = 1)

Arguments

X

Seurat or SingleCellExperiment object

pathways

List of gene sets to check

reduction

Which dimensionality reduction to use, must be based on MCA.

dims

A vector of integers indicating which dimensions to use with reduction embeddings and loadings for distance calculation.

features

Character vector of feature names to subset feature coordinates. If not specified will take all features available from specified reduction Loadings.

cells

Character vector of cell names to subset cell coordinates. If not specified will take all features available from specified reduction Embeddings

nperm

Number of permutations to do. Minimial possible nominal p-value is about 1/nperm

minSize

Minimal size of a gene set to test. All pathways below the threshold are excluded.

maxSize

Maximal size of a gene set to test. All pathways above the threshold are excluded.

gseaParam

GSEA parameter value, all gene-level statis are raised to the power of 'gseaParam' before calculation of GSEA enrichment scores

n.core

A single integer to specify the number of core for parallelisation.

Value

A data.table with geneset enrichment analysis statistics.

Examples

1
2
seuratPbmc <- RunMCA(seuratPbmc, nmcs = 5)
GSEAResults <- RunCellGSEA(seuratPbmc, Hallmark, dims = 1:5)

Cortalak/cellID documentation built on Aug. 3, 2020, 9:01 p.m.