[我刚刚开始学习Biopython的方法,我试图使用ExPASy来检索SwissProt记录,就像Biopython教程(http://biopython.org/DIST/docs/tutorial/Tutorial.pdf)的第180页中所描述的那样,但也在相关的ROSALIND练习中[[ C0]-单击以展开“编程快捷方式”部分)。
我使用的代码与ROSALIND练习中的代码基本相同:
http://rosalind.info/problems/dbpr/
但是,SwissProt.read函数给出以下错误消息(我已经修剪了一些文件路径):
from Bio import ExPASy
from Bio import SwissProt
handle = ExPASy.get_sprot_raw('Q5SLP9')
record = SwissProt.read(handle)
我发现此问题已在GitHub(Traceback (most recent call last): File "code.py", line 4, in <module>
record = SwissProt.read(handle) File "lib\site-packages\Bio\SwissProt\__init__.py", line 151, in read
record = _read(handle) File "lib\site-packages\Bio\SwissProt\__init__.py", line 255, in _read
_read_ft(record, line) File "lib\site-packages\Bio\SwissProt\__init__.py", line 594, in _read_ft
assert not from_res and not to_res, line AssertionError: /note="Single-stranded DNA-binding protein"
)中进行了报道,所以我不是第一个获得此消息的人,但是我真的没有找到该软件包的任何更新版本或解决此问题的任何方法。也许是因为我对使用软件包非常陌生。有人可以帮我吗?
请将您的BioPython更新到1.77版。拉取请求https://github.com/biopython/biopython/issues/2417已解决此问题。