生物ython中的棍棒和肌肉

2024-05-23 23:04:47 发布

您现在位置:Python中文网/ 问答频道 /正文

我在使用biopython时遇到问题,我有Python版本 我安装了biopython-1.61.win-amd64-py3.3 我想把DNA序列与Clustalw或{}对齐

对于Clustalw:

from Bio.Clustalw import MultipleAlignCL

我得到以下错误:

^{pr2}$

对于Muscle:

>>> from Bio.Align.Applications import MuscleCommandline
>>> muscle_cline = MuscleCommandline(input="input.fasta")
>>> stdout, stderr = muscle_cline()

我得到以下错误:

stdout, stderr = muscle_cline()
  File "..\..\lib\site-packages\Bio\Application\__init__.py", line 434, in __call__
    shell=(sys.platform!="win32"))
  File "..:\..\lib\subprocess.py", line 818, in __init__
    restore_signals, start_new_session)
  File "..:\..\lib\subprocess.py", line 1096, in _execute_child
    raise WindowsError(*e.args)
FileNotFoundError: [WinError 2] The specified file is not found

Tags: infrompyimportinputlib错误line
1条回答
网友
1楼 · 发布于 2024-05-23 23:04:47

首先,尝试从here安装biopython1.63,它可能会解决一些问题。在

其次,确保使用的是the latest Python来自python.org网站-如果在更新Biopython之后仍然遇到相同的错误,您可能需要再次运行安装程序,以确保您的文件没有损坏。在


我发现this表示不推荐使用Bio.Clustalw。在

This module has been superseded by the Bio.AlignIO framework for alignment parsing, and the ClustalW command line wrapper in Bio.Align.Applications for calling the tool. These are both described in the current version of the Biopython Tutorial and Cookbook.

所以这就解释了。至于Bio.Align.Applications.MuscleCommandLine,在其上运行help()给出了以下代码示例:

>>> from Bio.Align.Applications import MuscleCommandline
>>> muscle_exe = r"C:\Program Files\Aligments\muscle3.8.31_i86win32.exe"
>>> in_file = r"C:\My Documents\unaligned.fasta"
>>> out_file = r"C:\My Documents\aligned.fasta"
>>> muscle_cline = MuscleCommandline(muscle_exe, input=in_file, out=out_file)
>>> print(muscle_cline)
"C:\Program Files\Aligments\muscle3.8.31_i86win32.exe" -in "C:\My Documents\unaligned.fasta" -out "C:\My Documents\aligned.fasta"

{cd4}是一个正确的位置,所以它是一个错误。在

相关问题 更多 >