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 equally 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. (submitted; * equal contribution).

License

Released under the MIT License.

Metadata

Release files for bioalign 0.1.1

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.1
File Size Uploaded Provenance Actions
bioalign-0.1.1.tar.gz 19.9 kB Without provenance Details for bioalign-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 38.8 kB

Release files / bioalign-0.1.1.tar.gz

Download URL bioalign-0.1.1.tar.gz
Size 19.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d7cde6ed874f002ae5c025069ede6b6144b3675437f20419297d00319d2e47ee
BLAKE2b-256 checksum
How to use checksums
692a80c0ed4b8da41b755820bf4efc2dfb19894f4be78ff26d491c96c9a13121
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.1-py3-none-any.whl

Download URL bioalign-0.1.1-py3-none-any.whl
Size 18.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
783fa7804beaf3f6e06f9968181c8a9f7cd8c2875355d66d2b7cc595e704b4cf
BLAKE2b-256 checksum
How to use checksums
0d22e9f40241062db770721e50cc965bcbf05d5c0544f9cb9438beab04081bc5
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.1

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