reannotate_genes: Gene re-annotation using HGNC symbols

View source: R/reannotate_genes.R

reannotate_genesR Documentation

Gene re-annotation using HGNC symbols

Description

Performs gene re-annotation using curated data from the HGNC.

Usage

reannotate_genes(cur_genes)

Arguments

cur_genes

character string containing gene HGNC symbols to be consider for re-annotation.

Details

Source code adapted from quanTIseq helper function mapGenes from quantiseqr package.

Value

A data.frame with the old gene HGNC symbol and the new corresponding gene HGNC symbol.

Examples


# using a SummarizedExperiment object
library(SummarizedExperiment)
# Using example exemplary dataset (Mariathasan et al., Nature, 2018)
# from easierData. Original processed data is available from
# IMvigor210CoreBiologies package.
library("easierData")

dataset_mariathasan <- easierData::get_Mariathasan2018_PDL1_treatment()
RNA_tpm <- assays(dataset_mariathasan)[["tpm"]]

# Select a subset of patients to reduce vignette building time.
pat_subset <- c(
  "SAM76a431ba6ce1", "SAMd3bd67996035", "SAMd3601288319e",
  "SAMba1a34b5a060", "SAM18a4dabbc557"
)
RNA_tpm <- RNA_tpm[, colnames(RNA_tpm) %in% pat_subset]

# Select some genes to check possible updated gene names
genes_to_check <- rownames(RNA_tpm)[400:450]
genes_info <- reannotate_genes(cur_genes = genes_to_check)


olapuentesantana/easier documentation built on Feb. 25, 2024, 3:39 p.m.