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
Release workflow
cldfbench makecldf --glottolog-version v4.8 --with-cldfreadme cldfbench_<id>.py
pytest
cldfbench zenodo --communities phlorest cldfbench_<id>.py
cldfbench readme cldfbench_<id>.py
phlorest check --with-R cldfbench_<id>.py
git commit -a -m"release vX.Y"
git push origin
phlorest release cldfbench_<id>.py vX.Y
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
File details
Details for the file phlorest-1.6.1.tar.gz
.
File metadata
- Download URL: phlorest-1.6.1.tar.gz
- Upload date:
- Size: 27.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f65c62ffb8620885e0fe40231feda470209fc661fa0d9cbe5a5b23ae16a2564 |
|
MD5 | a15b8b1642bf2fc3989730db9ed7ccda |
|
BLAKE2b-256 | 369c00f599906accc282099a23060173e5e8e4a877a8d434d4d25c943b1cbe25 |
File details
Details for the file phlorest-1.6.1-py2.py3-none-any.whl
.
File metadata
- Download URL: phlorest-1.6.1-py2.py3-none-any.whl
- Upload date:
- Size: 28.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e1e191b7c48c1bfa6231ff0ac0be822025ffb264a18dac63b654f2a8dccf670 |
|
MD5 | d6ef1f71177909be024374c4ea90bfab |
|
BLAKE2b-256 | 3e78aba0987e304e095ada6044ac2c808d1ae5fbff197b4d2f7a733584bf79a5 |