View source: R/map_phenotypes.R
map_phenotypes | R Documentation |
Harmonise a mixed vector of phenotype names (e.g. "Focal motor seizure") and HPO IDs (e.g. c("HP:0000002","HP:0000003")).
map_phenotypes(
terms,
hpo = get_hpo(),
to = c("name", "id"),
keep_order = TRUE,
ignore_case = TRUE,
ignore_char = eval(formals(KGExplorer::map_ontology_terms)$ignore_char),
invert = FALSE
)
terms |
A subset of HPO IDs to include in the final dataset and plots (e.g. c("HP:0001508","HP:0001507")). |
hpo |
Human Phenotype Ontology object, loaded from get_ontology. |
to |
Character vector of database(s) to map IDs to.
When not |
keep_order |
Return a named list of the same length and order
as |
ignore_case |
Ignore case when mapping terms. |
ignore_char |
A character vector of characters to ignore when mapping terms. |
invert |
Invert the keys/values of the dictionary, such that the key becomes the values (and vice versa). |
Character vector
terms <- c("Focal motor seizure",
"Focal MotoR SEIzure",
"HP:0000002","HP:0000003")
#### As phenotype names ####
term_names <- map_phenotypes(terms=terms)
#### As HPO IDs ####
term_ids <- map_phenotypes(terms=terms, to="id")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.