{"id":26457805,"url":"https://github.com/jmenglund/predsim","last_synced_at":"2025-03-18T23:07:19.495Z","repository":{"id":62578012,"uuid":"64793052","full_name":"jmenglund/predsim","owner":"jmenglund","description":"Simulate predictive datasets from MrBayes' output","archived":false,"fork":false,"pushed_at":"2019-07-11T06:23:02.000Z","size":410,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-03T22:54:00.414Z","etag":null,"topics":["bayesian","dendropy","dna-sequences","molecular-evolution","mrbayes","phylogenetics","posterior-predictive","seq-gen","simulation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jmenglund.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-02T21:15:06.000Z","updated_at":"2019-09-23T17:41:15.000Z","dependencies_parsed_at":"2022-11-03T19:42:14.150Z","dependency_job_id":null,"html_url":"https://github.com/jmenglund/predsim","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmenglund%2Fpredsim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmenglund%2Fpredsim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmenglund%2Fpredsim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmenglund%2Fpredsim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmenglund","download_url":"https://codeload.github.com/jmenglund/predsim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244320408,"owners_count":20434091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bayesian","dendropy","dna-sequences","molecular-evolution","mrbayes","phylogenetics","posterior-predictive","seq-gen","simulation"],"created_at":"2025-03-18T23:07:18.988Z","updated_at":"2025-03-18T23:07:19.488Z","avatar_url":"https://github.com/jmenglund.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"predsim\n=======\n\n|Build-Status| |Coverage-Status| |PyPI-Status| |License| |DOI-URI|\n\n**predsim** is a simple command-line tool for simulating predictive\ndatasets from `MrBayes' \u003chttp://mrbayes.sourceforge.net\u003e`_ output files. \nDatasets can be simulated under the GTR+G+I substitution model or any nested \nvariant available in MrBayes (JC69, HKY85 etc.). The code is contained\nwithin a single module that can be imported using Python's import mechanism.\nThe tool uses `Seq-Gen \u003chttp://tree.bio.ed.ac.uk/software/seqgen/\u003e`_ for\nsimulating the DNA-sequences and builds on the third-party library\n`DendroPy \u003chttp://dendropy.org\u003e`_.\n\nThe code has been tested with Python 3.3 and 3.6.\n\nSource repository: `\u003chttps://github.com/jmenglund/predsim\u003e`_\n\n--------------------------------\n\n.. contents:: Table of contents\n   :local:\n   :backlinks: none\n\n\nPrerequisites\n-------------\n\n* Python 3.3+\n* The Python library `DendroPy \u003chttp://dendropy.org\u003e`_ (version 4.0 or higher)\n* The command-line tool `Seq-Gen \u003chttp://tree.bio.ed.ac.uk/software/seqgen/\u003e`_\n\nAn easy way to get Python working on your computer is to install the free\n`Anaconda distribution \u003chttp://anaconda.com/download)\u003e`_.\n\n\nInstallation\n------------\n\nFor most users, the easiest way is probably to install the latest version \nhosted on `PyPI \u003chttps://pypi.org/\u003e`_:\n\n.. code-block::\n\n    $ pip install predsim\n\nThe project is hosted at `\u003chttps://github.com/jmenglund/predsim\u003e`_ and \ncan also be installed using git:\n\n.. code-block::\n\n    $ git clone https://github.com/jmenglund/predsim.git\n    $ cd predsim\n    $ python setup.py install\n\n\nYou may consider installing predsim and its required Python packages \nwithin a virtual environment in order to avoid cluttering your system's \nPython path.\n\n\nUsage\n-----\n\n.. code-block::\n    \n    $ predsim --help\n    usage: predsim [-h] [-V] [-l N] [-f #A #C #G #T] [-g N] [-s N] [-n N]\n                   [-o {nexus,phylip}] [-p FILE] [--seeds-file FILE]\n                   [--commands-file FILE] [--trees-file FILE]\n                   pfile tfile\n\n    A command-line utility that reads posterior output of MrBayes and simulates\n    predictive datasets with Seq-Gen.\n\n    positional arguments:\n      pfile                 path to a MrBayes p-file\n      tfile                 path to a MrBayes t-file\n\n    optional arguments:\n      -h, --help            show this help message and exit\n      -V, --version         show program's version number and exit\n      -l N, --length N      sequence lenght (default: 1000)\n      -f #A #C #G #T, --freqs #A #C #G #T\n                            base frequences (overrides any base frequences in\n                            MrBayes' output)\n      -g N, --gamma-cats N  number of gamma rate categories (default: continuous)\n      -s N, --skip N        number of records (trees) to skip at the beginning of\n                            the sample (default: 0)\n      -n N, --num-records N\n                            number of records (trees) to use in the simulation\n      -o {nexus,phylip}, --out-format {nexus,phylip}\n                            output format (default: \"nexus\")\n      -p FILE, --seqgen-path FILE\n                            path to a Seq-Gen executable (default: \"seq-gen\")\n      --seeds-file FILE     path to file with seed numbers (e.g. for debugging\n                            purposes)\n      --commands-file FILE  path to output file with commands used by Seq-Gen\n      --trees-file FILE     path to output file with trees used by Seq-Gen\n\n* If base frequences are missing from MrBayes' output, these must be set manually\n  with the ``-f`` (or ``--freqs``) flag.\n* It is recommended that you use the ``--commands-file`` and ``--trees-file`` \n  flags to check the input given to Seq-Gen.\n\n\nRunning the tests\n-----------------\n\nTesting is carried out with `pytest \u003chttps://docs.pytest.org/\u003e`_:\n\n.. code-block::\n\n    $ pytest test_predsim.py\n\nTest coverage can be calculated with `Coverage.py\n\u003chttps://coverage.readthedocs.io/\u003e`_ using the following commands:\n\n.. code-block::\n\n    $ coverage run -m pytest test_predsim.py\n    $ coverage report -m predsim.py\n\nThe code follow style conventions in `PEP 8\n\u003chttps://www.python.org/dev/peps/pep-0008/\u003e`_, which can be checked\nwith `pycodestyle \u003chttp://pycodestyle.pycqa.org\u003e`_:\n\n.. code-block::\n\n    $ pycodestyle predsim.py test_predsim.py setup.py\n\n\nLicense\n-------\n\npredsim is distributed under the \n`MIT license \u003chttps://opensource.org/licenses/MIT\u003e`_.\n\n\nCiting\n------\n\nIf you use results produced with this package in a scientific \npublication, please just mention the package name in the text and \ncite the Zenodo DOI of this project:\n\n|DOI-URI|\n\nYou can select your preferred citation style in the \"Cite as\" section\non the Zenodo page.\n\npredsim relies on other software that also should be cited. Below are \nsuggested citations for Seq-Gen and DendroPy:\n\n* Rambaut A, Grassly NC. 1997. Seq-Gen: an application for the Monte \n  Carlo simulation of DNA sequence evolution along phylogenetic trees. \n  Comput. Appl. Biosci. 13:235–238. DOI:\n  `10.1093/bioinformatics/13.3.235 \u003chttps://doi.org/10.1093/bioinformatics/13.3.235\u003e`_\n\n* Sukumaran J, Holder MT. 2010. DendroPy: a Python library for \n  phylogenetic computing. Bioinformatics 26:1569–1571. DOI:\n  `10.1093/bioinformatics/btq228 \u003chttps://doi.org/10.1093/bioinformatics/btq228\u003e`_\n\n\nAuthor\n------\n\nMarkus Englund, `orcid.org/0000-0003-1688-7112 \u003chttp://orcid.org/0000-0003-1688-7112\u003e`_\n\n.. |Build-Status| image:: https://travis-ci.org/jmenglund/predsim.svg?branch=master\n   :target: https://travis-ci.org/jmenglund/predsim\n.. |Coverage-Status| image:: https://codecov.io/gh/jmenglund/predsim/branch/master/graph/badge.svg\n   :target: https://codecov.io/gh/jmenglund/predsim\n.. |PyPI-Status| image:: https://img.shields.io/pypi/v/predsim.svg\n   :target: https://pypi.python.org/pypi/predsim\n.. |License| image:: https://img.shields.io/badge/license-MIT-blue.svg\n   :target: https://raw.githubusercontent.com/jmenglund/predsim/master/LICENSE.txt\n.. |DOI-URI| image:: https://zenodo.org/badge/23107/jmenglund/predsim.svg\n   :target: https://zenodo.org/badge/latestdoi/23107/jmenglund/predsim\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmenglund%2Fpredsim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmenglund%2Fpredsim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmenglund%2Fpredsim/lists"}