Command-line tool for simulating predictive datasets from MrBayes' output.
predsim is a command-line tool for simulating predictive datasets from MrBayes output files. Datasets can be simulated under the GTR+G+I substitution model or any nested variant available in MrBayes (JC69, HKY85 etc.). The script uses Seq-Gen for simulating the DNA-sequences and builds on the third-party libraries DendroPy and pandas.
The code has been tested with Python 2.7, 3.3, 3.4 and 3.5.
Source repository: https://github.com/jmenglund/predsim
For most users, the easiest way is probably to install the latest version hosted on PyPI:
$ pip install predsim
The project is hosted at https://github.com/jmenglund/predsim and can also be installed using git:
$ git clone https://github.com/jmenglund/predsim.git $ cd predsim $ python setup.py install
You may consider installing predsim and its required Python packages within a virtual environment in order to avoid cluttering your system’s Python path. See for example the environment management system conda or the package virtualenv.
$ predsim --help usage: predsim [-h] [-V] [-l INT] [-g INT] [-c FILE] [-s INT] [-p FILE] pfile tfile [outfile] A command-line utility that reads posterior output of MrBayes and simulates predictive datasets with Seq-Gen. positional arguments: pfile path to a MrBayes p-file tfile path to a MrBayes t-file outfile path to output file (default: <stdout>) optional arguments: -h, --help show this help message and exit -V, --version show program's version number and exit -l INT, --length INT sequence lenght (default: 1000) -g INT, --gamma-cats INT number of gamma rate categories (default: continuous) -c FILE, --commands-file FILE path to output file with used Seq-Gen commands -s INT, --skip INT number of records (trees) to skip at the beginning of the sample (default: 0) -p FILE, --seqgen-path FILE path to a Seq-Gen executable (default: "seq-gen")
Testing is carried out with pytest. Here is an example on how to run the test suite and generating a coverage report:
$ cd predsim $ pip install pytest pytest-cov pytest-pep8 $ py.test -v --cov-report term-missing --cov predsim.py --pep8
If you use results produced with this package in a scientific publication, please just mention the package name in the text and cite the Zenodo DOI of this project:
You can select a citation style from the dropdown menu in the “Cite as” section on the Zenodo page.
predsim relies on other software that also should be cited. Below are suggested citations for Seq-Gen, DendroPy and pandas, respectively:
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|File Name & Checksum SHA256 Checksum Help||Version||File Type||Upload Date|
|predsim-0.1.1-py2.py3-none-any.whl (9.3 kB) Copy SHA256 Checksum SHA256||any||Wheel||Aug 11, 2016|
|predsim-0.1.1.tar.gz (7.0 kB) Copy SHA256 Checksum SHA256||–||Source||Aug 11, 2016|