Convert severity annotations ot severity classes (profound > severe > moderate > mild) to approximate those introduced in Lazarin et al. 2014.

gpt_annot_class(
  res_coded = gpt_annot_codify(),
  inclusion_values = c(2, 3),
  tiers_dict = list(death = 1, intellectual_disability = 1, impaired_mobility = 2,
    physical_malformations = 2, blindness = 3, sensory_impairments = 3, immunodeficiency
    = 3, cancer = 3, reduced_fertility = 4),
  add_severity_score_gpt = TRUE
)

Arguments

res_coded

The output of list gpt_annot_codify.

inclusion_values

Numerically encoded annotation values to count as hits. See the gpt_annot_codify(code_dict=) argument defaults for the mappings. Defaults to 2 ("often") and 3 ("always").

tiers_dict

A named list of severity tiers.

add_severity_score_gpt

Whether to add a continuous severity score as well.

Value

A data.table with severity classes, as well as severity scores (0-100) which can be used to rank severity within each class.

Examples

res_coded <- gpt_annot_codify()
#> 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.
res_class <- gpt_annot_class(res_coded)
#> Assigning severity classes.