我正在尝试从一个目录中的几个文件自动输出blast。这里的变量是硬编码的,但稍后将由用户定义。我的填充将通过一个循环进行更改,但我在python中对文件运行NcbiblastpCommandline时遇到问题。目标是在本地运行blast,输入多个更大的fasta文件,这样blast将按顺序运行每个批处理文件,输出到tsv,在那里我解析数据并传递给clustalw本地对齐。在
Input_file="minifasta.fasta"
data="uniprot_database"
E_Value_Thresh=1e-10
counter=1
Filename2= 'Batch'+str(counter)
from Bio.Blast.Applications import NcbiblastpCommandline
blast_output_file='blastout.tsv'
NcbiblastpCommandline.outfile=Filename2
from Bio.Blast.Applications import NcbiblastpCommandline
cline = NcbiblastpCommandline(query=Input_file, db=data,outfmt=6,
out=blast_output_file, evalue= E_Value_Thresh)
print(cline)
stdt, stdr= cline()
我一直收到一个错误消息,说“NcbiblastpCommandline”对象不可编辑。我被定向到stdt,stdr行,但没有stdt,stdr另一个错误消息说命令没有被重新注册,错误消息指向stdout\u str,我找不到Python3中NcbiblastpCommandline用法的最新示例来指导我。在
我收到的完整错误是:
^{pr2}$
首先运行
which blastp
,找到blastp
的完整路径,并将其作为NcbiblastpCommandline
的参数。在如果现在执行
print(cline)
,它应该打印出要运行的完整命令。通过复制/粘贴此输出并从命令行运行它,再次检查这是否有效。在相关问题 更多 >
编程相关推荐