16210 Commits

Author SHA1 Message Date
5216add545 Replaced deprecated ruff linter ID 2025-10-15 14:49:15 +01:00
4c8696aa82 Remove unused or read only globals (flake8 F824) 2025-10-15 14:49:15 +01:00
e451db211b update NEWS file 2025-10-10 13:20:13 +01:00
f7d7ded086 make spheres nicer on first start 2025-10-10 13:20:13 +01:00
682eb13373 Add OpenSCAD code to enable multimaterial printer output 2025-10-10 13:20:13 +01:00
dd1cabc980 Fix markup, update & sort names 2025-10-10 12:30:23 +01:00
37f6c5f81d Test on Python 3.10 ~ 3.14 2025-10-10 12:26:54 +01:00
f47393b775 Sort names
[ci skip]
2025-10-09 09:52:40 +01:00
e763ca5721 Add paragraph about iplotx in Phylo tutorial (#5028)
Add mention in NEWS.rst
2025-10-09 09:27:43 +01:00
9111417121 Stay on mypy 1.16.1 2025-10-07 10:02:50 +01:00
24b9dba21a B017 - avoid blind exception 2025-10-07 10:02:50 +01:00
2a392a0452 Stay at black 24.10.0 2025-10-07 10:02:50 +01:00
6cf5841fdf [pre-commit.ci] autoupdate
updates:
- [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v5.0.0...v6.0.0)
- [github.com/astral-sh/ruff-pre-commit: v0.12.2 → v0.13.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.2...v0.13.3)
- https://github.com/psf/blackhttps://github.com/psf/black-pre-commit-mirror
- [github.com/psf/black-pre-commit-mirror: 24.10.0 → 25.9.0](https://github.com/psf/black-pre-commit-mirror/compare/24.10.0...25.9.0)
- [github.com/pre-commit/mirrors-mypy: v1.16.1 → v1.18.2](https://github.com/pre-commit/mirrors-mypy/compare/v1.16.1...v1.18.2)
- [github.com/asottile/blacken-docs: 1.19.1 → 1.20.0](https://github.com/asottile/blacken-docs/compare/1.19.1...1.20.0)
2025-10-07 10:02:50 +01:00
f2004e04da added test and docstring for #5053 2025-10-01 19:19:11 +01:00
5d48cf583f SnapGene: Filter out partial binding sites.
The "primers" packet within a SnapGene file may contain, for every
primers, additional partial binding sites in addition to the full
binding site.

We use the minimum values described in the `HybridizationParams` element
to filter out any binding site that:

* has a matching length shorter than the minimum accepted matching
  length, or
* has a melting temperature lower than the minimum accepted melting
  temperature.

closes #5053
2025-10-01 19:19:11 +01:00
e85f1958ee Make PDB.Chain.__getitem__ more lenient for indexing with int-like values (#5018)
Includes residue indexing test case for `np.int64` condition
2025-09-29 09:50:29 +01:00
20ad9bea6d Handle possible non-existent attributes in clusterbuster.py (#5074)
* Handle possible non-existent attrs in clusterbuster.py

In commit bc0d58b, support was added for gap and weight paramters, but
since these two attributes are not guaranteed to exist by parse and read
methods, an AttributeError could be raised for non-clusterbuster motifs.

An attribute check was added to allow motifs lacking gap and weight to
be formatted properly.

Co-authored-by: Ee Shan Liau Shirley <69098782+shirleyliau@users.noreply.github.com>

* Add names to CONTRIB.rst

* Use try-except to handle missing attributes

Co-authored-by: Ee Shan Liau Shirley <69098782+shirleyliau@users.noreply.github.com>

* Avoid CB output when an attribute is None

In the previous commit, the skipping mechanism was switched to
try-except blocks, and the cases when an attribute is None are
no longer dealt with. This patch re-introduced `if m.weight`
to prevent empty export fields in such cases.

Co-authored-by: Ee Shan Liau Shirley <69098782+shirleyliau@users.noreply.github.com>

---------

Co-authored-by: Ee Shan Liau Shirley <69098782+shirleyliau@users.noreply.github.com>
2025-09-27 16:03:53 +09:00
5a31c3ef74 removing tests for removed modules 2025-09-21 10:07:53 +01:00
5a31cfce80 updating the DEPRECATED.rst file 2025-09-21 10:07:53 +01:00
5b2a50a9ce removing deprecated code 2025-09-21 10:07:53 +01:00
a32c56e1a1 Bump tj-actions/changed-files from 46 to 47
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 46 to 47.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v46...v47)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-version: '47'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-21 10:06:42 +01:00
593114d868 deprecating the SummaryInfo class in Bio.Align.AlignInfo (#5069) 2025-09-21 10:06:00 +01:00
0c4fae3d61 Fix F824 in Bio.PDB.vectors (#5067)
Remove unnecessary global statements
2025-09-20 19:11:58 +01:00
ac0216ab12 Delete Tests/BWA/ test data.
This directory stored data files for the test_BWA_tool.py.  The latter
test was removed following Bio.Application removal in issue #4906.  No
other files in the source tree look to be referring to these data,
therefore it should be safe to remove the whole set.

Closes: #5064
Signed-Off-By: Étienne Mollier <emollier@debian.org>
2025-09-20 07:42:10 +01:00
be97b2d4e7 Aligner default arguments (#5029)
* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* doctests_fixed

* update

* update

* documentation

* add warning

* add a note to the DEPRECATED file

* adding a NEWS entry

* remove stray comments

---------

Co-authored-by: Michiel de Hoon <mdehoon@lacg01.local>
Co-authored-by: Michiel de Hoon <mdehoon@tkx380.genome.gsc.riken.jp>
Co-authored-by: Michiel Jan Laurens de Hoon <mdehoon@Michiels-MacBook-Air.local>
Co-authored-by: Michiel de Hoon <mdehoon@tkx288.genome.gsc.riken.jp>
2025-09-16 22:46:35 +09:00
b4d7c115d2 Bump actions/setup-python from 5 to 6
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-11 19:57:40 +01:00
6e43775844 documentation tweaks (#5055)
* documentation tweaks

* update

---------

Co-authored-by: Michiel de Hoon <mdehoon@tkx288.genome.gsc.riken.jp>
2025-09-04 16:23:53 +09:00
ad9456f3bb Align: add substitution matrix support to Alignment.format() (#5049)
* Align: add optional substitution matrix/aligner argument to format()
- Extended Alignment.format() to accept an optional argument:
  * substitution matrix (e.g. from Bio.Align.substitution_matrices)
  * PairwiseAligner object (uses its substitution matrix)
- Preserves compatibility with existing writer-specific arguments
  (e.g. "vulgar" for exonerate, metadata for mauve).
- Internal logic now distinguishes between substitution matrices
  (used in pretty-printing) and writer arguments (passed to
  AlignmentWriter).
- All alignment format tests pass (58/58).

* Align: add substitution matrix argument to helper format functions

- Updated _format_pretty, _format_unicode, _format_generalized
  to accept optional substitution matrix argument.
- Passed matrix from Alignment.format() into these helpers.
- Updated docstrings accordingly.
- All alignment format tests pass (58/58).

* Align.format: support substitution matrices in helper functions; add tests

- Updated helper functions in Align.format (generalized, pretty, html, etc.)
  to correctly handle substitution_matrix arguments.
- Added new test file `Tests/test_format_matrix.py` to cover:
  * identity matches (|), positive mismatches (:), negative mismatches (.),
    and gaps (-) using substitution matrices.
  * verified behavior with both NUC.4.4 and a custom BLASTN-like matrix.
- Confirmed tests pass with pytest.

Resolves #5043

* Add Rachel Stern to contributors list and NEWS (first contribution)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix style issues in test_format_matrix and Align -__init__

* Rename test_format_matrix.py to test_format_matrix_unittest.py for AppVeyor test discovery

* Move format matrix test to unittest style

* Refactor scoring argument handling in counts() and format()

- Renamed the optional argument in counts() from `argument` to `scoring` for
  clarity and consistency.
- Updated format() to accept the `scoring` parameter via **kwargs instead of
  a dedicated argument.
- Removed the explicit writer argument from format(), since it is no longer
  needed with kwargs-based handling.
- Adjusted the docstring of format() accordingly to reflect the new usage.

* Update test_format_matrix_unittest.py:
- Use explicit assertEqual for pattern strings instead of only assertIn/NotIn, following reviewer feedback.
- Simplify alignment selection by indexing [0] instead of next(iter(...)).

* Remove _pattern_from_pretty, assert full alignment format instead

- Replaced usage of `_pattern_from_pretty` helper with direct comparison
  of `aln.format("", scoring=M)` output in all relevant tests.
- This makes the tests simpler and closer to the actual API usage.
- Removed unused `_pattern_from_pretty` function.

* docs: document new `scoring` argument in Alignment.format tutorial

- Added explanation of the optional `scoring` argument to
  `Alignment.format()` in Doc/Tutorial/chapter_align.rst.
- Included example using PairwiseAligner and a substitution matrix
  (NUC.4.4) to illustrate how the pattern line reflects scores.
- Clarifies how symbols (|, :, ., -) correspond to matches,
  positive/negative mismatches, and gaps.

* docs: add cont-doctest and update scoring example with '.' mismatch

* docs: fix scoring example with gap penalties to show ':' and '.' in doctest

* docs: add <BLANKLINE> to doctest output in scoring example

* doc: add 8 in the middle line of the format

* doc: Arranging the print format

* Rearrange the print format

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: mdehoon <mjldehoon@yahoo.com>
2025-09-04 14:14:55 +09:00
d3de878863 Fixes formatting for extremely high B-factor values in PDB files (#5047) 2025-09-03 07:05:07 -07:00
d1c4b3d0e2 pairwisealigner pickle fix (#5041)
* pairwisealigner pickling fix

* pr feedback updates

* pr updates - use almost equal on epsilon
2025-08-19 09:18:30 +09:00
a4f7ca03bb Bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-17 12:18:23 +01:00
4ceee03dbf typo (#5040)
Co-authored-by: Michiel de Hoon <michiel.dehoon@riken.jp>
2025-08-12 16:06:49 +09:00
ff4bed01f5 declare local functions as static (#5037)
Co-authored-by: Michiel Jan Laurens de Hoon <mdehoon@Michiels-MacBook-Air.local>
2025-08-12 00:33:52 +09:00
35bdb3f576 Update YN00 docstrings 2025-07-30 16:28:38 +01:00
053bdc8ed2 Uppercase PAML software names except in run methods 2025-07-30 16:28:38 +01:00
f6e56e5061 Update long docstrings in PAML class methods 2025-07-30 16:28:38 +01:00
aceebefbff Set PAML class names in CamelCase 2025-07-30 16:28:38 +01:00
392ede471d Fixed flake8 rule D209 violations
D209 Multi-line docstring closing quotes should be on a separate line
2025-07-30 16:28:38 +01:00
b86d003e49 Update CONTRIB.rst 2025-07-30 16:28:38 +01:00
727b5055ff Updated docstrings to use consistent capitalization. paml >> PAML etc. 2025-07-30 16:28:38 +01:00
95f8119ad9 Updated docstrings to include the output and mention any validation that occurs. Also, changed docstring so they have consistent capitalization. Baseml >> BASEML etc 2025-07-30 16:28:38 +01:00
6851cd8d03 Drop comment 2025-07-24 18:13:30 +01:00
b027825127 Prevent side-effect in SeqRecord._per_letter_annotations
Fixes #5015
2025-07-24 18:13:30 +01:00
66ad0a062e Extend the .counts method of an Alignment (#5011)
* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* updat

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* halfway finished

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* pdate

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* replace precompiler #defines by inline functions

* update

* update

* add tests

* update

* update

* update

* update

* update

* update

* update

* update

* documentation

* update

* avoid stpcpy

* pointer printing

* compiler warning

* testing without codonalign

* testing without codonalign and pairwisealigner

* compiler warning

* adding codonalign and pairwisealigner back in

* remove inline from check_indices

* add inline to check_indices

* update

* add test line 12287 test_pairwise_aligner.py

* update

* update

* update

* update

* change dtype from int32 to "i"

* all done

* testing

* testing

* testing

* testing

* done

* done

* fix how pointers are printed on Windows

* update

* update

* update

* update

* fix id printing on pypy

* style change only

* Use Py_uintptr_t instead of uintptr_t

* fix memory leak

* remove double semicolon

* check if GitHub actions are now pickup up Python version 3.13.5 without hardcoding it

---------

Co-authored-by: Michiel Jan Laurens de Hoon <mdehoon@Michiels-MacBook-Air.local>
Co-authored-by: Michiel de Hoon <mdehoon@tkx288.genome.gsc.riken.jp>
Co-authored-by: Michiel de Hoon <michiel.dehoon@riken.jp>
2025-07-11 14:40:07 +09:00
1b5e9ccef5 Stay at black 24.10.0 for trailing whitespace in doctests 2025-07-11 10:26:05 +09:00
116d92b0fe Drop trailing whitespace in some docstrings
Used black 25.1.0 which does this in docstrings too which is bad.
2025-07-11 10:26:05 +09:00
ed51b11450 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-07-11 10:26:05 +09:00
8aaa7ffc41 [pre-commit.ci] autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.9.7 → v0.12.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.9.7...v0.12.2)
- [github.com/psf/black: 24.10.0 → 25.1.0](https://github.com/psf/black/compare/24.10.0...25.1.0)
- [github.com/PyCQA/flake8: 7.1.2 → 7.3.0](https://github.com/PyCQA/flake8/compare/7.1.2...7.3.0)
- [github.com/pre-commit/mirrors-mypy: v1.15.0 → v1.16.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.15.0...v1.16.1)
- [github.com/rstcheck/rstcheck: v6.2.4 → v6.2.5](https://github.com/rstcheck/rstcheck/compare/v6.2.4...v6.2.5)
- [github.com/PyCQA/doc8: v1.1.2 → v2.0.0](https://github.com/PyCQA/doc8/compare/v1.1.2...v2.0.0)
2025-07-11 10:26:05 +09:00
0969cc24fd Add automatic alignment generation to StructureAlignment 2025-07-03 09:33:06 -07:00
fb837c6c3b Update ci.yml and change windows-2019 to windows-2022 (#5024)
Closes #5023
2025-07-03 08:53:04 -07:00