Biopython错误-系统找不到指定的文件 [英] Biopython error - The system cannot find the file specified

查看:122
本文介绍了Biopython错误-系统找不到指定的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have encountered an error which I am not able to resolve.

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

I am trying to perform the easiest set of commands that will perform a tBLASTn algorithm, looking for a sequence (sequence specified as a "pytanie.fasta" file) in a database (also specified as file -> cucumber.fasta). The result will be saved in the "wynik.txt" file.

代码如下:

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位Windows 7

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

I have tried this also on 32-bit Windows XP and it produces the same error. Biopython package should work fine since it went through the tests suggested by biopython website. I have also tried other formats of the path where the files are located, but it did not work. My friend uses the same code on Ubuntu and it works fine.

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

Does anybody know how to fix this error?

推荐答案

文件的路径是什么?

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

The path r"\Biopython\cucumber.fasta", for example, is an absolute path on the current drive (because it starts with a backslash and no drive letter), which I think in your case is r"C:\Biopython\cucumber.fasta". Is that correct?

这篇关于Biopython错误-系统找不到指定的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆