Skip to main content

Testing similarity of HPO terms between probands sharing variants in genes.

Project description

Build Status

Similarity of phenotypes in patient groups

This estimates how likely it is for groups of individuals to have similar phenotypes. To estimate this probability, we need three things:

  • a way to quantify phenotypic similarity of two individuals. We use the maximum information content of the most informative common ancestor for each pair of HPO terms from two probands.
  • a way to quantify similarity across more than two probands. We sum phenotypic similarity scores from all pairs of probands.
  • a null distribution of similarity scores for those probands, generated by randomly sampled groups of probands

The P value is calculated as the proportion of simulated scores greater than the observed probands' score.

Install

Install the package with:

pip install hpo_similarity
Run
hpo_similarity --genes genes.json --phenotypes phenotypes.json

The data directory on github includes example files, one with proband IDs per gene (data/example_genes.json), and the other with HPO terms per proband (data/example_phenotypes.json).

Additional options:

  • --output PATH to send output gene and P-values to a file.
  • --ontology PATH to use a HPO ontology file other than the default.
  • --iterations INTEGER to change the number of iterations (default=100000)

You can also explore the HPO graph using the hpo_similarity package within python, for example:

from hpo_similarity import open_ontology

graph, alt_ids, obsolete_ids = open_ontology()

# find all descendant terms
graph.get_descendants('HP:0001249')

# get the text for the phenotypic abnormality
graph.nodes['HP:0001249']['name']
Acknowledgments

This code incorporates the following code and datasets:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hpo_similarity-0.5.3.tar.gz (754.2 kB view details)

Uploaded Source

File details

Details for the file hpo_similarity-0.5.3.tar.gz.

File metadata

  • Download URL: hpo_similarity-0.5.3.tar.gz
  • Upload date:
  • Size: 754.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2.post20191203 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.7.5

File hashes

Hashes for hpo_similarity-0.5.3.tar.gz
Algorithm Hash digest
SHA256 5c50c75728b6f04436ab0e6055ed2e9a2a19430e52c5bdf2fa66ccc9bb1a1574
MD5 90ca32409cfa6b12e475e84fb6dc5e2c
BLAKE2b-256 709c07d70525ca68fb991bb9f7c83952034ac70040d6d0850c762adc196417c9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page