A cldfbench plugin to curate language phylogenies
Project description
phlorest
A cldfbench plugin to curate language phylogenies.
Install
pip install phlorest
Usage
Bootstrapping a phlorest
-curated dataset
phlorest
provides a cldfbench
dataset template to create the skeleton of files and directories for a
phlorest
-curated dataset, to be run with cldfbench new.
Running
cldfbench new --template phlorest
will create a dataset skeleton looking as follows
$ tree testtree/
testtree/
├── cldf
│ └── README.md
├── cldfbench_testtree.py
├── etc
│ ├── characters.csv
│ └── taxa.csv
├── metadata.json
├── raw
│ └── README.md
├── setup.cfg
├── setup.py
└── test.py
Implementing CLDF creation
Implementing CLDF creation means - as for any other cldfbench
-curated dataset - filling in the
cmd_makecldf
method of the Dataset
subclass in cldfbench_<id>.py
.
The CLDF writer which can be accessed as args.writer
within cmd_makecldf
is an instance of
phlorest.CLDFWriter
, which has convenience methods to add summary- or posterior trees to the CLDF
dataset. At least a summary is needed to make a dataset valid. Adding one looks as follows
args.writer.add_summary(
self.raw_dir.read_tree(...),
self.metadata,
args.log)
Running CLDF creation
With cmd_makecldf
implemented, CLDF creation can be triggered running
cldfbench makecldf cldfbench_<id>.py
The resulting CLDF dataset can be validated running
pytest
Dependencies
The run_treeannotator
method of Dataset
requires the treeannotator
command from BEAST to be
installed. For details on how to install treeannotator
(and BEAST
), see https://beast.community/index.html
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for phlorest-1.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d03fad00ac863c69a7bc88a88e99b418a2de1f1ae05203605b47d01cc32acf42 |
|
MD5 | d8def7b8b0e8b0945653f8ef6de7da11 |
|
BLAKE2b-256 | fe08065943bdc364468376ad2da0bf7736aefc3e79291f6dde47aa5958e8c2a1 |