我试图通过细菌和古埃及的分类来过滤一个爆炸的网络搜索,这是我的代码:
from Bio.Blast.Applications import NcbiblastnCommandline
blastn_command = NcbiblastnCommandline(query="test.fasta", db="nt", outfmt="'7 qseqid sseqid qcovs qlen slen qstart qend'", out="blastn2.tab",remote=True,entrez_query="txid2157[ORGN] OR txid2[ORGN]")
stdout, stderr = blastn_command()我得到了一条错误信息:
Traceback (most recent call last):
File "test.py", line 3, in <module>
stdout, stderr = blastn_command()
File "/usr/lib/python2.7/dist-packages/Bio/Application/__init__.py", line 517, in __call__
stdout_str, stderr_str)
Bio.Application.ApplicationError: Non-zero return code 1 from "blastn -out blastn2.tab -outfmt '7 qseqid sseqid qcovs qlen slen qstart qend' -query teste.fasta -db nt -entrez_query txid2157[ORGN] OR txid2[ORGN] -remote", message 'USAGE'发布于 2022-01-25 12:35:34
TLDR
双引号为entrez_query参数(与outfmt相同)。
错误很可能是由这样一个事实引起的,即entrez_query参数包含空格而不是双引号。从错误消息blast字符串中可以看出,--entrez_query被不引用地传递给命令行(将其与outfmt进行比较,后者是双引号)。
USAGE消息是blastn生成的实际错误消息的第一行,它还包含以下行:
Error: Too many positional arguments (1), the offending value: OR
Error: (CArgException::eSynopsis) Too many positional arguments (1), the offending value: ORhttps://stackoverflow.com/questions/70796062
复制相似问题