per_branch_plot: Plot N phenotypes per branch

View source: R/per_branch_plot.R

per_branch_plotR Documentation

Plot N phenotypes per branch

Description

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.

Usage

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.

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.

Value

ggplot object

Examples

plt <-  per_branch_plot(
    highlighted_branches = "Abnormality of nervous system physiology",
    ancestor = "Abnormality of the nervous system")

neurogenomics/HPOExplorer documentation built on July 17, 2024, 3:12 p.m.