Skip to main content

Generalized suffix tree generator and renderer

Project description

suffix-tree-tool

Command-line tool and Python library for building, annotating, and rendering generalized suffix trees. The project accepts up to five sequences, colors edges per sequence, and produces DOT/PDF output that is ready to embed in documents.

Installation

From PyPI:

pip install suffix-tree-tool

From a cloned repository:

pip install .

Or directly from Git (once the repository is public):

pip install git+https://github.com/EmericLaberge/suffix-tree-tool.git

Usage

Single-sequence example:

generate-suffix-tree gatgaatgg

Suffix tree rendering for a single sequence

Multi-sequence example with internal annotations:

generate-suffix-tree gatgaatgg ggtaagtag --annotate-internal

Suffix tree rendering for multiple sequences

Key options:

  • --include-terminal: keep the suffix that contains only the terminator.
  • --unique-terminal: assign a distinct terminator to each sequence.
  • --annotate-internal: display depth and sequence indices on internal nodes.

The renderer writes two files in the current directory:

  • suffix_tree.dot
  • suffix_tree.pdf (when Graphviz is available)

Rendered screenshots are available under examples/.

Python API

from suffix_tree_tool import process_sequences, build_suffix_tree, render_suffix_tree

License

Distributed under the MIT License (see LICENSE for details). For questions or contributions, email emeric.laberge@umontreal.ca.

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

suffix_tree_tool-0.1.2.tar.gz (103.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

suffix_tree_tool-0.1.2-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file suffix_tree_tool-0.1.2.tar.gz.

File metadata

  • Download URL: suffix_tree_tool-0.1.2.tar.gz
  • Upload date:
  • Size: 103.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for suffix_tree_tool-0.1.2.tar.gz
Algorithm Hash digest
SHA256 91d047d415c71cdd4c11697841328a76e184c7d22f63091326e7996d3d91e7a5
MD5 532adfd797f22751a5f3d3e72cfbf63b
BLAKE2b-256 b2df6dccf37db02dce40bda169fbc31139fe443f6da1ace336c984b90e4db2ef

See more details on using hashes here.

File details

Details for the file suffix_tree_tool-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for suffix_tree_tool-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 38d2f6e69f54e8d4931b6521c055c597771d0cd560d90b4cbcbbe1bdf6638295
MD5 33e298a518bd3cabbfbdf257f96377c7
BLAKE2b-256 ea578ae871b23d032e4e6eac812284943de990f9262ccdf78eebdb132cac6986

See more details on using hashes here.

Supported by

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