Skip to main content

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


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 details)

Uploaded Source

Built Distribution

nexusmaker-2.0.5-py2.py3-none-any.whl (25.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file nexusmaker-2.0.5.tar.gz.

File metadata

  • Download URL: nexusmaker-2.0.5.tar.gz
  • Upload date:
  • Size: 20.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for nexusmaker-2.0.5.tar.gz
Algorithm Hash digest
SHA256 d252ec92656b295560903786f2ed25707b4c610d55a96b68c6ac0bbd10b2dc0b
MD5 dc47fbabab1deab56d2cdb5a9c3a2c2e
BLAKE2b-256 c2418e8aa3554f32016f925c2813b247bc0b8fdaa0d347619e46488cd13d536a

See more details on using hashes here.

File details

Details for the file nexusmaker-2.0.5-py2.py3-none-any.whl.

File metadata

  • Download URL: nexusmaker-2.0.5-py2.py3-none-any.whl
  • Upload date:
  • Size: 25.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for nexusmaker-2.0.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 caa2eb8884f3f80c2036f059d0fb85b022c3cd06e8df884ca833ffac875d948a
MD5 3b8abbb1686d863ba383e4fca28398d0
BLAKE2b-256 f9b445db6fcf22755cb6b49fc388435b60c85291d402260bb5416da29d208b99

See more details on using hashes here.

Supported by

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