PyPop: Python for Population Genetics
Project description
PyPop: Python for Population Genomics
PyPop is a framework for processing genotype and allele data and running population genetic analyses, including conformity to Hardy-Weinberg expectations; tests for balancing or directional selection; estimates of haplotype frequencies and measures and tests of significance for linkage disequilibrium (LD). See the PyPop User Guide for a more detailed description.
How to cite PyPop
If you write a paper that uses PyPop in your analysis, please cite:
our 2007 paper from Tissue Antigens:
Quickstart Guide
Installing pypop-genomics
If you already have Python and pip installed, install a test pre-releases using the following:
pip install pypop-genomics
Otherwise, follow these instructions to install Python 3 and pip.
Once pypop-genomics is installed, depending on your platform, you may also need to adjust your PATH environment variable.
Upgrading pypop-genomics
pip install -U pypop-genomics
Uninstalling pypop-genomics
pip uninstall pypop-genomics
For more, including handling common installation issues, see the detailed installation instructions .
Once you have installed pypop-genomics, you can move on to try some example runs.
Examples
These are examples of how to check that the program is installed and some minimal use cases.
Checking version and installation
pypop --version
This simply reports the version number and other information about PyPop, and indirectly checks that the program is installed. If all is well, you should see something like:
pypop 1.0.0a23
Copyright (C) 2003-2006 Regents of the University of California.
Copyright (C) 2007-2023 PyPop team.
This is free software. There is NO warranty; not even for
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
You can also run pypop --help to see a full list and explanation of all the options available.
Run a minimal dataset:
Download test .ini and .pop files: minimal.ini and USAFEL-UchiTelle-small.pop. You can then run them
pypop -c minimal.ini USAFEL-UchiTelle-small.pop
If you have already cloned the git repository and it is your working directory, you can simply run
pypop -c tests/data/minimal.ini tests/data/USAFEL-UchiTelle-small.pop
This will generate the following two files, an XML output file and a plain text version:
USAFEL-UchiTelle-small-out.xml USAFEL-UchiTelle-small-out.txt
Detailed installation instructions
There are three main steps:
install Python and pip
install package from Test PyPI
adjusting your PATH variable after installation
Install Python 3 and pip
A full description of installing Python and pip on your system is beyond the scope of this guide, we recommend starting here:
Here are some additional platform-specific notes that may be helpful:
Most Linux distributions come with Python 3 preinstalled. On most modern systems, pip and python will default to Python 3.
MacOS 10.9 (Jaguar) up until 12.3 (Catalina), used to ship with Python 2 pre-installed, but it now has to be manually installed. See the MacOS quick-start guide in the official documentation for how to install Python 3. (Note that if Python is installed on Mac via the MacOS developer tools, it may include the version 3 suffix on commands, e.g. python3 and pip3, so modify the below, accordingly).
For Windows, see also the Windows quick-start guide in the official documentation. Running python in the Windows command terminal in Windows 11 and later will launch the installer for the Microsoft-maintained Windows package of Python 3.
Install package from PyPI
Once you have both python and pip installed, you can use pip to install pre-compiled binary “wheels” of pypop-genomics pre-releases, directly from PyPI.
pip install pypop-genomics
Upgrade an existing PyPop installation
To update an existing installation to a newer version, use the same command as above, but add the --upgrade (short version: -U) flag, i.e.
pip install -U pypop-genomics
Installing from Test PyPI
From time to time, we may make available packages on the Test PyPI instance, rather than the through the main instance. The above installation and updating instructions can be used, by appending the following:
--extra-index-url https://test.pypi.org/simple/
to the above pip commands.
Issues with installation permission
By default, pip will attempt to install the pypop-genomics package wherever the current Python installation is installed. This location may be a user-specific virtual environment (like conda, see below), or a system-wide installation. On many Unix-based systems, Python will generally already be pre-installed in a “system-wide” location (e.g. under /usr/lib) which is read-only for regular users. (This can also be true for system-installed versions of Python on Windows and MacOS.)
When pip install cannot install in a read-only system-wide location , pip will gracefully “fall-back” to installing just for you in your home directory (typically ~/.local/lib/python<VER> where <VER> is the version number of your current Python). In general, this is what is wanted, so the above instructions are normally sufficient.
However, you can also explicitly set installation to be in the user directory, by adding the --user command-line option to the pip install command, i.e.:
pip install pypop-genomics --user
This may be necessary in certain cases where pip install doesn’t install into the expected user directory.
Install package from GitHub Releases (advanced)
We also sometimes make binary packages also available from the GitHub release page:
To install these is similar to installing via PyPI above, except that you need to explicitly provide a URL to the release page.
First, visit the release page, and choose the release version you wish to install (usually the most recent), and note the release tag (e.g. v1.0.0-a23).
Next, use pip to install the package by running a command of the form (this will select and install the correct wheel for your Python version and operating system automatically):
pip install pypop-genomics -f https://github.com/alexlancaster/pypop/releases/expanded_assets/<TAG_NAME>
where <TAG_NAME> is replaced with a specific tag, e.g. for the example given above, you would run:
pip install pypop-genomics -f https://github.com/alexlancaster/pypop/releases/expanded_assets/v1.0.0-a23
You can also manually download the specific wheel from the github release webpage and install directly, e.g.:
pip install pypop_genomics-1.0.0a23-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Post-install PATH adjustments
You may need to adjust the PATH settings (especially on Windows) for the pypop scripts to be visible when run from your console application, without having to supply the full path to the pypop executable file.
On Linux and MacOS, systems this is normally fairly simple and only requires edit of the shell .profile, or similar and addition of the $HOME/.local/bin to the PATH variable, followed by a restart of the terminal.
For Windows, however, as noted in most online instructions, this may need additional help from your system administrator if your user doesn’t have the right permissions, and also require a system reboot.
Uninstalling PyPop
To uninstall the current version of pypop-genomics:
pip uninstall pypop-genomics
Support and development
Please submit any bug reports, feature requests or questions, via our GitHub issue tracker (see our bug reporting guidelines for more details on how to file a good bug report):
Please do not report bugs via private email to developers.
The development of the code for PyPop is via our GitHub project:
For a detailed description on bug reporting as well as how to contribute to PyPop, please consult our CONTRIBUTING.rst guide. We also have additional notes and background relevant for developers in DEV_NOTES.md. Source for the website and the documentation is located in the website subdirectory.
Copyright and License
PyPop is Copyright (C) 2003-2006. The Regents of the University of California (Regents)
Copyright (C) 2007-2023 PyPop team.
PyPop is distributed under the terms of GPLv2
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for pypop_genomics-1.0.0b2-pp39-pypy39_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 076832ac26ccf8950eb9fca46caf93d2875d61b33155679e12829b792741146a |
|
MD5 | 6085af8904ce93cb2904131f6793a050 |
|
BLAKE2b-256 | 50a9be19667da38739ca3c37323bb73949cc3a1cd4c00204bfa5ff5ace62f1c7 |
Hashes for pypop_genomics-1.0.0b2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fedc85c0d1ff5fa29eae16739b24c87d9cb68ba3c6fa65781faef046b6969222 |
|
MD5 | 0c0ad305ad541c1d11e27ae5f2f8e05f |
|
BLAKE2b-256 | 245071714103388eb5548b2861817d2f2fbab7bbeef315faec652acf26b3a34a |
Hashes for pypop_genomics-1.0.0b2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d742ef2b82eb5ff88cb7ef257bcc86e76573a5f8d005a9f3566e232421f7e4c |
|
MD5 | 0e9137269f2814bcd4e9a30f0ca959d8 |
|
BLAKE2b-256 | 8e1bcc8dd7d34f42a31f710f06aa30ec0199d8436b5d364dbfcefd0d67bddee6 |
Hashes for pypop_genomics-1.0.0b2-pp38-pypy38_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97513945ea735802df2ade9ad4aef7b4d8ea8d32245d999ca8932023550b3510 |
|
MD5 | 0d75a5d8f8fca011afdc14161730738b |
|
BLAKE2b-256 | 878dac4a3d2255e7f21677a30d16529bf0ec447e6758b547c06d08ecda3e12d8 |
Hashes for pypop_genomics-1.0.0b2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2dfd0712c51444f866f008dc38d4850574e6363cc672da07588d5d4e4f346681 |
|
MD5 | 86b1b986e9c43b5315e008a6401fcd15 |
|
BLAKE2b-256 | 02a7cd61456e5be83fe004ae9daca9de43c774b31329a9b6135172ca4eeadbf6 |
Hashes for pypop_genomics-1.0.0b2-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc16e19273954dece63bc332f912073e5b2668f1ce5a2fc3ef985f9de5b27328 |
|
MD5 | a4ddfd77132334c3c4f27f9872dcc198 |
|
BLAKE2b-256 | b24306309a7cd759d47523a480f641bd1c8faf445a667653f1f0c9686c13464d |
Hashes for pypop_genomics-1.0.0b2-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1398a751255bf5bf097cfb3e98093b5017cdc8da86e9d514b7b6b5b09b9b434c |
|
MD5 | d716406a8b01c0fb6abc5bb7d5d838f2 |
|
BLAKE2b-256 | b61b7dfb38dd64b7066a3e8bcefa523ad7ba69456a828aac01b70947c41fefcd |
Hashes for pypop_genomics-1.0.0b2-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0649b55cce2ba7027010192d0f3d9e8570b308c31045eeed84c7567f68731483 |
|
MD5 | cc47241280d5200b77350ce006183c54 |
|
BLAKE2b-256 | c624e6eaab3349fcd3aaab40cf0134f5936c0432255439d87c949c4cf5a9b478 |
Hashes for pypop_genomics-1.0.0b2-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7ed54c491dc5d2521bf91e7b60a295d89878e0b79863a1f6ea3a022473888f8 |
|
MD5 | 446cd0e4e2f6d76370aae1033ae714fc |
|
BLAKE2b-256 | b21c1f1a49ef86c77b09b7c7a0e124f58c1575ab8a1b1ea47fc7968469b7fb7b |
Hashes for pypop_genomics-1.0.0b2-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63545c7ad2c6d9bb16022b9305a2e71c718ee31aedc726919f15eef3c819e224 |
|
MD5 | 671f06e874fb057ff97cd9c7f7c2f98a |
|
BLAKE2b-256 | a0b26389ff1e9def64fbc5326747302bda7f4a78aef9609cf04dc4e4323b3b36 |
Hashes for pypop_genomics-1.0.0b2-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42503f5d932c7ca59357ad93832ce08b22e2eec701bc76eee19ce40cf73f82cc |
|
MD5 | 6c007ae0bd1232f9af02703c1e5bd5ea |
|
BLAKE2b-256 | dae548145f5e6a700e94f5140d3ed847a9d08a8519e40df1ea65371d183993a2 |
Hashes for pypop_genomics-1.0.0b2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb6fa5ff9fa7033c887af7eded50cf30533ee79926ad0b874f2bbfe68275859e |
|
MD5 | a71ef23b157888f2a2dc9a77c96e3f9e |
|
BLAKE2b-256 | 9f305c60384d66402b902816415c299c71ce1ed377f22c1b47a02492f2330460 |
Hashes for pypop_genomics-1.0.0b2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc7bee46de1a913d668f96c7fee3b2f407a0db3d018525a951aa5dbca80d664a |
|
MD5 | e7a3a130940688082c9077ebe1312c10 |
|
BLAKE2b-256 | 58ceaf89c61ca589fff4b67eae2fe8600ea6cb45450f1210b149ef5095ae4a05 |
Hashes for pypop_genomics-1.0.0b2-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8012f91fafa9cc9a1bc10044b98e7caff330ada2b7faa579521846305b9b4686 |
|
MD5 | 9927402f0191cfb7fa8f9ecc278968d5 |
|
BLAKE2b-256 | 409cf321fb58f69c608a5652636070e5fe31e6023fac04d2fa9556cf5f26ac2c |
Hashes for pypop_genomics-1.0.0b2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60a84b15eca072c2a189a1934ccdb1e06b2ccc708be0dd96b92b61332554b827 |
|
MD5 | bfd49af0574ad80123158729f47c21a4 |
|
BLAKE2b-256 | c9be45f6496b83ec8e3f55a1af67d7568ba04e4d8454e18219a079b3533642fb |
Hashes for pypop_genomics-1.0.0b2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c55c6625281371fa57f5f17f228aaa38efd91b42d1ab423d65523f6cb6dae787 |
|
MD5 | b086d9272cb46e261054b726d16f408d |
|
BLAKE2b-256 | 2c7cc78e21b9ca5ea76e1a9cd68828320452c42b29bec45d03808990b34a05bb |
Hashes for pypop_genomics-1.0.0b2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33a94d959513e03f991de400043fedad6a433a68c14401600431ac96284eaee8 |
|
MD5 | fa71a58e855149660e1ae2b93a663ece |
|
BLAKE2b-256 | 6b21d7c465046ffd3c3f6594f4fcd60e5546a3ab0f3823b0f59a880fd2607404 |
Hashes for pypop_genomics-1.0.0b2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f38508857dba20ffe2eec54657c9185d53785f4e8f70f20234b7f8fe708cabf |
|
MD5 | 381c93bb0b7b16b1ec55f91015a16ca7 |
|
BLAKE2b-256 | 71e20df376338741176c000c425ea4aa38df2d60a0522e42c762c2ac7b5a7290 |
Hashes for pypop_genomics-1.0.0b2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89ca8596e56f3f0070cb2a135b575d916a6c9068bef11b6429bfc69eb6d12556 |
|
MD5 | 4bd27615a7b3694ecac38d5a85275906 |
|
BLAKE2b-256 | 8b0737a913ea14d6e106606b13464a6ded2d65c7f037d11132ed8f66777a51ca |
Hashes for pypop_genomics-1.0.0b2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9cd87717d35f94a1c0c66a7fb2f9a2b0fc5ffa9db1f8a0d6982cf7217711f7e6 |
|
MD5 | 346d0204e8ca9c0be67b6ebf7f5dc930 |
|
BLAKE2b-256 | 541a8454ce92a3b0fb1e111f31c64c8366ce279cdc0c4347424bc7cce1c69219 |
Hashes for pypop_genomics-1.0.0b2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ddb20dc5612c3ff2f8914bcf7c6d8c1fb9c4749ed371bc366582fe5798cac9f3 |
|
MD5 | ac9d2aeb38f2494e3f6241315d8f9bd2 |
|
BLAKE2b-256 | a29ac9e9d61023c3f7c5613c726bb0b2a202206cca5241de91cca2fb806ea330 |
Hashes for pypop_genomics-1.0.0b2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a30b5930d1fbef114deb80708af4ccd6310e356887a8f6b9024ba24136c39a6c |
|
MD5 | 198bd68321e8b52f64b35595187219f6 |
|
BLAKE2b-256 | d3ccd998e9a52762138a38db32a6151ac1fdde984f43cb957b68a278f0054b2a |
Hashes for pypop_genomics-1.0.0b2-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e8546958891af9bd3b73ac5b983de9823839a27cb4e66385361c02a17d99964 |
|
MD5 | cbdc7f77c84e8f1fc7c8c54f11944dda |
|
BLAKE2b-256 | 7d3d0c45798c0fee1091c756adf042647719fdffac11c97036b8ea4ea58043e6 |
Hashes for pypop_genomics-1.0.0b2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b764f4793efb241a671be4123701387cd7efce7edc1a826c49930106c4af9056 |
|
MD5 | 10b11faa1a62d44c96f637c4a3d8d9d8 |
|
BLAKE2b-256 | 7793084e1f4d00192c96948331c646ad19181bfeb647f764749c191d35d4d890 |
Hashes for pypop_genomics-1.0.0b2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8186e28f473310ad4cfd93549f0bfd88010dfbda61769130de0b03ab8f1b1fc |
|
MD5 | 80bf159d1d19f255198eaedf5449d928 |
|
BLAKE2b-256 | 10ab76cec3340c6a20c2aa6a9a515306157b5a8d8c9dc3fc8b0de48b1c690a34 |
Hashes for pypop_genomics-1.0.0b2-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7df82eb893712306fae698b9acb88b02b5d0541076387acfae2866b8ebb1afcb |
|
MD5 | 64d22dc24e774c63f91fc71f89d9604f |
|
BLAKE2b-256 | 7cedb716de576a925bf1c2da7f0f98faedade5048c952fed1222801eb03d24c9 |
Hashes for pypop_genomics-1.0.0b2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13aa5c341d434934a0d1c1abd1dbb836815ba0deeff3e83d28866b4560413baf |
|
MD5 | c603393a967a6bb18b5606559e5c50c7 |
|
BLAKE2b-256 | 199bbd492aa76147bbea768fa888e054d570e233e2481ee33021a5262a7eb1ec |
Hashes for pypop_genomics-1.0.0b2-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d43197818b2e351afad1fb45a4099ca145b5b5b39751b58faec06768f60e1d7d |
|
MD5 | 176dafa782eef8029be5d3ff0ac3c23e |
|
BLAKE2b-256 | 007b007e5055c9e1bcf35bd3344a77c36c14ba0c2e01a34acfad626f11322afd |