PyPop: Python for Population Genomics


The old 0.7.0 binary releases based on Python 2, are deprecated and will no install or work on many platforms. Please follow the instructions on the GitHub README.rst for how to install one of the Python 3-based pre-releases, or build PyPop from source on a modern Python 3 system.

PyPop (Python for Population Genomics) is an environment for doing large-scale 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).

It is an object-oriented framework implemented in Python, a language with powerful features for interfacing with other languages, such as C (in which we have already implemented many routines and which is particularly suited to computationally intensive tasks).

The output of the analyses are stored in XML. These output files can then be transformed using standard tools into many other data formats suitable for machine input (such as PHYLIP or input for spreadsheet programs such as Excel or statistical packages, such as R), plain text, or HTML for human-readable format. Storing the output in XML allows the final viewable output format to be redesigned at will, without requiring the (often time-consuming) re-running of the analyses themselves.

An outline of PyPop can be found in our 2007 Tissue Antigens and 2003 PSB papers.

Installation and documentation

Documentation, including instructions on installing, using and interpreting output of PyPop, is contained in the PyPop User Guide.

Contact and questions

Please file all questions, support requests, and bug reports via our GitHub issue tracker. More details on how to file bug reports can be found in our contributors chapter of the User Guide.

Source code

PyPop is free software (sometimes referred to as open source software) and the source code is released under the terms of the “copyleft” GNU General Public License, or GPL ( All source code is available and maintained on our GitHub website.

How to cite PyPop

To cite PyPop, please cite both:

  1. the (2007) paper from Tissue Antigens:

    Tissue Antigens

    Lancaster AK, Single RM, Solberg OD, Nelson MP and G Thomson (2007) “PyPop update - a software pipeline for large-scale multilocus population genomics” Tissue Antigens 69 (s1), 192-197. [journal page, preprint PDF (112 kB)].

  2. and the Zenodo record for the specific version of the software (which has version-specific DOI). First visit the main Zenodo record and use the DOI of the specific version of the software you used. It will be of the form:


    Lancaster, AK et al. (2023) “PyPop: Python for Population Genomics” (Version 1.0.0) [Computer software].

    Human and machine-readable citation metadata for the Zenodo record is stored in the CITATION.cff in the GitHub repository.

Also available (but not necessary to cite), is our 2003 Pacific Symposium on Biocomputing paper:

  • Alex Lancaster, Mark P. Nelson, Richard M. Single, Diogo Meyer, and Glenys Thomson (2003) “PyPop: a software framework for population genomics: analyzing large-scale multi-locus genotype data”, in Pacific Symposium on Biocomputing vol. 8:514-525 (edited by R B Altman. et al., World Scientific, Singapore, 2003) [PubMed Central, PDF (344 kB)].

PyPop was originally developed for the analysis of data for the 13th International Histocompatiblity Workshop and Conference held in Seattle, Washington in 2002 ([Meyer:etal:2007], [Single:etal:2007a], [Single:etal:2007a]). For more details on the design and technical details of PyPop, please consult [Lancaster:etal:2003], [Lancaster:etal:2007a] and [Lancaster:etal:2007b].


This work has benefited from the support of NIH grant AI49213 (13th IHW) and NIH/NIAID Contract number HHSN266200400076C N01-AI-40076. Thanks to Steven J. Mack, Kristie A. Mather, Steve G.E. Marsh, Mark Grote and Leslie Louie for helpful comments and testing.

Supplementary data files

Population data files and online supporting materials for published studies listed in the [Solberg:etal:2008] meta-analysis paper.

PyPop is affiliated with, the Immunology Database and Analysis Portal. The ImmPort system provides advanced information technology support in the production, analysis, archiving, and exchange of scientific data for the diverse community of life science researchers supported by NIAID/DAIT. The development of the ImmPort system was supported by the NIH/NIAID Bioinformatics Integration Support Contract (BISC), Phase II.