本文介绍了向生物蟒中的基因组爆炸的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
from Bio.Blast import NCBIXML
from Bio.Blast import NCBIWWW
result_handle = NCBIWWW.qblast(
"blastn",
"nr",
"CACTTATTTAGTTAGCTTGCAACCCTGGATTTTTGTTTACTGGAGAGGCC",
entrez_query='"Beutenbergia cavernae DSM 12333" [Organism]')
blast_records = NCBIXML.parse(result_handle)
for blast_record in blast_records:
for alignment in blast_record.alignments:
for hsp in alignment.hsps:
print(hsp.query[0:75] + '...')
print(hsp.match[0:75] + '...')
print(hsp.sbjct[0:75] + '...')
虽然序列实际上是基因组的序列,但这并没有给我输出结果,所以我必须得到结果.错误在哪里?查询正确吗?
this does not give me an output, although the sequence is actually a sequence of the genome,so i must get a result.where is the error?the query is correct?
推荐答案
您的查询未返回任何结果.爆炸的默认参数是原因.在小长度查询的这种特殊情况下,这些参数效果更好:
Your query isn't returning any results. The default parameters for blast are the cause. These parameters work better in this particular case of small length queries:
result_handle = NCBIWWW.qblast(
"blastn",
"nr",
"CACTTATTTAGTTAGCTTGCAACCCTGGATTTTTGTTTACTGGAGAGGCC",
megablast=False,
expect=1000,
word_size=7,
nucl_reward=1,
nucl_penalty=-3,
gapcosts="5 2",
entrez_query='Beutenbergia cavernae DSM 12333 [Organism]')
尤其是expect
参数在这里起主要作用.
Particularly the expect
parameter plays a major role here.
这篇关于向生物蟒中的基因组爆炸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!