map_t2g: Map pathway term to gene IDs to another ID type

View source: R/map_t2g.R

map_t2gR Documentation

Map pathway term to gene IDs to another ID type

Description

Map pathway term to gene 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.

Usage

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

Arguments

t2g

TERM TO GENE mapping, a data.frame of 2 column with term and gene

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

TERM TO GENE data.frame with the symbols replaced by the mapped IDs.


jdreyf/jdcbioinfo documentation built on Feb. 12, 2025, 4:30 p.m.