Plot annotations from GPT.

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

Arguments

annot

GPT-generated phenotype annotations.

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-04-26
#> 256 phenotypes do not have matching HPO IDs.
#> Reading in GPT annotations for 16,879 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).
#> 17,958 terms remain after filtering.
#> 165,810 associations remain after filtering.
#> Getting absolute ontology level for 18,536 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).
#> 17,958 terms remain after filtering.
#> 165,810 associations remain after filtering.