Python interface to libsequence.
Project description
This package provides Python bindings for the C++11 library libsequence.
The bindings are implemented using pybind11.
This package serves two roles:
It provides a means of using some of the more widely-used bits of libsequence within the Python language
The unit tests of this package also serve as unit tests for libsequence.
What this package does not (currently) do:
provide an interface for I/O operations. Python I/O and C++ I/O are fundamentally very different. Bridging the gap requires either adding features to pybind11 and/or adding modules to this package that depend on the boost Python interface, which would add an additional C++ dependency to this package.
Build status
Master branch:
Development branch:
Citation
If you use this software for your research, please cite:
@ARTICLE{Thornton2003-wj, title = "Libsequence: a C++ class library for evolutionary genetic analysis", author = "Thornton, Kevin", abstract = "UNLABELLED: A C++ class library is available to facilitate the implementation of software for genomics and sequence polymorphism analysis. The library implements methods for data manipulation and the calculation of several statistics commonly used to analyze SNP data. The object-oriented design of the library is intended to be extensible, allowing users to design custom classes for their own needs. In addition, routines are provided to process samples generated by a widely used coalescent simulation. AVAILABILITY: The source code (in C++) is available from http://www.molpopgen.org", journal = "Bioinformatics", volume = 19, number = 17, pages = "2325--2327", month = nov, year = 2003, url = "https://www.ncbi.nlm.nih.gov/pubmed/14630667", language = "en", issn = "1367-4803", pmid = "14630667", doi = "10.1093/bioinformatics/btg316" }
Requirements:
Python 3
cmake
An up-to-date C++ compiler that is C++11 compatible via the flag -std=c++11. Roughly, this means GCC >= 4.8 and clang >= 3.5.
Changelog (rough)
0.2.0: The package has been completely refactored. We now use pybind11 to integrate C++ and Python. Previous versions of this project used Cython. The API now corrresponds to libsequence 1.9.2. Python >= 3.4 is required.
0.1.9: Made memory management more robust: more unique_ptr instead of raw pointers. Cleanup __dealloc__ functions in extension types. Package now sets __version__. Class names are now “Pythonic” (and identical to the corresponding type names from libsequence) due to aliasing the C++ names from libsequence. Change from distutils to setuptools. Documentation fixes. Expose haplotype diversity and number of haplotype statistics. First (very alpha) release of pymsstats.
0.1.8: made sure C++ objects/fxns are declared “nogil”. Raw pointers replaced with C++’s unique_ptr.
0.1.7: improvements to build system. Add option to build from GitHub.
0.1.6: update to libsequence 1.8.9. Add –use-cython option to setup.py
Installation:
For many users, the best way to install the latest release will be via bioconda,
conda -c bioconda install pylibseq
The latest release of the package is available via PyPi, and can be installed with your favorite Python package manager:
$ pip install --upgrade pylibseq
Or, you may install from GitHub:
$ git clone http://github.com/molpopgen/pylibseq
$ cd pylibseq
$ git submodule init
$ git submodule update
$ ./configure
$ sudo pip install .
You may also install from GitHub using pip:
$ pip install git+git://github.com/molpopgen/pylibseq
Unit testing:
$ ./configure
$ python setup.py build_ext -i
$ python -m unittest discover tests
Documentation:
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
File details
Details for the file pylibseq-0.2.3.tar.gz
.
File metadata
- Download URL: pylibseq-0.2.3.tar.gz
- Upload date:
- Size: 359.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 112adec97fbc7c6011e910848e4d40920e68f74de0b5d4b9958be2d40f42fd26 |
|
MD5 | 95393f87e0909af43b93eb0659bb7cbf |
|
BLAKE2b-256 | fbad4668151b966b46a039cea5c36b140d1ec5995c97ca9735748b317e35c267 |