| parseHGNC | R Documentation |
Reads the HUGO Gene Nomenclature Committee (HGNC) complete set
(hgnc_complete_set.txt) and, optionally, the withdrawn entries
(withdrawn.txt) and returns a dvobject with gene, gene name
and withdrawn tables.
parseHGNC(
complete_set_path,
withdrawn_path = NULL,
release = NULL,
release_date = NULL,
retrieved_at = NULL
)
complete_set_path |
Character. Path to |
withdrawn_path |
Character or NULL. Path to |
release |
Character or NULL. Release label, e.g. |
release_date |
Date, |
retrieved_at |
Date, |
Both files are tab separated and UTF-8. In the complete set a cell holding
several values is pipe separated (a|b) and wrapped in double quotes;
the parser strips the wrapper and keeps the pipes. Column names are
lower-cased with . and - replaced by _
(pseudogene.org becomes pseudogene_org), and the
date_* columns become dates. Every other column stays text as
written.
HGNC publishes no release number or date for the current files, so
release and release_date are NA unless given (e.g. the
month of the download, or the date of an HGNC archive file).
HGNC data are released under CC0; HGNC recommends citing its latest paper,
which is recorded in the object's metadata (see
get_source_metadata).
A dvobject with tibbles:
One row per approved gene, keyed by hgnc_id, with
the file's columns. Multi-valued cells keep the file's a|b
text.
One row per (hgnc_id, kind,
name): each gene's approved symbol (kind "symbol") and
name ("name"), and every alias and previous symbol and name
("alias_symbol", "prev_symbol", "alias_name", "prev_name"), split on
| and trimmed. Empty values and exact duplicates are dropped;
names that differ only in case are kept.
Only when withdrawn_path is given. One row per
withdrawn ID and the ID it was merged into or split to
(merged_into_hgnc_id, merged_into_symbol,
merged_into_status); an entry without a target has one row
with these NA. merged_into_report keeps the original
cell. Rows are as written in HGNC's file, including any repeated
target.
Other parsers:
cett_nodes_options(),
drug_node_options(),
parseDrugBank(),
parseHPO(),
parseHealthCanadaDPD(),
parseOnSIDES(),
parseOpenFDA(),
parseTWOSIDES(),
references_node_options()
hgnc_dir <- system.file("extdata", "hgnc", package = "dbparser")
hgnc <- parseHGNC(file.path(hgnc_dir, "hgnc_complete_set.txt"),
withdrawn_path = file.path(hgnc_dir, "withdrawn.txt"),
release = "2026-10",
retrieved_at = "2026-10-16")
hgnc$gene_name[hgnc$gene_name$name == "PD1", ]
get_source_metadata(hgnc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.