This is a function for loading the HPO phenotype to genes text file from HPO. It adds the column names and returns as a dataframe. It contains phenotypes annotated with associated genes.

load_phenotype_to_genes(
  file = c("phenotype_to_genes.txt", "genes_to_phenotype.txt", "phenotype.hpoa"),
  save_dir = file.path(KGExplorer::cache_dir(package = "HPOExplorer"), "data"),
  repo = paste("obophenotype", "human-phenotype-ontology", sep = "/"),
  tag = "latest",
  overwrite = FALSE,
  save_tmp = TRUE,
  verbose = TRUE
)

Arguments

file

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

save_dir

Folder where the phenotype to genes text file is/will be stored.

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.

save_tmp

Keep the intermediate annotation text file (before it gets converted to .rds format).

verbose

Print messages.

Value

A data.table of the HPO annotations.

Examples

phenotype_to_genes <- load_phenotype_to_genes()
#> Reading cached RDS file: phenotype_to_genes.txt
#> + Version: v2024-04-26