Skip to main content

Bayesian inference of population size history from recombining sequence data.

Project description

phlash is a program for sampling from the posterior distribution of population size history given whole genome sequence data. You can think of it as a Bayesian version of Li & Durbin's popular PSMC program, with a more modern interface and GPU acceleration built in.

Requirements

  • Python 3.10 or greater.

Optional but highly recommended:

  • An NVIDIA GPU. Any relatively recent model should work. phlash has been tested on:
    • RTX 4090
    • A40
    • A100
    • V100

Installation

phlash can be installed from PyPI using pip:

$ pip install phlash

If your machine contains an Nvidia GPU, you should be sure to install the gpu variant in order to enable it:

$ pip install 'phlash[gpu]'

I recommend installing phlash into a separate virtual environment: before running the above, do

$ python3 -mvenv /path/to/phlash  # replace with desired path
$ source /path/to/phlash/bin/activate
$ pip3 install -U pip setuptools  # recent version of pip and setuptools are required

Running the program

See notebooks/example.md for example code and usage instructions.

Troubleshooting / FAQ

I (Jonathan) am happy to assist you with using phlash, as much as my time allows.

  • If you encounter a bug (program crash or other unexpected behavior) please file an issue describing the bug.
  • If you need help with anything else (installation, running the program, data formatting, interpreting the output, etc.) please open a discussion.

Making Changes & Contributing

Contributions (in the form of Github pull requests) to improve the project are always welcome!

This project uses pre-commit_, please make sure to install it before making any changes::

pip install pre-commit
cd phlash
pre-commit install

It is a good idea to update the hooks to the latest version::

pre-commit autoupdate

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

phlash-1.0.6.tar.gz (59.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phlash-1.0.6-py3-none-any.whl (106.8 kB view details)

Uploaded Python 3

File details

Details for the file phlash-1.0.6.tar.gz.

File metadata

  • Download URL: phlash-1.0.6.tar.gz
  • Upload date:
  • Size: 59.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.4

File hashes

Hashes for phlash-1.0.6.tar.gz
Algorithm Hash digest
SHA256 3acd01d0d3292178c5ee725e96887df40012f2caadd219f64b70d25225d9bc80
MD5 d250759e0e7259af7d95452769680647
BLAKE2b-256 91461b722745694eedfb766699906192fc0a1894bf30a69d90874e28eb3401d5

See more details on using hashes here.

File details

Details for the file phlash-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: phlash-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 106.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.4

File hashes

Hashes for phlash-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 506482021b203cc5a1c111e3bf5d47910116f599f53f5c3d5eab5890845b8526
MD5 cdcb71016b3f8d0cbd174f87f65e6a15
BLAKE2b-256 f6e3ad33f39b9b79fbe683a8f1edca1d0f5f4a818d30f004d5d5aed6b88a20b5

See more details on using hashes here.

Supported by

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