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