This function performs GO or KEGG enrichment analysis using
clusterProfiler. Dependencies are loaded dynamically via
requireNamespace(), so the function will only require
clusterProfiler and annotation packages when executed.
Arguments
- gene
A character vector of gene symbols.
- db
Database to use:
"GO"or"KEGG".- species
Species:
"human"or"mouse".- keyType
Gene ID type used in
gene, e.g."SYMBOL".- qvalue_cutoff
Q-value threshold for filtering.
- use_internal_data
whether using internal KEGG data
- return_data
Logical. If
TRUE, returnenriched@result; otherwise return the full enrichment result object.
Details
KEGG analysis automatically converts gene IDs to ENTREZID using
clusterProfiler::bitr(). Human and mouse annotation packages
(org.Hs.eg.db and org.Mm.eg.db) are used depending on
species.
Examples
if (FALSE) { # \dontrun{
enrichment_analysis(c("TP53","MDM2"), db="GO", species="human")
} # }