Correct alias gene symbols, Ensembl IDs, and Entrez IDs to canonical gene symbols. This is useful for matching gene names between different datasets which might not always use the same gene naming conventions.
Usage
match_gene_symbol(query, subject, gene_mapping = human_gene_mapping)
canonical_gene_symbol(query, gene_mapping = human_gene_mapping)
Value
match_gene_symbol
Integer vector of indices v
such that subject[v]
corresponds to the gene
symbols in query
canonical_gene_symbol
Character vector of canonical gene symbols for each symbol in query
Examples
#######################################################################
## match_gene_symbol() example
#######################################################################
match_gene_symbol(
c("CD8", "CD4", "CD45"),
c("ENSG00000081237.19", "ENSG00000153563.15", "ENSG00000010610.9", "ENSG00000288825")
)
#> [1] 2 3 1
#######################################################################
## canonical_gene_symbol() example
#######################################################################
canonical_gene_symbol(c("CD45", "CD8", "CD4"))
#> CD45 CD8 CD4
#> "PTPRC" "CD8A" "CD4"