Map gene names to Ensembl identifiers
Arguments
- genes
Gene names (e.g.
"TUT4").- organism
character(1). Full Latin organism name (e.g."Homo sapiens").- ignoreCase
logical(1). Enable case-insensitive matching.- hgnc
Hgncobject. Supported for Homo sapiens genome only. Snapshot of HGNC annotations. Passes tomapGeneNamesToHgncinternally.- ncbi
NcbiGeneInfoobject. Snapshot of NCBI annotations. Passes tomapGeneNamesToNcbiinternally.
Details
Internally matches using mapGeneNamesToHgnc (Homo sapiens only)
or mapGeneNamesToNcbi (all other organisms), so we can support gene synonym
matching.
Examples
## Homo sapiens.
x <- mapGeneNamesToEnsembl(
genes = c("TUT4", "ZCCHC11", "TENT3A"),
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(x)
#> Error: object 'x' not found
## Mus musculus
x <- mapGeneNamesToEnsembl(
genes = c("Nfe2l2", "Nrf2"),
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>.
#> → Caching URL at <https://ftp.ncbi.nlm.nih.gov/gene/DATA/GENE_INFO/Mammalia/Mus_musculus.gene_info.gz> into /private/var/folders/pt/1g5629f1699dfjwdfh32q50m0000gn/T/koopa-r-docs-build-l3dklp41/home/.cache/R/AcidGenomes/BiocFileCache.
#>
#> → 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(x)
#> [1] "ENSMUSG00000015839" "ENSMUSG00000015839"