Skip to main content

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

Metadata

Release files for phlash 1.0.6

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

Source distribution (sdist)

Source distribution for phlash 1.0.6
File Size Uploaded
phlash-1.0.6.tar.gz 59.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for phlash 1.0.6
File Interpreter ABI Platform
phlash-1.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 165.8 kB

Release files / phlash-1.0.6.tar.gz

Download URL phlash-1.0.6.tar.gz
Size 59.0 kB
Tags Source
SHA-256 checksum
How to use checksums
3acd01d0d3292178c5ee725e96887df40012f2caadd219f64b70d25225d9bc80
BLAKE2b-256 checksum
How to use checksums
91461b722745694eedfb766699906192fc0a1894bf30a69d90874e28eb3401d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.4

Release files / phlash-1.0.6-py3-none-any.whl

Download URL phlash-1.0.6-py3-none-any.whl
Size 106.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
506482021b203cc5a1c111e3bf5d47910116f599f53f5c3d5eab5890845b8526
BLAKE2b-256 checksum
How to use checksums
f6e3ad33f39b9b79fbe683a8f1edca1d0f5f4a818d30f004d5d5aed6b88a20b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.4

Release history Release notifications | RSS feed

This release

1.0.6 This release

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

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