Main functions.
annotate_phenos(
phenos,
hpo = get_hpo(),
add_ont_lvl_absolute = TRUE,
add_ont_lvl_relative = FALSE,
add_info_content = TRUE,
add_description = TRUE,
add_disease_data = FALSE,
add_ndiseases = add_disease_data,
add_onsets = add_disease_data,
add_deaths = add_disease_data,
add_pheno_frequencies = add_disease_data,
add_tiers = add_disease_data,
add_severities = add_disease_data,
add_disease_definitions = add_disease_data,
include_mondo = FALSE,
add_hoverboxes = FALSE,
columns = list_columns(),
interactive = TRUE
)
example_phenos(i = seq(10), hpo = get_hpo())
A data.table containing HPO IDs and other metadata.
Human Phenotype Ontology object, loaded from get_ontology.
Add the absolute ontology level of each HPO term. See get_ontology_levels for more details.
Add the relative ontology level of each HPO term. See get_ontology_levels for more details.
Add information content column for each phenotype.
Whether to get the phenotype descriptions as well (slower).
Add all disease metadata columns.
This will expand the data using allow.cartesian=TRUE
.
Add the number of diseases per phenotype.
Add age of onset columns using add_onset.
Add age of death columns using add_death.
Add the frequency of each phenotype in each disease.
Add severity Tiers column using add_tier.
Add severity column using add_severity.
Add disease definitions.
Add MONDO IDs, names, and definitions to each disease.
Add hoverdata with add_hoverboxes.
A named vector of columns in phenos
to add to the hoverdata via add_hoverboxes.
Make the plot interactive.
Indices of HPO IDs to use.
Data.
phenotype data.table
annotate_phenos()
: main
Annotate phenotypes
Annotate phenotypes data.table without various types of metadata.
example_phenos()
: main
Example phenotypes dataframe
Create a minimal example of a phenos dataframe.
phenos <- example_phenos()
phenos2 <- annotate_phenos(phenos)
#> Adding HPO names.
#> Translating ontology terms to names.
#> Adding term definitions.
#> Adding level-2 ancestor to each HPO ID.
#> Adding ancestor metadata.
#> Ancestor metadata already present. Use force_new=TRUE to overwrite.
#> 10 associations remain after filtering.
#> Getting absolute ontology level for 19,025 IDs.
#> Adding information_content scores.
phenos <- example_phenos()