Plot the most severe phenotypes per severity class: Profound, Severe, Moderate, Mild. The exception to this is the "Mild" class, where the least severe phenotypes will be taken instead of the most severe phenotypes.

plot_top_phenos(
  res_class = gpt_annot_class(),
  keep_ont_levels = seq(3, 17),
  keep_descendants = "Phenotypic abnormality",
  n_per_class = 10,
  annotation_order = NULL,
  split_by_congenital = TRUE
)

Arguments

res_class

Output of the gpt_annot_class function.

keep_ont_levels

Only keep phenotypes at certain absolute ontology levels to keep. See add_ont_lvl for details.

keep_descendants

Terms whose descendants should be kept (including themselves). Set to NULL (default) to skip this filtering step.

n_per_class

Number of phenotypes per severity class to include.

annotation_order

The order of the annotations to include.

split_by_congenital

Split the phenotypes by congenital onset (congenital = always/often, noncongenital = never/rarely).

Examples

res_class <- gpt_annot_class()
#> Translating ontology terms to ids.
#> Reading cached RDS file: phenotype_to_genes.txt
#> + Version: v2024-04-26
#> 256 phenotypes do not have matching HPO IDs.
#> Reading in GPT annotations for 16,879 phenotypes.
#> Assigning severity classes.
out <- plot_top_phenos(res_class = res_class)
#> Adding level-2 ancestor to each HPO ID.
#> Adding ancestor metadata.
#> Ancestor metadata already present. Use force_new=TRUE to overwrite.
#> Translating ontology terms to ids.
#> Keeping descendants of 1 term(s).
#> 17,958 terms remain after filtering.
#> 165,685 associations remain after filtering.
#> Getting absolute ontology level for 18,536 IDs.