analyzeEnrichment: Analyze PC Enrichment

View source: R/Visualizations_Seurat_based.R

analyzeEnrichmentR Documentation

Analyze PC Enrichment

Description

This function performs enrichment analysis for the genes associated with positive and negative loadings of a given principal component (PC) in a Seurat object.

Usage

analyzeEnrichment(
  SerObj,
  CompN = 1,
  topN = 20,
  qrhub = "org.Hs.eg.db",
  invertWeights = F,
  labsize = 3.5,
  fontsize = 0.25,
  base_size = 20,
  max.overlaps = 20,
  MaxNsig = 30,
  reduction = "pca",
  redLab = "PC",
  topNGenes = 100,
  bottomNGenes = 100
)

Arguments

SerObj

A Seurat object containing the data.

CompN

The principal component number.

topN

The number of top genes to consider for enrichment analysis.

qrhub

The gene database used for enrichment analysis.

Value

A list containing two ggplot objects for positive and negative loadings.

Examples

## Not run: 
result <- analyzeEnrichment(SerObj, CompN = 1, topN = 20, qrhub = "org.Hs.eg.db")
result$ggGO_pos | result$ggGO_neg

## End(Not run)

eisascience/scCustFx documentation built on June 2, 2025, 3:59 a.m.