scGOEnrichment: Perform GO Enrichment Analysis

View source: R/Seurat.Utils.Visualization.R

scGOEnrichmentR Documentation

Perform GO Enrichment Analysis

Description

This function performs Gene Ontology (GO) enrichment analysis using the clusterProfiler::enrichGO function. It takes the gene list, universe, organism database, gene identifier type, and ontology type as inputs and returns the enrichment results.

Usage

scGOEnrichment(
  genes,
  universe = NULL,
  org_db = "org.Hs.eg.db",
  key_type = "SYMBOL",
  ont = "BP",
  pAdjustMethod = "BH",
  pvalueCutoff = 0.05,
  qvalueCutoff = 0.2,
  save = TRUE,
  suffix = NULL,
  check.gene.symbols = TRUE,
  ...
)

Arguments

genes

Character vector. List of genes for enrichment analysis. Default: NULL.

universe

Character vector. Background gene list (universe). Default: NULL.

org_db

Character. Organism-specific database to use (e.g., 'org.Hs.eg.db'). Default: 'org.Hs.eg.db'.

key_type

Character. Gene identifier type (e.g., 'SYMBOL', 'ENTREZID'). Default: 'SYMBOL'.

ont

Character. Ontology type to use (e.g., 'BP', 'MF', 'CC'). Default: 'BP'.

pAdjustMethod

Character. Method for p-value adjustment. Default: 'BH' for Benjamini-Hochberg.

pvalueCutoff

Numeric. P-value cutoff for significance. Default: 0.05.

qvalueCutoff

Numeric. Q-value cutoff for significance. Default: 0.2.

save

Logical. Save the results as a data frame. Default: TRUE.

suffix

Character. Suffix to append to the output file name. Default: 'GO.Enrichments'.

check.gene.symbols

Logical. Check gene symbols for validity. Default: TRUE.

...

Additional arguments to pass to clusterProfiler::enrichGO.

Value

A data frame with GO enrichment results.

Examples

## Not run: 
gene_list <- rownames(df.m.DL.up.in.TSC)
background_genes <- names(all.genes)
go_results <- performGOEnrichment(gene_list, background_genes, "org.Hs.eg.db", "SYMBOL", "BP")
print(go_results)

## End(Not run)

vertesy/Seurat.utils documentation built on Dec. 4, 2024, 5:20 p.m.