Skip to main content

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 vX.Y --with-zenodo --with-cldfreadme cldfbench_<id>.py
pytest
cldfbench readme cldfbench_<id>.py

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

phlorest-1.2.0.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phlorest-1.2.0-py2.py3-none-any.whl (24.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file phlorest-1.2.0.tar.gz.

File metadata

  • Download URL: phlorest-1.2.0.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for phlorest-1.2.0.tar.gz
Algorithm Hash digest
SHA256 83c30f81f90cb137e53879abf66200a09fa828f32762881221f30cf55454576b
MD5 1e4bc23e5f71d46202dc70598994e012
BLAKE2b-256 474c00fd1a08a6b39c1bf9d899a9c84e83741632c51c265686e6b13a160f6828

See more details on using hashes here.

File details

Details for the file phlorest-1.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: phlorest-1.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 24.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for phlorest-1.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 adf9ff263009937ccddc96dbd752e1f0bef5ca8ae30bf4423f78e3ebcb6a49bc
MD5 5b4393b0a289b339358de9f1dcff941d
BLAKE2b-256 5b63f978bb035c22a56f498995fbad6d994622f8d64b98e2b5b5b327a06fc675

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page