.. start-badges
.. image:: https://raw.githubusercontent.com/jjmccollum/teiphy/main/docs/img/teiphy-logo.svg
|license badge| |testing badge| |coverage badge| |docs badge| |black badge| |git3moji badge|
|iqtree badge| |raxml badge| |mrbayes badge| |beast badge| |stemma badge| |joss badge| |doi badge|
.. |license badge| image:: https://img.shields.io/badge/license-MIT-blue.svg?style=flat
:target: https://choosealicense.com/licenses/mit/
.. |testing badge| image:: https://github.com/jjmccollum/teiphy/actions/workflows/testing.yml/badge.svg
:target: https://github.com/jjmccollum/teiphy/actions/workflows/testing.yml
.. |docs badge| image:: https://github.com/jjmccollum/teiphy/actions/workflows/docs.yml/badge.svg
:target: https://jjmccollum.github.io/teiphy
.. |black badge| image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
.. |coverage badge| image:: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/jjmccollum/62997df516f95bbda6eaefa02b9570aa/raw/coverage-badge.json
:target: https://jjmccollum.github.io/teiphy/coverage/
.. |git3moji badge| image:: https://img.shields.io/badge/git3moji-%E2%9A%A1%EF%B8%8F%F0%9F%90%9B%F0%9F%93%BA%F0%9F%91%AE%F0%9F%94%A4-fffad8.svg
:target: https://robinpokorny.github.io/git3moji/
.. |iqtree badge| image:: https://github.com/jjmccollum/teiphy/actions/workflows/iqtree.yml/badge.svg
:target: https://github.com/jjmccollum/teiphy/actions/workflows/iqtree.yml
.. |raxml badge| image:: https://github.com/jjmccollum/teiphy/actions/workflows/raxml.yml/badge.svg
:target: https://github.com/jjmccollum/teiphy/actions/workflows/raxml.yml
.. |mrbayes badge| image:: https://github.com/jjmccollum/teiphy/actions/workflows/mrbayes.yml/badge.svg
:target: https://github.com/jjmccollum/teiphy/actions/workflows/mrbayes.yml
.. |beast badge| image:: https://github.com/jjmccollum/teiphy/actions/workflows/beast.yml/badge.svg
:target: https://github.com/jjmccollum/teiphy/actions/workflows/beast.yml
.. |stemma badge| image:: https://github.com/jjmccollum/teiphy/actions/workflows/stemma.yml/badge.svg
:target: https://github.com/jjmccollum/teiphy/actions/workflows/stemma.yml
.. |joss badge| image:: https://joss.theoj.org/papers/e0a813f4cdf56e9f6ae5d555ce6ed93b/status.svg
:target: https://joss.theoj.org/papers/e0a813f4cdf56e9f6ae5d555ce6ed93b
.. |doi badge| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.7455638.svg
:target: https://doi.org/10.5281/zenodo.7455638
.. end-badges
.. start-about
A Python package for converting TEI XML collations to NEXUS and other formats.
Textual scholars have been using phylogenetics to analyze manuscript traditions since the early 1990s.
Many standard phylogenetic software packages accept as input the `NEXUS file format <https://doi.org/10.1093/sysbio/46.4.590>`_.
The ``teiphy`` program takes a collation of texts encoded using the `Text Encoding Initiative (TEI) guidelines <https://tei-c.org/release/doc/tei-p5-doc/en/html/TC.html>`_
and converts it to a NEXUS format so that it can be used for phylogenetic analysis.
It can also convert to other formats as well, including Hennig86 (for TNT), PHYLIP (for RAxML), FASTA, and the XML format used by BEAST 2.7.
.. end-about
.. start-quickstart
Installation
============
The software can be installed using ``pip``:
.. code-block:: bash
pip install teiphy
Alternatively, you can install the package by cloning this repository and installing it with poetry:
.. code-block:: bash
git clone https://github.com/jjmccollum/teiphy.git
cd teiphy
pip install poetry
poetry install
Once the package is installed, you can run all unit tests via the command
.. code-block:: bash
poetry run pytest
Usage
============
To use the software, run the ``teiphy`` command line tool:
.. code-block:: bash
teiphy <input TEI XML> <output file>
``teiphy`` can export to NEXUS, Hennig86 (TNT), PHYLIP (in the relaxed form used by RAxML), FASTA, BEAST 2.7 XML, CSV, TSV, Excel and STEMMA formats.
``teiphy`` will try to infer the file format to export to from the extension of the output file. Accepted file extensions are:
".nex", ".nexus", ".nxs", ".ph", ".phy", ".fa", ".fasta", ".xml", ".tnt", ".csv", ".tsv", ".xlsx".
To explicitly say which format you wish to export to, use the ``--format`` option. For example:
.. code-block:: bash
teiphy <input TEI XML> <output file> --format nexus
For more information about the other options, see the help with:
.. code-block:: bash
teiphy --help
Or see the documentation with explanations about `advanced usage <https://jjmccollum.github.io/teiphy/advanced.html>`_.
The software can also be used in Python directly.
See `API Reference <https://jjmccollum.github.io/teiphy/reference.html>`_ in the documentation for more information.
.. end-quickstart
Credits
============
.. start-credits
``teiphy`` was designed by Joey McCollum (Australian Catholic University) and Robert Turnbull (University of Melbourne).
We received additional help from Stephen C. Carlson (Australian Catholic University).
If you use this software, please cite the paper: Joey McCollum and Robert Turnbull, "``teiphy``: A Python Package for Converting TEI XML Collations to NEXUS and Other Formats," *JOSS* 7.80 (2022): 4879, DOI: 10.21105/joss.04879.
.. code-block:: bibtex
@article{MT2022,
author = {Joey McCollum and Robert Turnbull},
title = {{teiphy: A Python Package for Converting TEI XML Collations to NEXUS and Other Formats}},
journal = {Journal of Open Source Software},
year = {2022},
volume = {7},
number = {80},
pages = {4879},
publisher = {The Open Journal},
doi = {10.21105/joss.04879},
url = {https://doi.org/10.21105/joss.04879}
}
Further details on the capabilities of ``teiphy``, particularly in terms of the text-critically valuable features it can map from TEI XML collations to BEAST 2 inputs, are discussed in Joey McCollum and Robert Turnbull, "Using Bayesian Phylogenetics to Infer Manuscript Transmission History," *DSH* 39.1 (2024): 258–279, DOI: 10.1093/llc/fqad089.
.. code-block:: bibtex
@article{MT2024,
author = {Joey McCollum and Robert Turnbull},
title = {{Using Bayesian Phylogenetics to Infer Manuscript Transmission History}},
journal = {Digital Scholarship in the Humanities},
year = {2024},
volume = {39},
number = {1},
pages = {258--279},
doi = {10.1093/llc/fqad089},
url = {https://doi.org/10.1093/llc/fqad089}
}
.. end-credits
Raw data
{
"_id": null,
"home_page": "https://github.com/jjmccollum/teiphy",
"name": "teiphy",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": null,
"keywords": "Python, phylogenetics, text encoding, TEI, NEXUS",
"author": "Joey McCollum and Robert Turnbull",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/e2/04/7351d457ea6cb2b400203e9caeeac2336befe8e842e4d492626f40a390de/teiphy-0.1.18.tar.gz",
"platform": null,
"description": ".. start-badges\n\n.. image:: https://raw.githubusercontent.com/jjmccollum/teiphy/main/docs/img/teiphy-logo.svg\n\n|license badge| |testing badge| |coverage badge| |docs badge| |black badge| |git3moji badge| \n|iqtree badge| |raxml badge| |mrbayes badge| |beast badge| |stemma badge| |joss badge| |doi badge|\n\n.. |license badge| image:: https://img.shields.io/badge/license-MIT-blue.svg?style=flat\n :target: https://choosealicense.com/licenses/mit/\n\n.. |testing badge| image:: https://github.com/jjmccollum/teiphy/actions/workflows/testing.yml/badge.svg\n :target: https://github.com/jjmccollum/teiphy/actions/workflows/testing.yml\n\n.. |docs badge| image:: https://github.com/jjmccollum/teiphy/actions/workflows/docs.yml/badge.svg\n :target: https://jjmccollum.github.io/teiphy\n \n.. |black badge| image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/psf/black\n \n.. |coverage badge| image:: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/jjmccollum/62997df516f95bbda6eaefa02b9570aa/raw/coverage-badge.json\n :target: https://jjmccollum.github.io/teiphy/coverage/\n\n.. |git3moji badge| image:: https://img.shields.io/badge/git3moji-%E2%9A%A1%EF%B8%8F%F0%9F%90%9B%F0%9F%93%BA%F0%9F%91%AE%F0%9F%94%A4-fffad8.svg\n :target: https://robinpokorny.github.io/git3moji/\n\n.. |iqtree badge| image:: https://github.com/jjmccollum/teiphy/actions/workflows/iqtree.yml/badge.svg\n :target: https://github.com/jjmccollum/teiphy/actions/workflows/iqtree.yml\n\n.. |raxml badge| image:: https://github.com/jjmccollum/teiphy/actions/workflows/raxml.yml/badge.svg\n :target: https://github.com/jjmccollum/teiphy/actions/workflows/raxml.yml\n\n.. |mrbayes badge| image:: https://github.com/jjmccollum/teiphy/actions/workflows/mrbayes.yml/badge.svg\n :target: https://github.com/jjmccollum/teiphy/actions/workflows/mrbayes.yml\n\n.. |beast badge| image:: https://github.com/jjmccollum/teiphy/actions/workflows/beast.yml/badge.svg\n :target: https://github.com/jjmccollum/teiphy/actions/workflows/beast.yml\n\n.. |stemma badge| image:: https://github.com/jjmccollum/teiphy/actions/workflows/stemma.yml/badge.svg\n :target: https://github.com/jjmccollum/teiphy/actions/workflows/stemma.yml\n\n.. |joss badge| image:: https://joss.theoj.org/papers/e0a813f4cdf56e9f6ae5d555ce6ed93b/status.svg\n :target: https://joss.theoj.org/papers/e0a813f4cdf56e9f6ae5d555ce6ed93b\n \n.. |doi badge| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.7455638.svg\n :target: https://doi.org/10.5281/zenodo.7455638\n\n.. end-badges\n\n.. start-about\n\nA Python package for converting TEI XML collations to NEXUS and other formats.\n\nTextual scholars have been using phylogenetics to analyze manuscript traditions since the early 1990s.\nMany standard phylogenetic software packages accept as input the `NEXUS file format <https://doi.org/10.1093/sysbio/46.4.590>`_.\nThe ``teiphy`` program takes a collation of texts encoded using the `Text Encoding Initiative (TEI) guidelines <https://tei-c.org/release/doc/tei-p5-doc/en/html/TC.html>`_\nand converts it to a NEXUS format so that it can be used for phylogenetic analysis.\nIt can also convert to other formats as well, including Hennig86 (for TNT), PHYLIP (for RAxML), FASTA, and the XML format used by BEAST 2.7.\n\n\n.. end-about\n\n\n.. start-quickstart\n\nInstallation\n============\n\nThe software can be installed using ``pip``:\n\n.. code-block:: bash\n\n pip install teiphy\n\nAlternatively, you can install the package by cloning this repository and installing it with poetry:\n\n.. code-block:: bash\n\n git clone https://github.com/jjmccollum/teiphy.git\n cd teiphy\n pip install poetry\n poetry install\n\nOnce the package is installed, you can run all unit tests via the command\n\n.. code-block:: bash\n\n poetry run pytest\n\nUsage\n============\n\nTo use the software, run the ``teiphy`` command line tool:\n\n.. code-block:: bash\n\n teiphy <input TEI XML> <output file>\n\n``teiphy`` can export to NEXUS, Hennig86 (TNT), PHYLIP (in the relaxed form used by RAxML), FASTA, BEAST 2.7 XML, CSV, TSV, Excel and STEMMA formats. \n``teiphy`` will try to infer the file format to export to from the extension of the output file. Accepted file extensions are:\n\".nex\", \".nexus\", \".nxs\", \".ph\", \".phy\", \".fa\", \".fasta\", \".xml\", \".tnt\", \".csv\", \".tsv\", \".xlsx\".\n\nTo explicitly say which format you wish to export to, use the ``--format`` option. For example:\n\n.. code-block:: bash\n\n teiphy <input TEI XML> <output file> --format nexus\n\nFor more information about the other options, see the help with:\n\n.. code-block:: bash\n\n teiphy --help\n\nOr see the documentation with explanations about `advanced usage <https://jjmccollum.github.io/teiphy/advanced.html>`_.\n\nThe software can also be used in Python directly. \nSee `API Reference <https://jjmccollum.github.io/teiphy/reference.html>`_ in the documentation for more information.\n\n.. end-quickstart\n\nCredits\n============\n\n.. start-credits\n\n``teiphy`` was designed by Joey McCollum (Australian Catholic University) and Robert Turnbull (University of Melbourne).\nWe received additional help from Stephen C. Carlson (Australian Catholic University).\n\nIf you use this software, please cite the paper: Joey McCollum and Robert Turnbull, \"``teiphy``: A Python Package for Converting TEI XML Collations to NEXUS and Other Formats,\" *JOSS* 7.80 (2022): 4879, DOI: 10.21105/joss.04879.\n\n.. code-block:: bibtex\n\n @article{MT2022, \n author = {Joey McCollum and Robert Turnbull}, \n title = {{teiphy: A Python Package for Converting TEI XML Collations to NEXUS and Other Formats}}, \n journal = {Journal of Open Source Software},\n year = {2022}, \n volume = {7}, \n number = {80}, \n pages = {4879},\n publisher = {The Open Journal}, \n doi = {10.21105/joss.04879}, \n url = {https://doi.org/10.21105/joss.04879}\n }\n\nFurther details on the capabilities of ``teiphy``, particularly in terms of the text-critically valuable features it can map from TEI XML collations to BEAST 2 inputs, are discussed in Joey McCollum and Robert Turnbull, \"Using Bayesian Phylogenetics to Infer Manuscript Transmission History,\" *DSH* 39.1 (2024): 258\u2013279, DOI: 10.1093/llc/fqad089.\n\n.. code-block:: bibtex\n\n @article{MT2024, \n author = {Joey McCollum and Robert Turnbull}, \n title = {{Using Bayesian Phylogenetics to Infer Manuscript Transmission History}}, \n journal = {Digital Scholarship in the Humanities},\n year = {2024}, \n volume = {39}, \n number = {1}, \n pages = {258--279},\n doi = {10.1093/llc/fqad089}, \n url = {https://doi.org/10.1093/llc/fqad089}\n }\n\n.. end-credits\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Converts TEI XML collations to NEXUS and other formats",
"version": "0.1.18",
"project_urls": {
"Documentation": "https://jjmccollum.github.io/teiphy/",
"Homepage": "https://github.com/jjmccollum/teiphy",
"Repository": "https://github.com/jjmccollum/teiphy"
},
"split_keywords": [
"python",
" phylogenetics",
" text encoding",
" tei",
" nexus"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d5ebbab0141870e4fa657ec36993c81f76357e7954533b6de96ec3ff73f8ed08",
"md5": "0463ba2256f4db978eb01f9ff06e8b4c",
"sha256": "bc5e12f3260c06542a23d6123bfb925cf315cb31b1f9f9e6d99027b26461ff90"
},
"downloads": -1,
"filename": "teiphy-0.1.18-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0463ba2256f4db978eb01f9ff06e8b4c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 42199,
"upload_time": "2025-01-12T16:57:51",
"upload_time_iso_8601": "2025-01-12T16:57:51.180342Z",
"url": "https://files.pythonhosted.org/packages/d5/eb/bab0141870e4fa657ec36993c81f76357e7954533b6de96ec3ff73f8ed08/teiphy-0.1.18-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e2047351d457ea6cb2b400203e9caeeac2336befe8e842e4d492626f40a390de",
"md5": "8fd3036e1cc1baacf567b2268945bce9",
"sha256": "3b26f834621558909780d98b3f5229855f538001d90c680f2c6d0bfabb1f9770"
},
"downloads": -1,
"filename": "teiphy-0.1.18.tar.gz",
"has_sig": false,
"md5_digest": "8fd3036e1cc1baacf567b2268945bce9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 40753,
"upload_time": "2025-01-12T16:57:53",
"upload_time_iso_8601": "2025-01-12T16:57:53.628019Z",
"url": "https://files.pythonhosted.org/packages/e2/04/7351d457ea6cb2b400203e9caeeac2336befe8e842e4d492626f40a390de/teiphy-0.1.18.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-12 16:57:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jjmccollum",
"github_project": "teiphy",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"lcname": "teiphy"
}