Generate plots comparing the ontology level of each HPO phenotype and several other metrics.

plot_ont_lvl(
  results = load_example_results(),
  p2g = HPOExplorer::load_phenotype_to_genes(),
  x_vars = c("genes", "celltypes", "log(abs(fold_change))")
)

Arguments

results

The cell type-phenotype enrichment results generated by gen_results and merged together with merge_results.

p2g

Phenotype to gene data.

x_vars

Variables to plot on the x-axis of each subplot.

Value

A named list containing the data and the plot.

Examples

plts <- plot_ont_lvl()
#> Reading cached RDS file: phenotype_to_genes.txt
#> + Version: v2023-10-09
#> Getting absolute ontology level for 10,969 HPO IDs.
#>  All local files already up-to-date!