Blast.parse XML2 file AssertionErr
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- python
调研方向
从 Bio/Blast/init.py 中的 Records._read_header 附近以及第 209 行的 assertion 开始。使用从 qblast ZIP 中提取的 XML2 member 重现该失败,然后验证 parser 能够处理该文件,或者报告清晰的格式错误,而不是引发此 assertion。
由索引模型根据 Issue 内容生成。
描述
I'm having troubles parsing my XML file (in XML2 format from qblast) with parse function.
Code:
Blast.email = "[email protected]"
result_stream = Blast.qblast("blastp", "nr", hemo_b,format_type="XML2")
data = result_stream.read()
with open("hemo_b_xml2.zip", "wb") as out_stream:
out_stream.write(data)
result_stream.close()
import zipfile
myzipfile = zipfile.ZipFile("hemo_b_xml2.zip")
print(myzipfile.namelist())
stream = myzipfile.open("XXTUA6HF013_1.xml")
data = stream.read()
print(len(data))
data = data.decode()
print(data)
result_stream = open("XXTUA6HF013_1.xml", "rb")
print(result_stream)
blast_record = Blast.parse(result_stream)
Error:
File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\Bio\Blast_init_.py:708, in Records.init(self, source)
706 stream = source
707 self._stream = stream
--> 708 self._read_header()
709 self._records = [] # for when we want to use Records as a list
710 self._loaded = False
...
--> 209 assert name == "http://www.ncbi.nlm.nih.gov/ BlastXML2"
210 domain, url = attributes[key].split()
211 assert domain == "http://www.ncbi.nlm.nih.gov/"
AssertionError:
- 主要语言
- Python
- 星标
- 5.2k
- 派生
- 2k
- 平均合并
- 2 天 1 小时
- 30 天内合并 PR
- 14
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
biopython/biopython 的其他 Issue
-
`CodonAdaptationIndex.calculate()` hardcodes ATG/TGG as CAI weight 1.0可能已有人在做 @cipgi 于 28 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
biopython/biopython#5345 · 4 条评论 ·
维护者通常 1 天内回复
-
DistanceCalculator identity model inflates the distance when skip_letters is used可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 86/100
biopython/biopython#5332 · 2 条评论 ·
维护者通常 1 天内回复
-
Seq({}, length=N) creates a partially defined sequence with no segments, crashing on addition and multiplication可能重新可做 @mdehoon 于 35 天前认领,目前没有进行中的 PR。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
biopython/biopython#5329 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
When the residue sequence identifier (line[22:26]) is empty, PDBParser raises an error可能已有人在做 @etal 于 35 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
biopython/biopython#5327 · 2 条评论 · 已指派 2 人 ·
维护者通常 1 天内回复
-
EMBL writer warns on valid INSDC mol_type values, accepts invalid ones可能已有人在做 @corneliusroemer 于 45 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
biopython/biopython#5319 · 3 条评论 ·
维护者通常 1 天内回复
查看 biopython/biopython 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
Nixtla/mlforecast#823 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
microsoft/ML-For-Beginners#1061 ·
-
bot-found documentation priority: P3
难度 2/5 1 小时以内 新手友好度 82/100
madenvel/KalinkaPlayer#503 ·
-
难度 2/5 1-3 小时 新手友好度 63/100
EleutherAI/lm-evaluation-harness#4508 ·
维护者通常 1 天内回复