Merge the annotations from GPT with the weighted annotations and melt the resulting data.table such that each annotation metric is a separate row.

gpt_annot_melt(
  res_coded,
  id.vars = grep("justification|phenotype|hpo_name|hpo_id|pheno_count",
    names(res_coded$annot), value = TRUE)
)

Arguments

res_coded

Result from gpt_annot_codify.

id.vars

Columns to use as ID variables when merging.

Value

A melted data.table with the annotations.

Examples

res_coded <- gpt_annot_codify()
#> 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.
annot_melt <- gpt_annot_melt(res_coded)