Skip to main content

goeBURST

MLST / cgMLST Minimum Spanning Tree visualization with goeBURST algorithm

Implements the goeBURST algorithm (Francisco et al., 2009) — a refinement of eBURST (Feil et al., 2004) — to construct a globally-optimized Minimum Spanning Tree from multi-locus sequence typing data. Renders publication-quality figures with pie-chart nodes.

Example MST

Installation

pip install goeburst

Or from source:

git clone <repo-url> && cd goeburst
pip install .

Dependencies (installed automatically): numpy, matplotlib, networkx.

Quick Start

Command line

goeburst -p profileData.tab -i isolateData.tab -g serotype -o mst.png
Option Description
-p, --profile Path to allele-profile table (TSV/CSV)
-i, --isolates Path to isolate metadata (TSV/CSV)
-g, --group Metadata column for pie-chart colouring
-o, --output Output image path
--figsize W H Figure size in inches (default: 18 14)
--dpi Output resolution (default: 150)
--format Force format: png, pdf, svg, jpg

Python API

from goeburst import (
    parse_profile_data, parse_isolate_data, build_st_table,
    goeBURST_mst, plot_goeBURST,
)

# 1. Load data
profiles, loci = parse_profile_data("profileData.tab")
isolates, meta_cols = parse_isolate_data("isolateData.tab")

# 2. Build ST-level summary
st_profiles, st_counts, st_meta, all_cats, skipped = build_st_table(
    profiles, isolates, "serotype"
)

# 3. Run goeBURST algorithm
edges = goeBURST_mst(st_profiles)

# 4. Render plot
plot_goeBURST(
    st_profiles, st_counts, st_meta, all_cats, edges,
    group_col="serotype", output_path="mst.png",
)

Input Format

Profile data (-p)

Tab- or comma-separated file where each row is an isolate and each column is a locus:

FILE    aroE    gdh     gki     recP    spi     xpt     ddl
isolate1    1   1   2   2   6   1   6
isolate2    1   1   4   1   6   1   6
  • First column: isolate identifier (must match FILE in isolate data)
  • Remaining columns: integer allele numbers (0 = missing / unknown)

Isolate data (-i)

FILE    ST  serotype    country
isolate1    1   O157    USA
isolate2    2   O104    DE
  • Must contain: FILE (or ID) and ST columns
  • Additional columns are available for pie-chart grouping

Algorithm

The goeBURST algorithm produces a complete Minimum Spanning Tree using tiebreak rules that prioritise biologically meaningful links:

  1. Lower allelic distance — SLV (1 locus) > DLV (2) > TLV (3) > …
  2. More SLV connections — favour STs that are hubs of single-locus variants
  3. More DLV / TLV connections — secondary / tertiary tiebreaks
  4. Lower ST identifier — deterministic final tiebreak

The MST is built via Kruskal's algorithm on the sorted edge list.

Edge Styles

Distance Style Meaning
1 Solid Single-Locus Variant (SLV)
2 Dashed Double-Locus Variant (DLV)
3 Dotted Triple-Locus Variant (TLV)
>= 4 Dash-dot Higher-distance link

References

  • Francisco AP, Vaz C, Monteiro PT, et al. (2009) Global optimal eBURST analysis of multilocus typing data using a graphic matroid approach. BMC Bioinformatics, 10:152.
  • Feil EJ, Li BC, Aanensen DM, et al. (2004) eBURST: inferring patterns of evolutionary descent among clusters of related bacterial genotypes from multilocus sequence typing data. Journal of Bacteriology, 186:1518–1530.

License

MIT

Metadata

Release files for goeburst 1.0.0

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

Source distribution (sdist)

Source distribution for goeburst 1.0.0
File Size Uploaded
goeburst-1.0.0.tar.gz 15.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for goeburst 1.0.0
File Interpreter ABI Platform
goeburst-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 30.8 kB

Release files / goeburst-1.0.0.tar.gz

Download URL goeburst-1.0.0.tar.gz
Size 15.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1002a565f25fee906c3938451e028c0655ae68c0d7163430d3999ee0658c5d2d
BLAKE2b-256 checksum
How to use checksums
0d4421bdcbb573d2e74cc5e1a651d7a1c225f750e67b34fe4638e12c7860f225
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Release files / goeburst-1.0.0-py3-none-any.whl

Download URL goeburst-1.0.0-py3-none-any.whl
Size 15.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5a73e701527159dff80de7fb7611ebd355ba2c2e38d621c221e3112528613ecd
BLAKE2b-256 checksum
How to use checksums
dd9809969e05a4a1f9b938b5a6e14a8328e8a4fea539251dcb4937e72f71aff9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Release history Release notifications | RSS feed

This release

1.0.0 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