Internal. Extracts the results of a single enrichment discovery and returns them with a common set of column names, independently of the tool and of the type of analyses used to generate them. GSEA and ORA results do not share the same columns: the leading edge of a GSEA is used as the equivalent of the ORA 'Count', and the size of the geneset as its background.

.get.enrichment.table(enrichment, name = NA, string.pattern.to.remove = NULL)

Arguments

enrichment

An object of class DEprot.enrichResult (DEprot), enrichResult or gseaResult (clusterProfiler), or a data.frame with the same structure of the ones returned by clusterProfiler.

name

String indicating the name of the discovery, used to fill the 'discovery' column. Default: NA.

string.pattern.to.remove

String with a regular expression of a pattern to be removed from the geneset names when generating the 'alias' column. Default: NULL (no changes).

Value

A data.frame with the columns: discovery, enrichment.type, ID, alias, Count, set.size, GeneRatio.numeric, FoldEnrichment, NES, pvalue, p.adjust. NULL when the enrichment is empty or of an unsupported class.