Skip to content

A toolkit for working with Human Phenotype Ontology in Python

License

Notifications You must be signed in to change notification settings

ielis/hpo-toolkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
Dec 4, 2023
Dec 4, 2023
Dec 4, 2023
Dec 4, 2023
Dec 4, 2023
Aug 18, 2023
Feb 28, 2023
Sep 1, 2023
Dec 16, 2022
Dec 4, 2023
Dec 4, 2023
Dec 4, 2023
Dec 4, 2023

Repository files navigation

hpo-toolkit

Build status PyPi downloads PyPI - Python Version

A toolkit for working with Human Phenotype Ontology (HPO) and HPO disease annotations in Python.

Example

Loading HPO is as simple as:

import hpotk

hpo = hpotk.load_ontology('http://purl.obolibrary.org/obo/hp.json')

Now you have HPO concepts and the ontology hierarchy at your fingertips.

Next, load the HPO disease annotations by running:

from hpotk.annotations.load.hpoa import SimpleHpoaDiseaseLoader

hpoa_path = 'https://github.com/obophenotype/human-phenotype-ontology/releases/download/v2023-10-09/phenotype.hpoa'

loader = SimpleHpoaDiseaseLoader(hpo)
diseases = loader.load(hpoa_path)

assert len(diseases) == 12_468

You got yourself phenotype annotations of 12,468 rare diseases.

Learn more

Find more info in our detailed documentation: