Files
biopython/Bio/motifs
Yen-Chung Chen 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
..
2025-09-21 10:07:53 +01:00
2024-06-09 15:24:59 +09:00
2025-08-12 16:06:49 +09:00
2024-08-22 16:34:07 +09:00
2022-01-31 14:33:14 +00:00
2024-03-14 11:05:43 +00:00