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.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.2.tar.gz
(19.1 kB
view hashes)
Built Distribution
Close
Hashes for nexusmaker-2.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 081823fbd93049d01e308f4be27edd9cf3afb065f224c9b6c25ce706469fb32e |
|
MD5 | 68321d9650b2e561bb7897e805055997 |
|
BLAKE2b-256 | 49dbaa4f41c33a111b83583d0ce4cc6485f3846f04d75e465f38f294dc306491 |