Python C XSLT PostScript TeX Makefile Other
Switch branches/tags
yetAnotherRunForOctober-2002-09-08 xsltBugFix-2002-09-20 working_version stillRunningForOctober-2002-08-30 start runForOctober2002-08-29-2002-08-29 runForOctober_1-2002-08-11 runForOctober0-2002-07-26 fixForEmbeddedSpaces-2002-09-25 fixForArlequin-2002-09-11 XMLed-haplotypes-for-real-this-time-2002-04-22 XMLed-haplos-2002-04-22 Working_fix-2002-03-21 VERSION_FOR_RUN-2002-03-13 TEST_TAG TAG-2001-07-03 RunWithLD-2002-04-25 Run-without-LD-2002-04-19-2002-04-19 ReleaseCandidate01-2003-09-26 RESPIN-12TH-WS-2002-04-05 PYPOP_SRC-0_7_0 PYPOP_SRC-0_7_0rc3 PYPOP_SRC-0_7_0rc2 PYPOP_SRC-0_7_0rc1 PYPOP_SRC-0_6_0 PYPOP_SRC-0_5_2 PYPOP_SRC-0_5_1 PYPOP_SRC-0_5 PYPOP_SRC-0_4_3beta PYPOP_SRC-0_4_2beta PYPOP_SRC-0_4_1beta PYPOP_SRC-0_4beta PSB2003_INITIAL_SUBMISSION PSB2003_CAMERA_READY_SUBMISSION_2 PSB2003_CAMERA_READY_SUBMISSION PSB2003_AFTER_CORRECTIONS_BY_RICH October_Final_F-2002-11-14 October_Final_E-2002-11-14 October_Final_D-2002-11-14 October_Final_C-2002-10-21 October_Final_B-2002-10-19 October_Final_A-2002-10-11 November_Final_B-2002-11-21 November_Final_A-2002-11-16 New-run-for-output-without-LD-2002-04-18 May-2003-Final-2003-05-15 MONTYS_ORIGINAL-2002-08-16 KIRK_HAPLO_RUN_2001-08-31 KIRK_HAPLO_RUN_2001-04-12 InterimInstallWithPatchesforKristie-2002-06-21 FIX_FOR_EMHAPLOFREQ_XML-2002-04-10 FIRST-SUBMISSION-2002-03-13 End-of-May-2003-05-29 DIOGO-FIXES-2002-03-22 BEFORE_WORKSHOP_BOOK BEFORE_PHASE1_XMLIFYING_2001_03_08 BEFORE_ALLELE_LUMPING_CHANGE_2006_02_16 AprilWeekOne-2002-04-04 AFTER_XML_BRANCH_MERGE
Nothing to show
Clone or download
rsingle Added ALD to the .txt output (in place of the permutation values whic…
…h were currently not being used).

Added emhaplofreq_ORIG.xsl just in case there is an issue that needs to be addressed immediately.
Latest commit 8f005ac Aug 27, 2017
Permalink
Failed to load latest commit information.
PyPop
SWIG
bin
data
emhaplofreq
gthwe
haplo-stats renaming Aug 22, 2017
obsolete
pval
reference
slatkin-exact
tests
xslt
DEV_NOTES.md
LICENSE
MANIFEST.in
NEWS
README.md
Singularity
setup.cfg
setup.py

README.md

Python for Population Genomics (PyPop)

PyPop is a framework for processing genotype and allele data and running population genetic analyses.

Installation

1. Install OS-specific development environment

MacOS X

  1. install developer command-line tools: https://developer.apple.com/downloads/ (includes git, gcc)
  2. Visit http://macports.org and follow the instructions there to install the latest version of MacPorts for your version of MacOS X.
  3. Set environment variables to use macports version of Python and other packages, packages add the following to ~/.bash_profile
export PATH=/opt/local/bin:$PATH
export LIBRARY_PATH=/opt/local/lib/:$LIBRARY_PATH
export CPATH=/opt/local/include:$CPATH
  1. Rerun your bash shell login in order to make these new exports active in your environment. At the command line type:
exec bash -login

2. Clone the repository:

git clone https://github.com/alexlancaster/pypop.git

3. Install dependencies

MacOS:

Install the MacPorts packages

  sudo port install swig-python gsl py27-numpy py-libxml2 py27-libxslt py-setuptools py27-pip

Set MacPorts to use the just-installed 2.7 MacPorts version of Python and pip:

  sudo port select --set python python27
  sudo port select --set pip pip27

Check that the MacPorts version of Python is active by typing: which python, if it is working correctly you should see the following:

/opt/local/bin/python

Linux (Fedora/Centos/RHEL):

Need at least Fedora 25 for the appropriate dependencies:

  sudo dnf install swig gsl-devel python2-numpy python-libxml2 libxslt-python python-setuptools python-pip

See DEV_NOTES.md for instructions on containerizing the install on a Centos/RHEL release.

Linux (Ubuntu)

Install the following packages

  sudo apt install git libgsl-dev python-numpy python-libxml2 python-libxslt1 python-setuptools python-pip

The swig package in recent Ubuntu releases has bugs, you will need to compile the most recent from source, see also DEV_NOTES.md for details.

4. Build

./setup.py build

Examples

These are examples of how to use PyPop. Specify the --help option to see an explanation of the options available.

Run a minimal dataset:

./bin/pypop.py -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

Running test suite

  ./setup.py test

If you run into errors, file a bug (as per Support, below), include the output of py.test run in verbose mode and capturing the output

  py.test -s -v

(See DEV_NOTES.md for more details on installing or running py.test outside the context of setuptools.)

Support

Please submit bug reports and feature requests

https://github.com/alexlancaster/pypop/issues

Bug reporting

When reporting bugs, especially during installation, please run the following and include the output:

echo $CPATH
echo $LIBRARY_PATH
echo $PATH
which python

If you are running on MacOS please also run and include the output of:

port installed

Development

The code for PyPop is at

https://github.com/alexlancaster/pypop

Copyright and License

PyPop is Copyright (C) 2003-2015. The Regents of the University of California (Regents)

PyPop is distributed under the terms of GPLv2