Skip to main content

Parse and write SPART files

Project description

SpartParser

PyPI - Version PyPI - Python Version PyPI - License GitHub - Tests GitHub - Windows

Parse, edit and write data in the SPART and SPART-XML file formats.

Includes a GUI for converting between the two formats.

Installation

PyInstaller is available on PyPI. You can install it through pip:

pip install itaxotools-spart-parser

Usage

Most of the functionality is included in the Spart class. Use the class methods to open, edit and write data in the Spart file format.

from itaxotools.spart_parser import Spart
spart = Spart.fromXML("examples/spart.xml")

spartitions = spart.getSpartitions()
print(spartitions)
subsets = spart.getSpartitionSubsets(spartitions[0])
print(subsets)
individuals = spart.getSubsetIndividuals(spartitions[0], subsets[0])
print(individuals)

spart.addIndividual("new_specimen")
spart.addSubsetIndividual(spartitions[0], subsets[0], "new_specimen")
spart.addSubsetIndividual(spartitions[1], subsets[1], "new_specimen")
spart.toMatricial("converted_copy.spart")

For more details, refer to the Spart class definition, as well as the scripts and examples folders.

Demo GUI

A graphical interface is included for converting between SPART and SPART-XML.

Install with the optional GUI dependencies:

pip install itaxotools-spart-parser[gui]
SpartParserGui

Or download and run the Windows executable from the latest 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

itaxotools-spart-parser-0.1.3.tar.gz (50.4 kB view details)

Uploaded Source

Built Distribution

itaxotools_spart_parser-0.1.3-py3-none-any.whl (35.2 kB view details)

Uploaded Python 3

File details

Details for the file itaxotools-spart-parser-0.1.3.tar.gz.

File metadata

File hashes

Hashes for itaxotools-spart-parser-0.1.3.tar.gz
Algorithm Hash digest
SHA256 500c6578aed7e37903bbf2ef2998ec844f68758613ca4092b3bfb6a71888e99c
MD5 387e099c7551af7f7856595ee14909bf
BLAKE2b-256 36118371c28229245124db0c08c776f2627b3f37afe4776fd92a794727371b2a

See more details on using hashes here.

File details

Details for the file itaxotools_spart_parser-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for itaxotools_spart_parser-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 30cbc6552d79511e2727dbab280e68ad52a9792f65bdcc87a61e3e5d65660924
MD5 2ad7f354509049e99450945ee256fc8d
BLAKE2b-256 3488824c4fe9a63e6c92b09141a48a6a42c17da3036effd412cb2fb1ada35eed

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