Read in phenotype annotations generated by GPT and do some initial preprocessing (e.g. adding HPO IDs).

gpt_annot_read(
  save_dir = KGExplorer::cache_dir(package = "HPOExplorer"),
  phenotype_to_genes = load_phenotype_to_genes(save_dir = save_dir),
  force_new = FALSE,
  hpo = get_hpo(),
  include_nogenes = TRUE,
  verbose = TRUE,
  ...
)

Arguments

save_dir

Directory to save a file to.

phenotype_to_genes

Output of load_phenotype_to_genes mapping phenotypes to gene annotations.

force_new

If TRUE, the data will be downloaded from GitHub even if it already exists locally.

hpo

Human Phenotype Ontology object, loaded from get_ontology.

include_nogenes

Include phenotypes with no associated genes.

verbose

Print messages.

...

Arguments passed on to get_data

add_version

Add the release version to the returned object's attributes

file

name or vector of names of files to be downloaded. If NULL, all assets attached to the release will be downloaded.

repo

Repository name in format "owner/repo". Defaults to guess_repo().

tag

tag for the GitHub release to which this data should be attached.

overwrite

Should any local files of the same name be overwritten? default TRUE.

Value

data.table of phenotype annotations

Examples

gpt_annot <- gpt_annot_read()
#> 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.