Classify genes into curated HGNC gene groups
Source:R/classifyCuratedGeneGroups.R
classifyCuratedGeneGroups.RdClassify genes into curated HGNC gene groups
Arguments
- ensemblGeneIds
character. Ensembl gene identifiers to classify.- organism
character(1). Latin organism name. Only"Homo sapiens"and"Mus musculus"are supported.- hgnc
HgncorNULL. HGNC reference dataset. Downloaded viaHgnc()ifNULL.- jax
JaxHumanToMouseorNULL. JAX human-to-mouse ortholog dataset. Downloaded viaJaxHumanToMouse(unique = FALSE)ifNULL. Ignored for"Homo sapiens".- mgi
MgiorNULL. MGI reference dataset. Downloaded viaMgi()ifNULL. Ignored for"Homo sapiens".
Value
list.
Named list keyed by ensemblGeneIds, each element a character vector
of curated tags (empty if none).
Details
Tags each gene "riboCyto" (cytoplasmic ribosomal protein), "riboMito"
(mitochondrial ribosomal protein), "hemoglobin" (hemoglobin subunit), or
none of these. Tags are sourced from HGNC's own curated geneGroupId
assignments, never a symbol regex; a gene not in any curated group gets an
empty character vector, not an omitted list element.
For Mus musculus, human HGNC groups are propagated via a fully
identifier-based chain (HGNC hgncId -> JAX ortholog mouseMgiId -> MGI
ensemblGeneId), with no gene-symbol matching at any step.
This is deliberately independent of broadClass (see the internal
.addBroadClass() in internal-GenomicRanges.R): broadClass is
single-valued and every ribosomal/hemoglobin gene already has a value
from it ("coding", "pseudo", etc). Do not fold these tags into
broadClass.
A sibling Python package carries the identical group-ID map and function as a hand-ported twin; a change here must land there too, in the same release.
Examples
tags <- classifyCuratedGeneGroups(
ensemblGeneIds = "ENSG00000244734",
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(tags[["ENSG00000244734"]]) # HBB
#> Error: object 'tags' not found