Quickstart

Installation

The software can be installed using pip:

pip install teiphy

Alternatively, you can install the package by cloning this repository and installing it with poetry:

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

poetry run pytest

Usage

To use the software, run the teiphy command line tool:

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:

teiphy <input TEI XML> <output file> --format nexus

For more information about the other options, see the help with:

teiphy --help

Or see the documentation with explanations about advanced usage.

The software can also be used in Python directly. See API Reference in the documentation for more information.