Python接口到Libsequence。
pylibseq的Python项目详细描述
此包为C++ 11库libsequence提供了Python绑定。
绑定是使用pybind11实现的。
此软件包提供两个角色:
- 它提供了一种在python语言中使用libsequence中一些更广泛使用的位的方法
- 此包的单元测试还用作libsequence的单元测试。
这个包做什么不(当前)做什么:
- 为I/O操作提供接口。Python I/O和C++ I/O从根本上是非常不同的。桥接间隙需要向PybDun11添加特性和/或添加依赖于^ {A6}Python接口的模块,这将对该包添加额外的C++依赖性。
引文
如果您使用此软件进行研究,请引用:
@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" }
要求:
- Python3
- 克
注意
从0.2.2版起,libsequence作为编译的git子模块包含 直接进入python包。
如果从github安装,那么pybind11是一个依赖项。此外, pybind11不能从pypi这样的源安装。相反,一定是 从源安装或通过您喜爱的包管理器安装这个 原因是我们在构建过程中使用了它们的cmake宏。
变更日志(粗略)
- 0.2.0:包已完全重构。现在我们使用pybind11来集成C++和Python。上一个 此项目的版本使用了Cythonapi现在响应libsequence1.9.2。Python>;=3.4是必需的。
- 0.1.9:使内存管理更健壮:更独特的指针而不是原始指针清除扩展类型中的dealloc函数程序包现在设置版本。类名现在是“Python”(与LIB序列的对应类型名称相同),因为从LBScript中混淆了C++名称。从distutils更改为setuptools。文档修复。暴露单倍型多样性和单倍型统计数。第一次(非常α)释放PymStats。
- 0.1.7:改进构建系统添加从github生成的选项。
- 0.1.6:更新到libsequence 1.8.9。add–将cython选项用于setup.py
安装:
对于许多用户来说,安装最新版本的最佳方式是通过bioconda,
conda -c bioconda install pylibseq
最新版本的包可以通过PyPi获得,并且可以与您喜爱的python包管理器一起安装:
$ pip install --upgrade pylibseq
或者,您可以从github安装:
注意
GitHub版本不包含PyBind11生成的.cpp文件。你需要创造这些!
$ git clone http://github.com/molpopgen/pylibseq
$ cd pylibseq
$ git submodule init
$ git submodule update
$ ./configure $ sudo pip install .
您也可以使用pip从github安装:
$ pip install git+git://github.com/molpopgen/pylibseq
单元测试:
$ ./configure $ python setup.py build_ext -i $ python -m unittest discover tests