Skip to contents

The function markerGSEA calculates gene (marker) set enrichment of cluster-specific variable markers within bone cell type- or bone tissue-specific marker database.

Usage

markerGSEA(
  varMarkers,
  markers = NULL,
  systemLevel = "cellType",
  byDatabase = TRUE,
  minSize = 5,
  maxSize = 50000
)

Arguments

varMarkers

A data.frame containing variable markers for each cluster as reported by FindAllMarkers function from Seurat package.

markers

Optional user provided named list with markers.

systemLevel

Optional string specifying on which systematic level to perform enrichment, options: "cellType" or "tissue". Default: "cellType". Use only when NOT providing your own markers variable.

byDatabase

Optional logical variable specifying if enrichment should be performed separately for each database (i.e. source from which markers were obtained): option TRUE (default). Or if the database column in markerDatabase should be ignored and enrichment is done on all available markers for a given cellType or tissue: option FALSE. Use only when NOT providing your own markers variable.

minSize

Optional number specifying a minimal number of markers within a marker set to be considered (defaults to 5).

maxSize

Optional umber specifying a maximal number of markers within a marker set to be considered (defaults to 50000).

Value

data.frame with following variables: pathway (name of list variable with markers used for GSEA) / pval (p-value) / padj (adjusted p-value) / log2err (log2(error)) / ES (enrichment score) / NES (normalized enrichment score - useful for multiple comparisons) / size (number of overlaps) / leadingEdge (overlapping markers) / cluster (cluster number)

Examples

varMarkerFile = system.file("extdata", "cluster_variable_features.csv",
                            package = "BoneCellType")
varMarkers = read.csv(varMarkerFile)
GSEAres = markerGSEA(varMarkers)

# use own markers
markerList = cellType_list
GSEAresCustom = markerGSEA(varMarkers, markers=cellType_list)