This function returns a vector of genes associated with a particular phenotype. It uses the phenotype_to_genes.txt file from the HPO.

get_gene_lists(
  phenotypes,
  phenotype_to_genes = load_phenotype_to_genes(),
  hpo = get_hpo(),
  as_list = FALSE,
  hpo_id_labels = TRUE
)

Arguments

phenotypes

One or more phenotype name from the HPO (e.g. "Phenotypic abnormality") \<string\>.

phenotype_to_genes

Output of load_phenotype_to_genes mapping phenotypes to gene annotations.

hpo

Human Phenotype Ontology object, loaded from get_ontology.

as_list

Return as a named list instead of a data.table.

hpo_id_labels

Label the gene lists with HPO IDs (instead of phenotype names).

Value

a character vector of genes associated with the selected phenotype.

Examples

phenotypes <- c("Focal motor seizure","HP:0000002","HP:0000003")
gene_lists <- get_gene_lists(phenotypes = phenotypes)
#> Translating ontology terms to ids.
#> Reading cached RDS file: phenotype_to_genes.txt
#> + Version: v2024-12-12