Biopython中成对爆炸的问题

问题描述 投票:0回答:1

我尝试在python脚本中使用biopython blast工具在两个序列之间运行成对爆炸。

通过向blast_cline添加参数db='blast_database',我对本地数据库运行爆炸没有任何问题。但是,如果我用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'
python bioinformatics biopython blast
1个回答
0
投票

这应该工作:

from Bio.Blast.Applications import NcbiblastnCommandline
blast_cline = NcbiblastnCommandline(query='tmp_query.fas', subject='tmp_subject.fas', evalue=1, outfmt=5)()[0]
print(blast_cline)
© www.soinside.com 2019 - 2024. All rights reserved.