### Setup 3.8.10 (default, Jun 4 2021, 15:09:15) [GCC 7.5.0] CPython Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.17 1.79 ### Expected behaviour this code from the documentation to set a custom matrix return an error ```python matrix = {('A','A'): 1.0, ('A','B'): -1.0, ('B','B'): 2.0} aligner.substitution_matrix = matrix ``` ```txt 2245 raise AttributeError("'PairwiseAligner' object has no attribute '%s'" % key) -> 2246 _aligners.PairwiseAligner.__setattr__(self, key, value) 2247 2248 def align(self, seqA, seqB, strand="+"): ``` ValueError: expected a matrix ### Actual behaviour should return no error ### Steps to reproduce run the snippet from documentation after installing latest version
Activity
mdehoon commentedon Jul 7, 2021
@StephaneKazmierczak Where do you find this in the documentation?
mdehoon commentedon Jul 7, 2021
I found it here:
https://biopython.readthedocs.io/en/latest/chapter_align.html
However, this is pointing to an outdated version of the documentation. If you follow the "Edit on GitHub" at the top, it will take you to https://github.com/biopython/biopython/blob/sphinx/Doc/chapter_align.rst which apparently was last updated on July 31, 2019 by @peterjc .
peterjc commentedon Jul 7, 2021
That is from an experimental branch https://github.com/biopython/biopython/tree/sphinx - see #907 (comment) - and https://biopython.readthedocs.io/ should not be live.
Update: RTD pages deleted now
peterjc commentedon Jul 7, 2021
So, this was out of date documentation (sorry about that), and would have reflected Biopython 1.74 which was released earlier in July 2019.
The current documentation is (and has been for a very long) at http://biopython.org/DIST/docs/tutorial/Tutorial.html and http://biopython.org/DIST/docs/tutorial/Tutorial.pdf
mdehoon commentedon Jul 8, 2021
@StephaneKazmierczak With recent versions of Biopython, you would use
StephaneKazmierczak commentedon Jul 11, 2021
Thank you guys for the explanations