recode_alias: Recode Hugo Symbol Column

View source: R/resolve-gene-aliases.R

recode_aliasR Documentation

Recode Hugo Symbol Column

Description

Searches the Hugo Symbol column in a genomic dataframe to look for any genes that have common gene name aliases, and replaces those aliases with the accepted (most recent) gene name. Function uses gnomeR::impact_alias_table by default as reference for which aliases to replace and supports IMPACT panel alias replacement only at this time. Custom tables can be provided as long as hugo_symbol and alias columns exist.

Usage

recode_alias(genomic_df, alias_table = "impact", supress_warnings = FALSE)

Arguments

genomic_df

a gene_binary object

alias_table

a string indicating "impact" or "genie", or a dataframe with at least two columns (hugo_symbol, alias) with one row for each pair.

supress_warnings

If TRUE, function will return a list containing a dataframe of recoded results and a names vector of recoded aliases in data

Value

A dataframe with recoded Hugo Symbol columns

Examples

genomic_df <- rename_columns(gnomeR::mutations[1:5, ])

alias_table <- data.frame("hugo_symbol" = c("New Symbol", "New Symbol2"),
"alias" = c("PARP1", "AKT1"))

recode_alias(genomic_df, alias_table)
recode_alias(genomic_df, alias_table, supress_warnings = TRUE)

MSKCC-Epi-Bio/gnomeR documentation built on Oct. 17, 2024, 3:39 p.m.