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()
)
Names of branches you want to highlight \<vector\<string\>\>
The ancestor to get all descendants of. If NULL
,
returns the entirely ontology.
Human Phenotype Ontology object, loaded from get_ontology.
HPO Ids of all branches to be shown (including highlighted) \<vector\<string\>\>
Output of load_phenotype_to_genes mapping phenotypes to gene annotations.
ggplot object
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.
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.