Skip to content

Merge v2 into main - #968

Merged
padix-key merged 45 commits into
mainfrom
v2
Oct 16, 2026
Merged

padix-key merged 45 commits into
mainfrom
v2

Conversation

@padix-key

Copy link
Copy Markdown
Member

With Biotite 1.8.0 published, we can include the backwards incompatible changes from v2 in main and release Biotite 2.0.0.

ehsanestaji and others added 30 commits July 16, 2026 12:02
Trees are now represented as rooted `networkx.DiGraph` objects with
integer leaf nodes and a `distance` edge attribute, replacing the
Cython `Tree` and `TreeNode` classes.
UPGMA and neighbor joining are implemented in Rust, with UPGMA tracking
the row minima to avoid rescanning the entire distance matrix.
The Newick parser is iterative, hence deeply nested trees no longer hit
the recursion limit.

Closes #903, closes #397
Remove `Tree` and `TreeNode` class
The `IntEnum` already existed, but the docstrings and documentation still
referred to the removed string offsets.

Closes #923
`align_ungapped()`, `align_optimal()`, `align_banded()`, `align_local_gapped()`,
`align_multiple()` and `score()` now default to a match score of 1, a mismatch
score of -1 and a linear gap penalty of -1.
To allow a default for `matrix`, the required `band` and `seed`/`threshold`
parameters of `align_banded()` and `align_local_gapped()` now precede it.

Closes #930
`annotate_sse()` and `pdbx.get_sse()` return `SecondaryStructure` values,
`DsspApp` returns `DsspElement` values.
Both enums provide conversion from/to the one-letter symbols.

Closes #924
The former `CGO` enum listing the directives is now `CGO.Type`.

Closes #909
`load_color_scheme()` returns a `ColorScheme` instead of an untyped
dictionary and the plotting functions accept it as `color_scheme`.

Closes #908
`GFFFile` entries are now represented by `GFFRecord` objects instead of
9-tuples.

Closes #906
`get_locus()` returns a `GenBankLocus` and `set_locus()` accepts one instead
of the 6-tuple of locus properties.

Closes #925
`GenBankFile` fields are now represented by `GenBankRecord` objects instead
of (name, content, subfields) tuples.

Closes #907
- The transformation now consists of a single rotation and translation
- Transformations can be combined via `*` and inverted via unary `-`
- `align_vectors()` and `orient_principal_components()` return the
  transformation instead of transformed coordinates

Closes #844
padix-key and others added 15 commits October 14, 2026 18:01
- `use_author_fields` defaults to `False` in `get_structure()`,
  `get_assembly()` and `get_unit_cell()`
- `get_sequence()` keys the sequences by `label_asym_id` (via `struct_asym`)
- `get_sse()` uses `label_asym_id` as chain ID
- Tests and documentation that rely on author fields (PDB, PDBQT, PyMOL,
  foldseek references and hard-coded author IDs) request them explicitly

Closes #773
- Remove the `biotite.application` package in favor of `biotite.application_v2`
- Remove `align_local_ungapped()`, `set_font_size_in_coord()` and
  `get_symmetry_mates()`
- Remove the deprecated parameters `as_bytes` (`LetterAlphabet.decode*()`),
  `distance_range` (`connect_via_distances()`), `float_tolerance`
  (`pdbx.compress()`), `include_bonds` (`pdbx.set_structure()`) and
  `as_mask` (`CellList.get_atoms*()`)
- Remove the `label_entity_id` annotation fallback in `pdbx.set_structure()`
`biotite.application_v2` remains as deprecated shim that forwards to
`biotite.application`.
Implement backwards incompatible changes
Support the standard ambiguous `J` amino acid symbol
Since #949 `plot_sequence_logo()` does not accept a plain list of colors
anymore.
# Conflicts:
#	src/biotite/sequence/io/fasta/file.py
#	src/biotite/structure/io/pdbx/convert.py
Hotfix: Use `ColorScheme` in `rbs_identification.py` example
# Conflicts:
#	doc/examples/scripts/sequence/homology/genome_search.py
#	doc/examples/scripts/sequence/sequencing/genome_assembly.py
@padix-key
padix-key merged commit 4927395 into main Oct 16, 2026
3 checks passed
@padix-key
padix-key deleted the v2 branch October 16, 2026 10:58
@codspeed

codspeed Bot commented Oct 16, 2026

Copy link
Copy Markdown

Merging this PR will regress 1 benchmark

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 12 improved benchmarks
❌ 1 regressed benchmark
✅ 96 untouched benchmarks
⏩ 14 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ benchmark_structural_alphabet_methods[to_protein_blocks] 6.7 ms 10.1 ms -34.12%
⚡ benchmark_set_structure[cif-False] 92.7 ms 31.6 ms ×2.9
⚡ benchmark_set_structure[cif-True] 103.3 ms 41.6 ms ×2.5
⚡ benchmark_connect[connect_via_distances] 3.2 ms 1.7 ms +86.86%
⚡ benchmark_superimpose_multi_model[superimpose] 9.1 ms 5.6 ms +60.86%
⚡ benchmark_superimpose[superimpose] 1.9 ms 1.3 ms +53.37%
⚡ benchmark_serialize_pdbx[cif] 177.4 ms 120.5 ms +47.2%
⚡ benchmark_infer_bond_types 1,199.3 µs 828.9 µs +44.68%
⚡ benchmark_clustering[neighbor_joining] 554.7 µs 396.5 µs +39.89%
⚡ benchmark_set_structure 9.4 ms 7 ms +35.46%
⚡ benchmark_set_structure_with_bonds 9.7 ms 7.2 ms +34.88%
⚡ benchmark_superimpose_multi_model[superimpose_homologs] 36 ms 32.1 ms +12.17%
⚡ benchmark_superimpose_multi_model[superimpose_without_outliers] 86.7 ms 78.2 ms +10.89%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing v2 (0015cef) with main (8fa052e)2

Open in CodSpeed

Footnotes

  1. 14 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. No successful run was found on main (0015cef) during the generation of this report, so 8fa052e was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants