Skip to contents

Classify genes into curated HGNC gene groups

Usage

classifyCuratedGeneGroups(
  ensemblGeneIds,
  organism,
  hgnc = NULL,
  jax = NULL,
  mgi = NULL
)

Arguments

ensemblGeneIds

character. Ensembl gene identifiers to classify.

organism

character(1). Latin organism name. Only "Homo sapiens" and "Mus musculus" are supported.

hgnc

Hgnc or NULL. HGNC reference dataset. Downloaded via Hgnc() if NULL.

jax

JaxHumanToMouse or NULL. JAX human-to-mouse ortholog dataset. Downloaded via JaxHumanToMouse(unique = FALSE) if NULL. Ignored for "Homo sapiens".

mgi

Mgi or NULL. MGI reference dataset. Downloaded via Mgi() if NULL. 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.

Note

Updated 2026-09-24.

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