RunGroupGSEA: Run GSEA on cluster/groups

View source: R/gsea.R

RunGroupGSEAR Documentation

Run GSEA on cluster/groups

Description

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

Usage

RunGroupGSEA(
  X,
  pathways,
  group.by,
  reduction,
  dims,
  features,
  nperm,
  minSize,
  maxSize,
  gseaParam
)

## S3 method for class 'Seurat'
RunGroupGSEA(
  X,
  pathways,
  group.by = NULL,
  reduction = "mca",
  dims = seq(50),
  features = NULL,
  nperm = 1000,
  minSize = 10,
  maxSize = 500,
  gseaParam = 0
)

## S3 method for class 'SingleCellExperiment'
RunGroupGSEA(
  X,
  pathways,
  group.by,
  reduction = "MCA",
  dims = seq(50),
  features = NULL,
  nperm = 1000,
  minSize = 10,
  maxSize = 500,
  gseaParam = 0
)

Arguments

X

pathways List of gene sets to check

pathways

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

group.by

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

reduction

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

dims

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

features

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

nperm

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

minSize

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

maxSize

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

gseaParam

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

Value

A data.table with geneset enrichment analysis statistics.

Examples

seuratPbmc <- RunMCA(seuratPbmc, nmcs = 5)
GSEAResults <- RunGroupGSEA(seuratPbmc, Hallmark, group.by = "seurat_clusters", dims = 1:5)

RausellLab/CelliD documentation built on Jan. 12, 2024, 3:44 a.m.