Skip to main content

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.

Release files for itaxotools-spart-parser 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for itaxotools-spart-parser 0.1.3
File Size Uploaded
itaxotools-spart-parser-0.1.3.tar.gz 50.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for itaxotools-spart-parser 0.1.3
File Interpreter ABI Platform
itaxotools_spart_parser-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 85.6 kB

Release files / itaxotools-spart-parser-0.1.3.tar.gz

Download URL itaxotools-spart-parser-0.1.3.tar.gz
Size 50.4 kB
Tags Source
SHA-256 checksum
How to use checksums
500c6578aed7e37903bbf2ef2998ec844f68758613ca4092b3bfb6a71888e99c
BLAKE2b-256 checksum
How to use checksums
36118371c28229245124db0c08c776f2627b3f37afe4776fd92a794727371b2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / itaxotools_spart_parser-0.1.3-py3-none-any.whl

Download URL itaxotools_spart_parser-0.1.3-py3-none-any.whl
Size 35.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
30cbc6552d79511e2727dbab280e68ad52a9792f65bdcc87a61e3e5d65660924
BLAKE2b-256 checksum
How to use checksums
3488824c4fe9a63e6c92b09141a48a6a42c17da3036effd412cb2fb1ada35eed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page