View source: R/per_branch_plot.R
per_branch_plot | R Documentation |
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()
)
highlighted_branches |
Names of branches you want to highlight \<vector\<string\>\> |
ancestor |
The ancestor to get all descendants of. If |
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. |
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.
ggplot object
plt <- per_branch_plot(
highlighted_branches = "Abnormality of nervous system physiology",
ancestor = "Abnormality of the nervous system")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.