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())

Arguments

phenos

A data.table containing HPO IDs and other metadata.

hpo

Human Phenotype Ontology object, loaded from get_ontology.

add_ont_lvl_absolute

Add the absolute ontology level of each HPO term. See get_ontology_levels for more details.

add_ont_lvl_relative

Add the relative ontology level of each HPO term. See get_ontology_levels for more details.

add_info_content

Add information content column for each phenotype.

add_description

Whether to get the phenotype descriptions as well (slower).

add_disease_data

Add all disease metadata columns. This will expand the data using allow.cartesian=TRUE.

add_ndiseases

Add the number of diseases per phenotype.

add_onsets

Add age of onset columns using add_onset.

add_deaths

Add age of death columns using add_death.

add_pheno_frequencies

Add the frequency of each phenotype in each disease.

add_tiers

Add severity Tiers column using add_tier.

add_severities

Add severity column using add_severity.

add_disease_definitions

Add disease definitions.

include_mondo

Add MONDO IDs, names, and definitions to each disease.

add_hoverboxes

Add hoverdata with add_hoverboxes.

columns

A named vector of columns in phenos to add to the hoverdata via add_hoverboxes.

interactive

Make the plot interactive.

i

Indices of HPO IDs to use.

Value

Data.

phenotype data.table

Functions

  • 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.

Examples

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()