Plot annotations from GPT.

gpt_annot_plot(
  annot = gpt_annot_read(),
  hpo = get_hpo(),
  keep_ont_levels = seq(3, 17),
  keep_descendants = "Phenotypic abnormality",
  top_n = 50,
  width = 80,
  verbose = TRUE
)

Arguments

annot

GPT-generated phenotype annotations.

hpo

Human Phenotype Ontology object, loaded from get_ontology.

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.

top_n

Top number of most severe phenotypes to plot in heatmap.

width

Max facet label width.

verbose

Print messages.

Value

Named list of plots.

Examples

plots <- gpt_annot_plot()
#> Translating ontology terms to ids.
#> Reading cached RDS file: phenotype_to_genes.txt
#> + Version: v2024-12-12
#> 383 phenotypes do not have matching HPO IDs.
#> Reading in GPT annotations for 16,753 phenotypes.
#> 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).
#> 18,379 terms remain after filtering.
#> 164,510 associations remain after filtering.
#> Getting absolute ontology level for 19,025 IDs.
#> 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).
#> 18,379 terms remain after filtering.
#> 164,510 associations remain after filtering.