nexusmaker - Nexus file maker for language phylogenies
Project description
NexusMaker
Simply Generate Nexus Files
from nexusmaker import NexusMaker, Record
data = [
Record(Language="A", Word="eye", Item="", Cognate="1"),
Record(Language="A", Word="leg", Item="", Cognate="1"),
Record(Language="A", Word="arm", Item="", Cognate="1"),
Record(Language="B", Word="eye", Item="", Cognate="1"),
Record(Language="B", Word="leg", Item="", Cognate="2"),
Record(Language="B", Word="arm", Item="", Cognate="2"),
Record(Language="C", Word="eye", Item="", Cognate="1"),
# No ReCord for C 'leg'
Record(Language="C", Word="arm", Item="", Cognate="3"),
Record(Language="D", Word="eye", Item="", Cognate="1", loan=True),
Record(Language="D", Word="leg", Item="", Cognate="1"),
Record(Language="D", Word="leg", Item="", Cognate="2"),
Record(Language="D", Word="arm", Item="", Cognate="2,3"),
]
maker = NexusMaker(data)
maker = NexusMakerAscertained(data) # adds Ascertainment bias character
maker = NexusMakerAscertainedWords(data) # adds Ascertainment character per word
nex = maker.make()
maker.write(nex, filename="output.nex")
Version History:
- 2.0.4: add
unique_ids
parameter - 2.0.3: handle CLDF datasets
- 2.0.2: add tool to filter combining cognates
- 2.0.1: minor bugfixes.
- 2.0: major refactor of testing and other components.
- 1.5: do more validation of cognate sets to detect possibly broken combined cognate sets.
- 1.4: normalise order of cognates (i.e. so 1,54 == 54,1).
- 1.3: handle cognates of form '1a'.
- 1.2: initial release.
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
nexusmaker-2.0.5.tar.gz
(20.0 kB
view hashes)
Built Distribution
Close
Hashes for nexusmaker-2.0.5-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | caa2eb8884f3f80c2036f059d0fb85b022c3cd06e8df884ca833ffac875d948a |
|
MD5 | 3b8abbb1686d863ba383e4fca28398d0 |
|
BLAKE2b-256 | f9b445db6fcf22755cb6b49fc388435b60c85291d402260bb5416da29d208b99 |