Functions to get data objects and extract elements.
get_hpo(
lvl = 2,
force_new = FALSE,
terms = NULL,
tag = "v2024-02-08",
method = "github",
save_dir = KGExplorer::cache_dir(),
...
)
get_hpo_id_direct(term, hpo = get_hpo())
get_mappings(
terms = NULL,
to = c("UMLS", "SNOMED", "ICD9", "ICD10"),
max_dist = 1,
force_new = FALSE,
save_dir = KGExplorer::cache_dir(package = "HPOExplorer"),
...
)How many levels deep into the ontology to get ancestors from. For example:
1: "All"
2: "Phenotypic abnormality"
3: "Abnormality of the nervous system"
4: "Abnormality of nervous system physiology"
5: "Neurodevelopmental abnormality" or "Behavioral abnormality"
Force a new download or creation of a data resource.
A subset of HPO IDs to assign Tiers to.
tag for the GitHub release to which this data should be attached.
Method to construct plot with.
Directory to save a file to.
Arguments passed on to KGExplorer::get_ontology, get_data
name<...>Any ontology name from get_ols_options
"hpo" Import the Human Phenotype Ontology. GitHub.
filetypeFile type to search for.
import_funcFunction to import the ontology with.
If NULL, automatically tries to choose the correct function.
add_metadataAdd metadata to the resulting ontology object.
add_n_edgesAdd the number of edges (connections) for each term.
add_ontology_levelsAdd the ontology level for each term.
add_versionAdd the release version to the returned object's attributes
filename or vector of names of files to be downloaded. If NULL,
all assets attached to the release will be downloaded.
repoRepository name in format "owner/repo". Defaults to guess_repo().
overwriteShould any local files of the same name be overwritten?
default TRUE.
One or more ontology IDs.
Human Phenotype Ontology object, loaded from get_ontology.
Medical ontologies to provide mappings to.
Maximum cross-ontology distance to search for mappings. A distance of 1 means only direct mappings are returned. Greater distances mean that mappings are found through intermediate terms and are therefore less reliable.
Data.
ontology_DAG object.
The HPO ID(s) of phenotype(s)
A named list of data.table objects containing mappings.
get_hpo(): get_
Get Human Phenotype Ontology (HPO)
Downloads and imports the "v2024-02-08" release of the
Human Phenotype Ontology (HPO) for the purposes of version control and
consistency of results. To get the latest version of the HPO,
use get_hpo(tag="release", force_new=T)
The HPO objects are created from the OBO files distributed via
the official
HPO GitHub repository.
By comparison, the hpo data from ontologyIndex is from 2016.
Note that the maximum ontology level depth in the 2016 version was 14,
whereas in the 2023 version the maximum ontology level depth is 16
(due to an expansion of the HPO).
get_hpo_id_direct(): get_
Get HPO term ID direct
Directly retrieves it from the HPO ontology object.
get_mappings(): get_
Get Human Phenotype Ontology (HPO) mappings
Get mappings between HPO terms and their corresponding IDs in other medical ontologies (e.g. SNOMED CT, UMLS, ICD-9/10).
hpo <- get_hpo()
term = "Phenotypic abnormality"
pheno_abnormality_id <- get_hpo_id_direct(term = term)
mappings <- get_mappings()