Skip to main content

Graph Based Multi-Race EM

Pre-requisites

Make a virtual environment and activate it, run make venv

make venv
source venv/bin/activate

Install all the development dependencies. Will install packages from all requirements-*.txt files.

make install

Data Directory Structure

Donor files are in data directory, specified in the conf file.

data
└── ct_mr_don_10.txt

conf Directory Structure

Configure input/output directories and EM specific parameters.

conf
└── minimal-configuration.json

Example EM run

Run the test_em script to produce frequences from the example data.

python test_em.py

Results can be found in output directory.

How to contribute:

  1. Fork the repository: https://github.com/nmdp-bioinformatics/py-graph-em.git This will create a new repository with the given name e.g. py-graph-em.
  2. Clone the repository locally
    git clone  https://github.com/pbashyal-nmdp/py-graph-em.git
    cd py-graph-em
    
  3. Make a virtual environment and activate it, run make venv
     > make venv
       python3 -m venv venv --prompt py-graph-em-venv
       =====================================================================
     To activate the new virtual environment, execute the following from your shell
     source venv/bin/activate
    
  4. Source the virtual environment
    source venv/bin/activate
    
  5. Development workflow is driven through Makefile. Use make to list show all targets.
     > make
     clean                remove all build, test, coverage and Python artifacts
     clean-build          remove build artifacts
     clean-pyc            remove Python file artifacts
     clean-test           remove test and coverage artifacts
     lint                 check style with flake8
     behave               run the behave tests, generate and serve report
     pytest               run tests quickly with the default Python
     test                 run all(BDD and unit) tests
     coverage             check code coverage quickly with the default Python
     dist                 builds source and wheel package
     docker-build         build a docker image for the service
     docker               build a docker image for the service
     install              install the package to the active Python's site-packages
     venv                 creates a Python3 virtualenv environment in venv
     activate             activate a virtual environment. Run `make venv` before activating.
    
  6. Install all the development dependencies. Will install packages from all requirements-*.txt files.
     make install
    
  7. The Gherkin Feature files, step files and pytest files go in tests directory:
    tests
    |-- features
    |   |-- algorithm
    |   |   `-- SLUG\ Match.feature
    |   `-- definition
    |       `-- Class\ I\ HLA\ Alleles.feature
    |-- steps
    |   |-- HLA_alleles.py
    |   `-- SLUG_match.py
    `-- unit
        `-- test_my_project_template.py
    
  8. Package Module files go in the my_project_template directory.
    my_project_template
    |-- __init__.py
    |-- algorithm
    |   `-- match.py
    |-- model
    |   |-- allele.py
    |   `-- slug.py
    `-- my_project_template.py
    
  9. Run all tests with make test or different tests with make behave or make pytest. make behave will generate report files and open the browser to the report.
  10. Use python app.py to run the Flask service app in debug mode. Service will be available at http://localhost:8080/
  11. Use make docker-build to build a docker image using the current Dockerfile.
  12. make docker will build and run the docker image with the service. Service will be available at http://localhost:8080/

The py-graph-em code was developed in the YOLO Lab and at the NMDP. Please cite Israeli, S., Gragert, L., Maiers, M., & Louzoun, Y. (2021). HLA haplotype frequency estimation for heterogeneous populations using a graph-based imputation algorithm. Human Immunology, 82(10), 746-757.‏

======= History

0.0.1 (2021-08-25)

  • First release on PyPI.

Metadata

Release files for py-graph-em 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py-graph-em 0.0.3
File Size Uploaded Provenance Actions
py-graph-em-0.0.3.tar.gz 14.2 kB Without provenance Details for py-graph-em-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for py-graph-em 0.0.3
File Interpreter ABI Platform Actions
py_graph_em-0.0.3-py2.py3-none-any.whl Python 2, Python 3 none any Details for py_graph_em-0.0.3-py2.py3-none-any.whl

Total release size: 30.0 kB

Release files / py-graph-em-0.0.3.tar.gz

Download URL py-graph-em-0.0.3.tar.gz
Size 14.2 kB
Tags Source
SHA-256 checksum
How to use checksums
52e4c3f4e18b4dd3d0d5c8281a629d753902c0842bb7fb89d5c4e8e23c0a5cf0
BLAKE2b-256 checksum
How to use checksums
84bacef73a3570d3f43c8f0c832292597fe77d8627110d608e3ee2367a422dc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.18

Release files / py_graph_em-0.0.3-py2.py3-none-any.whl

Download URL py_graph_em-0.0.3-py2.py3-none-any.whl
Size 15.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
ac3a95165c6f6aab9c882336f6524a62f71884a5b6c587619252b48b592ba07e
BLAKE2b-256 checksum
How to use checksums
2f2d43c9d4c9456502f5b38d6cd2c0413399c73b96f09fca0804f93e10ca69cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.18

Security for py-graph-em 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page