Skip to main content

bioalign

PyPI version License: MIT

bioalign is the standalone Python library and command-line interface for the BioAlign workbench developed at Karagöl Research. It combines local affine-gap progressive alignment (BLOSUM62 and nucleotide scoring), optional EMBL-EBI Job Dispatcher remote search and alignment (ncbiblast, clustalo, muscle, mafft, tcoffee, kalign), per-column Shannon entropy and conservation profiling, Poisson-corrected distance matrices, Neighbor-Joining and UPGMA tree reconstruction, and multi-format alignment conversion (FASTA, Clustal, PHYLIP, Stockholm, MSF, NEXUS, Newick, SVG, CSV, and JSON).

Installation

pip install bioalign

Command-Line Usage

1. Align Unaligned Sequences (Offline Progressive Needleman-Wunsch or Remote EMBL-EBI)

bioalign align unaligned.fasta -o aligned.fasta
bioalign align unaligned.fasta --engine clustalo --email researcher@institute.edu -o aligned.fasta

2. Compute Conservation, Shannon Entropy, Consensus, and Pairwise Identity

bioalign stats aligned.fasta -o alignment_summary.json --csv per_column_metrics.csv

3. Reconstruct Neighbor-Joining or UPGMA Trees (Newick + Publication SVG)

bioalign tree aligned.fasta --method nj -o tree.nwk --svg tree.svg
bioalign tree aligned.fasta --method upgma --cladogram --svg cladogram.svg

4. Convert Alignments Across Standard Formats

bioalign convert aligned.fasta --to clustal -o aligned.aln
bioalign convert aligned.fasta --to stockholm -o aligned.sto
bioalign convert aligned.fasta --to phylip -o aligned.phy
bioalign convert aligned.fasta --to nexus -o aligned.nex
bioalign convert aligned.fasta --to msf -o aligned.msf

5. Run Homolog Search + Alignment Pipeline via EMBL-EBI Job Dispatcher

bioalign search query.fasta --email researcher@institute.edu --align clustalo -o results_dir

Python API

from bioalign import (
    align_sequences,
    build_tree,
    compute_alignment_stats,
    format_alignment,
    parse_fasta,
    to_newick,
)

records = parse_fasta("unaligned.fasta")
aligned = align_sequences(records)
stats = compute_alignment_stats(aligned)
tree = build_tree(
    [r.id for r in aligned],
    stats["identity_matrix"],
    method="nj",
)
print("Consensus:", stats["consensus"])
print("Newick:", to_newick(tree))
print(format_alignment(aligned, fmt="clustal"))

Authors & Credits

Developed by Taner Karagöl, M.D. (tanerkaragol.com, ORCID: 0009-0005-1011-7661, karagolt@mit.edu) and Alper Karagöl, M.D. (alperkaragol.com, ORCID: 0009-0001-7864-0732, akaragol@mit.edu) as part of Karagöl Research.

Citation

  • Karagöl, A., Karagöl, T. (2026). BioAlign: An Integrated Web Workbench and REST API for Protein Homology Search, Multiple Sequence Alignment, Conservation Analysis, and Phylogenetic Visualization.
  • Karagöl, A., Karagöl, T. (2024). An Evolutionary Statistics Toolkit for Simplified Sequence Analysis on Web with Client-Side Processing. bioRxiv. https://doi.org/10.1101/2024.08.01.606148

License

Released under the MIT License.

Metadata

Release files for bioalign 0.1.2

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

Source distribution (sdist)

Source distribution for bioalign 0.1.2
File Size Uploaded Provenance Actions
bioalign-0.1.2.tar.gz 20.0 kB Without provenance Details for bioalign-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 39.1 kB

Release files / bioalign-0.1.2.tar.gz

Download URL bioalign-0.1.2.tar.gz
Size 20.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0942eab8232e9ad3be1c70ae87cba1ef213981043b9530a02f1b2c422bc12ad7
BLAKE2b-256 checksum
How to use checksums
3e2692772744900e4c3ab162cce2e80e17d665664f941a9d1c39e47c3ba483a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / bioalign-0.1.2-py3-none-any.whl

Download URL bioalign-0.1.2-py3-none-any.whl
Size 19.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7f7c37ec3cae717fe0de36611decace3dee32e911f0b19d81473a28c20f2a370
BLAKE2b-256 checksum
How to use checksums
f3326bc7111a162c7c80790596aaba1ed8842da274647e2e3a9301b7027d39ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for bioalign 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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