【发布时间】:2019-02-13 04:29:35
【问题描述】:
我尝试在 python 脚本中的两个序列之间运行成对爆炸,并使用 biopython blast 工具。
通过将参数db='blast_database' 添加到blast_cline 对本地数据库运行爆炸没有问题。但是如果我用subject='tmp_subject.fas'替换这个参数就不行了。
我的代码:
from Bio.Blast.Applications import NcbiblastnCommandline
blast_cline = NcbiblastnCommandline(query='tmp_query.fas', subject='tmp_subject.fas', evalue=1, outfmt=5, out='tmp.xml')
blast_cline()
我收到此错误消息:
Bio.Application.ApplicationError: Non-zero return code 3 from 'blastn -out tmp.xml -outfmt 5 -query tmp_query.fas -evalue 1 -subject tmp_subject.fas', message 'BLAST engine error: Empty CBlastQueryVector'
【问题讨论】:
-
不确定它是否适用于您的情况,但here 我读到“Artemis 输出的 Genbank 文件有时会由于缺少有效的标头而导致 [
BLAST engine error: Empty CBlastQueryVector]。”跨度> -
感谢您的提示!但是,如果在 shell 上运行命令
它工作正常。因此,我想在 biopython 中的实现存在一些问题...... -
从命令行显示
blastn -versionVS 的输出。python -c 'from Bio.Blast.Applications import NcbiblastnCommandline; print(NcbiblastnCommandline(version=1)())' -
@Chris_Rands 这可能应该迁移不?在这里可以解决,但在bioinformatics 上更容易解决
标签: python bioinformatics biopython blast