map_glist: Map pathway list gene IDs to another ID type

View source: R/map_glist.R

map_glistR Documentation

Map pathway list gene IDs to another ID type

Description

Map pathway list with old gene IDs (e.g. entrez IDs) to another ID type (e.g. gene symbols) using a table with both annotation types. The original IDs can be separated within a column of annot with a string, e.g. " /// ". The other IDs should be the rownames of annot. The idea for this is based on the Gene Set Enrichment Analysis (GSEA) utility [chip2chip](https://www.gsea-msigdb.org/gsea/doc/GSEAUserGuideFrame.html?Chip2Chip_Page).

Usage

map_glist(
  G,
  annot,
  sep.str = " /// ",
  symbol.col = "Gene.Symbol",
  fixed = FALSE
)

Arguments

G

Gene set list as returned from read_gmt.

annot

annotation for the features that has a column of the same type as in gene set list *G*.

sep.str

strings that separates symbols if there are multiple symbols for a feature.

symbol.col

column name or index for the symbol column in *annot*.

fixed

logical passed to strsplit; if TRUE, match sep.str exactly, otherwise use regular expression.

Details

Gene annotations are transformed to upper-case to avoid missing matches of different cases.

Value

Gene set list *G* with the symbols replaced by the mapped IDs.


jdreyf/ezlimma documentation built on April 28, 2024, 1:10 p.m.