Skip to contents

Update gene symbols

Usage

updateGeneSymbols(geneNames, organism)

Arguments

geneNames

character. Gene names (symbols).

organism

character(1). Full Latin organism name (e.g. "Homo sapiens").

Value

character. Named character, with original input defined in the names.

Details

Human genes are checked against HGNC. Other organisms are checked against NCBI.

Intentionally errors on match failure.

Note

Updated 2023-12-21.

See also

  • https://twitter.com/samuel_marsh/status/1737855289876201922

  • https://waldronlab.io/HGNChelper/

Examples

## Homo sapiens ====
object <- updateGeneSymbols(
    geneNames = c("ZCCHC6", "ZCCHC11"),
    organism = "Homo sapiens"
)
#> → Importing HGNC complete set.
#> → Importing /private/var/folders/pt/1g5629f1699dfjwdfh32q50m0000gn/T/koopa-r-docs-build-l3dklp41/home/.cache/R/AcidGenomes/BiocFileCache/a36529a1d43e_hgnc_complete_set.txt using base::`read.table()`.
#> Error in stop(simpleError(message = msg, call = if (p) {    sys.call(p)})): Assert failure.
#> [1] areSetEqual(names(expected), names(object)) is not TRUE.
#> Cause: `character` and `character` have different numbers of elements (52
#> versus 51).
print(object)
#> Error: object 'object' not found

## Mus musculus ====
object <- updateGeneSymbols(
    geneNames = c("Zcchc6", "Zcchc11"),
    organism = "Mus musculus"
)
#> → Downloading Mus musculus gene info from NCBI at <https://ftp.ncbi.nlm.nih.gov/gene/DATA/GENE_INFO/Mammalia/Mus_musculus.gene_info.gz>.
#> → Importing /private/var/folders/pt/1g5629f1699dfjwdfh32q50m0000gn/T/koopa-r-docs-build-l3dklp41/home/.cache/R/AcidGenomes/BiocFileCache/a36560c5e72_Mus_musculus.gene_info.gz using base::`read.table()`.
print(object)
#>  Zcchc6 Zcchc11 
#>  "Tut7"  "Tut4"