Skip to contents

Internal engine that performs Over-Representation Analysis via enricher. Returns the raw enricher result table with one ctdR-added column (foldEnrichment).

Column renaming, multiple-testing correction, chemical-name join, canonical ordering and sort are applied downstream by .format_enrichment_result so the engine stays close to its underlying tool's native vocabulary.

Usage

ora(ChemicalName_GeneSymbols, gene_symbols, pAdjustMethod = "BH", ...)

Arguments

ChemicalName_GeneSymbols

A data frame with two columns (term, gene) mapping CTD chemical IDs to HGNC gene symbols. Serves as the TERM2GENE input for clusterProfiler::enricher.

gene_symbols

Character vector of HGNC gene symbols to test for enrichment.

pAdjustMethod

Character. Method for multiple testing correction (default "BH"). Passed to enricher.

...

Additional arguments forwarded to enricher, e.g.:

universe

Character vector of background gene symbols (default: all genes in the TERM2GENE table). Set to rownames(expr) or the full tested gene list to restrict the background to measured genes only.

minGSSize

Minimum gene set size after intersection with the universe (default 1).

maxGSSize

Maximum gene set size (default 500).

Value

A data frame with clusterProfiler::enricher's native columns (ID, GeneRatio, BgRatio, pvalue, p.adjust, qvalue, geneID, Count, Description) plus a ctdR-added foldEnrichment column. Returns an empty data frame with the same structure if no enrichment is found.