Get 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.

get_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

top_phenos <- get_top_phenos()
#> 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.
#> Assigning severity classes.
#> 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,385 associations remain after filtering.
#> Getting absolute ontology level for 19,025 IDs.