Repository navigation
What's Changed
Breaking changes
- Dropped support for Python 3.10, which reached end of life on 2026-10-01. Python >= 3.11 is now required.
- Temporarily stopped building PyPy 3.12 wheels, because NumPy 2.5.0 dropped support for PyPy 3.12. They will come back once numpy/numpy#32332 is merged.
Performance
Alignment.remove_all_gap_columns()now runs in linear time and compacts components shared between alignments only once. For 80,000 columns of which 90% are all-gap, it takes about 0.02 s instead of 3 s, and its peak extra memory use with 100 components drops from 61 MiB to 1.1 MiB. By @DylanCosto in #124
Bug fixes
- Fixed
remove_all_gap_columns()misaligning sequences after an empty component, which could leave all-gap columns in the following components. - Fixed
bx.seq.SeqFilehandling of therevcompparameter: with"+5'"or"-3'",get()silently returned the reverse complement of the wrong interval. - Fixed
bx.align.core.get_reader()andget_indexed()passingspecies_to_lengthsto the wrong parameter. This madeget_reader()fail with aTypeErrorfor MAF and AXT, andget_indexed()ignore it. - Passed
memoto thedeepcopy()calls inAlignment.__deepcopy__(), so objects shared between alignments (e.g. thespecies_to_lengthsdict) are no longer duplicated inside a single deep copy. read_lengths_file()now closes the file when a line is malformed.lav.Readernow names the right file when the second sequence file can't be opened.
Other changes
- Added type annotations to
bx.align.coreand to the functions it relies on inbx.align.axt,bx.align.lav,bx.align.mafandbx.misc.readlengths. This brings some small behaviour changes for invalid input:Alignment.slice_by_component()raisesValueErrorwhen no component matches the givensrc, instead ofAttributeError.Alignment.column_iter()andComponent.coord_to_col()raiseValueErrorfor a non-empty component without text, instead ofTypeError.maf.Writer.write()asserts that the required component fields are set, instead of failing withTypeError.SeqFile.get()now raisesAssertionErrorfor falsyrevcompvalues other thanFalse(e.g.0,None,"").
New Contributors
- @DylanCosto made their first contribution in #124
Full Changelog: v0.15.1...v0.16.0