Giter Club home page Giter Club logo

pypop's Introduction

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

pypop's People

Contributors

akkornel avatar alexlancaster avatar diogomeyer avatar gwebster avatar odoublewen avatar rms03 avatar rsingle avatar ystsai avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.