Python 生物附着体中的杆和肌肉
我在使用biopython时遇到问题,我有Python版本 我安装了biopython-1.61.win-amd64-py3.3 我想将DNA序列与Python 生物附着体中的杆和肌肉,python,biopython,Python,Biopython,我在使用biopython时遇到问题,我有Python版本 我安装了biopython-1.61.win-amd64-py3.3 我想将DNA序列与Clustalw或Muscle 对于Clustalw: from Bio.Clustalw import MultipleAlignCL 我得到以下错误: No module named 'Bio.Clustalw' stdout, stderr = muscle_cline() File "..\..\lib\site-packages\B
Clustalw
或Muscle
对于Clustalw:
from Bio.Clustalw import MultipleAlignCL
我得到以下错误:
No module named 'Bio.Clustalw'
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
肌肉:
>>> from Bio.Align.Applications import MuscleCommandline
>>> muscle_cline = MuscleCommandline(input="input.fasta")
>>> stdout, stderr = muscle_cline()
我得到以下错误:
No module named 'Bio.Clustalw'
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
首先,尝试从安装Biopython 1.63,它可能会解决一些问题 其次,确保您使用的是来自python.org的,如果在更新Biopython后仍然出现相同的错误,您可能希望再次运行安装程序,以确保没有任何文件被损坏
我发现这表明
Bio.Clustalw
已被弃用
此模块已被的Bio.AlignIO框架取代
对齐解析,以及中的ClustalW命令行包装器
用于调用该工具的Bio.Align.Applications。这两个都是描述的
在当前版本的Biopython教程和食谱中
这就解释了。对于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"
因此,您的错误表明找不到正确的
muscle.exe
,因此您需要将其位置作为参数传递。我可以先检查一下您是否安装了muscle和clustalw吗?(Clustal Omega是Clustal的最新版本,您可能希望使用它进行更快的对齐。)不,我没有安装muscle和clustalwGot。您需要安装这两个程序。BioPython不提供这些程序,它只提供包装器来访问这些程序。我的猜测是,一旦安装了这些程序,错误就会改变或消失。