This plots the number of phenotypes per HPO branch and colours selected branches to highlight them. This is not using any EWCE results, it is simply using the raw HPO data to get an overview of how many phenotypes there are.

per_branch_plot(
  highlighted_branches,
  ancestor,
  hpo = get_hpo(),
  background_branches = simona::dag_children(hpo, term = map_phenotypes(terms = ancestor,
    hpo = hpo, to = "id")),
  phenotype_to_genes = load_phenotype_to_genes()
)

Arguments

highlighted_branches

Names of branches you want to highlight \<vector\<string\>\>

ancestor

The ancestor to get all descendants of. If NULL, returns the entirely ontology.

hpo

Human Phenotype Ontology object, loaded from get_ontology.

background_branches

HPO Ids of all branches to be shown (including highlighted) \<vector\<string\>\>

phenotype_to_genes

Output of load_phenotype_to_genes mapping phenotypes to gene annotations.

Value

ggplot object

Details

Default value for the background_branches argument is the child terms of phenotypic abnormality. Essentially this gives the main branches of the HPO.

Note that the highlighted branches must be also present in the background branches.

Examples

plt <-  per_branch_plot(
    highlighted_branches = "Abnormality of nervous system physiology",
    ancestor = "Abnormality of the nervous system")
#> Translating ontology terms to ids.
#> Translating ontology terms to ids.
#> Translating ontology terms to names.
#> Translating ontology terms to names.
#> Translating ontology terms to names.