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.3.tar.gz (282.7 kB view details)

Uploaded Source

Built Distribution

phlash-1.0.3-py3-none-any.whl (44.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: phlash-1.0.3.tar.gz
  • Upload date:
  • Size: 282.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.15.2 CPython/3.10.12 Linux/5.15.0-102-generic

File hashes

Hashes for phlash-1.0.3.tar.gz
Algorithm Hash digest
SHA256 b4f49054ac4f0228c2981a1caba2d2539190a6d465d120cd9f37f0229969235d
MD5 043a5ebb4b3c7f547b6ac1de08756664
BLAKE2b-256 55581bbd1300cd2b3f30111fb7065e91577b2c1e577045dd31c8ebf6b6119ea3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: phlash-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 44.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.15.2 CPython/3.10.12 Linux/5.15.0-102-generic

File hashes

Hashes for phlash-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7fad893caa19ab730c503ef4955fb2d9219e03b07ef9def09859e720038a372e
MD5 6bcfbd867a0ee0e82a9181fff2cdc645
BLAKE2b-256 a8c129bf5082028f1500142c43277e398fd4640db996df3d7442fbf0a68f5850

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