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
* 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>
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>
* 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>