问题描述
我正在尝试运行 qblast() 函数,但运行时间很长。
from Bio.Blast import NCBIWWW
result_handle = NCBIWWW.qblast('blastn','nt','MT747438')
with open('blast_BE_isolate.xml','w+') as save_to:
save_to.write(result_handle.read())
result_handle.close()
然后我尝试查看结果,但它返回 0 个结果。
from Bio.Blast import NCBIXML
result_handle = open('blast_BE_isolate.xml','r')
blast_record = NCBIXML.read(result_handle)
E_VALUE_THRESH = 0.0001
ct = 0
for alignment in blast_record.alignments:
for hsp in alignment.hsps:
ct += 1
if hsp.expect < E_VALUE_THRESH:
print("\n")
print("****Alignment****")
print("sequence:",alignment.title)
print("length:",alignment.length)
print('E value:',hsp.expect)
print(hsp.query[0:75] + '...')
print(hsp.match[0:75] + '...')
print(hsp.sbjct[0:75] + '...')
print('\n' + "There are",ct,"sequences in the BLAST output!")
There are 0 sequences in the BLAST output!
为什么会发生这种情况?我在 NCBI 网站上手动执行 BLAST,结果在很短的时间内返回。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)