--- id: bx-python version: "0.14.0" license: MIT license_treatment: permissive maintenance: active --- # bx-python — Tools for manipulating biological data, particularly multiple sequence alignments License: permissive · Maintenance: active · Downloads: 145.7K/mo ## What it is and what it does bx-python is a bioinformatics library for working with genome-scale sequence alignments and genomic intervals. It provides specialized data structures for reading multiple local alignments in MAF, AXT, and LAV formats, plus efficient in-memory and on-disk indexing for random access to large alignment files. The library also includes interval-based data structures such as binned bitsets (compact chromosome-sized bit arrays) and an intersecter for fast overlap queries that preserve both query and target intervals with their annotations. The package is designed for rapid prototyping and implementation of genome-scale analyses. It sits between raw sequence data and higher-level analysis pipelines, offering the low-level data manipulation and indexing primitives that genomics workflows need. Dependencies on numpy and pyparsing keep the core lightweight, though building from source requires the liblzo2 compression library. Use it for: - Parse and iterate over large MAF alignment files to extract pairwise or multiple sequence alignments for downstream analysis. - Index genome alignments for random access without loading entire files into memory, especially useful over network filesystems. - Perform fast interval overlap queries on genomic coordinates while preserving both query and target annotations. - Build compact representations of genomic features using binned bitsets for memory-efficient chromosome-scale operations. - Implement custom genome-scale comparative analysis pipelines that require flexible interval and alignment data structures. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. bx-python provides Python classes and utilities for reading, indexing, and analyzing genome-scale sequence alignments and interval data, with specialized support for MAF, AXT, and LAV alignment formats. Yes, if you work with genome-scale sequence alignments or need efficient interval indexing on genomic data. The package is actively maintained, supports current Python versions, carries no known vulnerabilities, and has a permissive license. Install friction is moderate due to liblzo2 dependency, but pre-built wheels are available for common platforms. Not relevant for non-bioinformatics use cases. ## Install pip install bx-python uv add bx-python poetry add bx-python ## Installing bx-python Before you install: Medium install friction due to compiled dependencies (requires liblzo2-dev system library). Maintenance is active with recent commits and broad wheel coverage across Python 3.9–3.14 and multiple platforms. License in practice: MIT license is permissive; you may use, modify, and distribute this package freely with minimal restrictions. Quickstart: pip install bx-python import bx.align.maf reader = bx.align.maf.Reader(open('alignments.maf')) for alignment in reader: print(alignment) Requires liblzo2-dev system library (e.g., apt-get install liblzo2-dev on Debian/Ubuntu) to build from source. Verify before relying: - Exact performance characteristics for large-scale alignment files or network filesystem access patterns. - Whether bitset and intersecter implementations are thread-safe or require external synchronization. - Current state of documentation and examples beyond the repository README. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 145.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags genome sequence alignment tools, multiple sequence alignment parser, bioinformatics interval indexing, MAF AXT LAV format reader, genomic data structure library, biological sequence analysis, genome scale alignment processing, bioinformatics, genomics, sequence-alignment [View on SkillFed](https://skillfed.io/packages/bx-python) · [View on PyPI](https://pypi.org/project/bx-python/)