Skip to contents

Extract gene hit list from list of enrichResult

Usage

enrichList2geneHitList(
  enrichList,
  geneColname,
  geneDelim = "[,/ ]",
  make_unique = TRUE,
  verbose = FALSE,
  ...
)

Arguments

enrichList

list of enrichResult objects

geneColname

character string with the column name containing delimited gene identifiers.

geneDelim

character regular expression used to split delimited gene values. By default, enrichResult uses '/' forward slash as delimiter, however the default here will split any space or comma as well.

make_unique

logical default TRUE, whether to return only unique genes per set, or potentially multiple genes per set. Typically there should only ever be one instance of a gene per set, but through a variety of other mechanisms they may exist, for example if two gene identifiers are resolved into the same gene symbol.

verbose

logical whether to print verbose output.

...

additional arguments are ignored.

Value

list of character vectors, containing the unique set of genes involved in each enrichment.

Details

This function is mainly for internal use in multienrichjam, it takes a list of enrichResult objects, and determines the full set of genes involved in each enrichResult.

Note that genes are sorted using jamba::mixedSort() for alpha-numeric sorting, based upon version sorting.

This function also works with ComplexHeatmap::HeatmapList objects.