Learn R Programming

goat (version 1.1.2)

symbol_to_entrez: Map the the symbol column in a table to HGNC human gene IDs by matching official gene symbols and synonyms

Description

Map the the symbol column in a table to HGNC human gene IDs by matching official gene symbols and synonyms

Usage

symbol_to_entrez(x, hgnc)

Value

entrez gene IDs are returned in the "gene" column of table x. Additionally, columns "entrez_id", "hgnc_id" and "hgnc_symbol"

Arguments

x

a data.table with a column symbol

hgnc

HGNC lookup table from hgnc_idmap_table()

Examples

Run this code
  # TODO: update the filename to your downloaded file
  # download instructions in the documentation of `hgnc_idmap_table()`
  f = "C:/DATA/HGNC/hgnc_complete_set.txt"

  if(file.exists(f)) {
    df = data.frame(symbol = c("vamp2", "STXBP1", "UNC18", NA, "PSD95", "NOT-A-GENE"))
    hgnc = hgnc_idmap_table(f)
    df = symbol_to_entrez(df, hgnc)
    print(df)
  }

Run the code above in your browser using DataLab