Convert Gene IDs between Ensembl and Hugo Symbol System
Source:R/common_human_and_mouse_ids.R
convert_hm_genes.RdSupports human (hg38, hg19, T2T), mouse (mm10, mm9), and worm (ce11, C. elegans) genomes.
Note
This function matches against primary gene symbols only. For
resolving outdated or alternative gene names (aliases like "MLL" -> "KMT2A"),
use build_annotables() with include_synonyms = TRUE followed by
resolve_gene_aliases().
See also
resolve_gene_aliases() for resolving gene symbol aliases.
Examples
# \donttest{
convert_hm_genes("ENSG00000243485")
#> Downloading https://zenodo.org/records/10360995/files/human_hg38_gene_info.rds to /tmp/Rtmpu9e9wx/human_hg38_gene_info.rds
#> [1] "MIR1302-2HG"
convert_hm_genes("ENSG00000243485", multiple = TRUE)
#> from to
#> <char> <char>
#> 1: ENSG00000243485 MIR1302-2HG
convert_hm_genes(c("TP53", "KRAS", "EGFR", "MYC"), type = "symbol")
#> [1] "ENSG00000141510" "ENSG00000133703" "ENSG00000146648" "ENSG00000136997"
# }