繁体   English   中英

Biopython错误-系统找不到指定的文件

[英]Biopython error - The system cannot find the file specified

我遇到了无法解决的错误。

我正在尝试执行最简单的命令集,这些命令将执行tBLASTn算法,在数据库(也指定为文件-> Cucumber.fasta)中查找序列(指定为“ pytanie.fasta”文件的序列)。 结果将保存在“ wynik.txt”文件中。

代码如下:

from Bio.Blast. Applications import NcbitblastnCommandline
database = r"\Biopython\cucumber.fasta"
qr = r"\Biopython\pytanie.fasta"
output = r"\Biopython\wynik.txt"
e = raw_input("Enter e-value: ")
tblastn_cline = NcbitblastnCommandline(cmd='blastn', db=database, query=qr, out=output, evalue=e, outfmt=7)

print tblastn_cline

stdout, stderr = tblastn_cline()

我得到的错误是:

 File "C:\Users\IBM_ADMIN\Desktop\PYTHON\Workspace\Biopython\blast.py", line 20, in <module>
stdout, stderr = tblastn_cline()
File "C:\Python27\lib\site-packages\Bio\Application\__init__.py", line 435, in __call__
shell=(sys.platform!="win32"))
File "C:\Python27\lib\subprocess.py", line 679, in __init__
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 893, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

我在用:

  • Eclipse SDK版本:3.7.1
  • Python 2.7版
  • 操作系统:64 bit Windows 7

我也曾在32位Windows XP上尝试过此操作,它会产生相同的错误。 Biopython软件包应通过了biopython网站建议的测试,因此应该可以正常工作。 我还尝试了文件所在路径的其他格式,但是没有用。 我的朋友在Ubuntu上使用相同的代码,效果很好。

有人知道如何解决此错误吗?

文件的路径是什么?

例如,路径r"\\Biopython\\cucumber.fasta"是当前驱动器上的绝对路径(因为它以反斜杠开头且没有驱动器号),在您的情况下,我认为它是r"C:\\Biopython\\cucumber.fasta" 那是对的吗?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM