Giter Site home page Giter Site logo

hpo_similarity's Introduction

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:

hpo_similarity's People

Contributors

jeremymcrae avatar brcopeland avatar mohsalvi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.