在BioPython Phylo中使用PhyML
我最近尝试使用最大可能性从对齐文件创建树,但在遵循BioPython的官方文档时遇到了问题:在BioPython Phylo中使用PhyML,python,wrapper,biopython,phylogeny,Python,Wrapper,Biopython,Phylogeny,我最近尝试使用最大可能性从对齐文件创建树,但在遵循BioPython的官方文档时遇到了问题: cmd = PhymlCommandline(input='data/random.phy') out_log, err_log = cmd() 我将路径替换为我自己文件的松弛phylip格式的路径。 使用AlignIO读取我的文件是有效的,因此路径应该不是问题 是否需要安装PhyML并以某种方式将其链接到BioPython安装 不幸的是,文档对此非常简短 我在Windows上通过Anaconda使用
cmd = PhymlCommandline(input='data/random.phy')
out_log, err_log = cmd()
我将路径替换为我自己文件的松弛phylip格式的路径。
使用AlignIO读取我的文件是有效的,因此路径应该不是问题
是否需要安装PhyML并以某种方式将其链接到BioPython安装
不幸的是,文档对此非常简短
我在Windows上通过Anaconda使用Juypter笔记本电脑
错误是:
FileNotFoundError Traceback (most recent call last)
<ipython-input-4-437a0bc7f21e> in <module>()
4 cmd = PhymlCommandline(input='C/Users/Nicolas/Documents/Uni/ProjektHerlyn/random.phy', cmd='phyml')
5 #out_log, err_log = cmd()
----> 6 cmd()
~\Anaconda3\lib\site-packages\Bio\Application\__init__.py in __call__(self, stdin, stdout, stderr, cwd, env)
505 universal_newlines=True,
506 cwd=cwd, env=env,
--> 507 shell=use_shell)
508 # Use .communicate as can get deadlocks with .wait(), see Bug 2804
509 stdout_str, stderr_str = child_process.communicate(stdin)
~\Anaconda3\lib\subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, encoding, errors)
707 c2pread, c2pwrite,
708 errread, errwrite,
--> 709 restore_signals, start_new_session)
710 except:
711 # Cleanup if the child failed starting.
~\Anaconda3\lib\subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_start_new_session)
995 env,
996 os.fspath(cwd) if cwd is not None else None,
--> 997 startupinfo)
998 finally:
999 # Child is launched. Close the parent's copy of those pipe
FileNotFoundError: [WinError 2] Das System kann die angegebene Datei nicht finden
FileNotFoundError回溯(最近一次调用)
在()
4 cmd=PhymlCommandline(input='C/Users/Nicolas/Documents/Uni/ProjektHerlyn/random.phy',cmd='phyml')
5#out_log,err_log=cmd()
---->6 cmd()
~\Anaconda3\lib\site packages\Bio\Application\\uuuuuuuu init\uuuuuuuuuuu.py in\uuuuuuu调用(self、stdin、stdout、stderr、cwd、env)
505环球新线=真,
506 cwd=cwd,env=env,
-->507外壳=使用(外壳)
508#使用.communication,因为它可能会与.wait()发生死锁,请参阅Bug 2804
509 stdout\u str,stderr\u str=子进程通信(stdin)
初始化中的~\Anaconda3\lib\subprocess.py(self、args、bufsize、executable、stdin、stdout、stderr、preexec\fn、close\u fds、shell、cwd、env、universal\u新行、startupinfo、creationflags、restore\u信号、start\u new\u会话、pass\u fds、编码、错误)
707 c2pread,c2pwrite,
708错误读取,错误写入,
-->709恢复信号,启动新会话)
710除:
711#如果孩子启动失败,则进行清理。
执行子进程中的~\Anaconda3\lib\subprocess.py(self、args、executable、preexec\u fn、close\u fds、pass\u fds、cwd、env、startupinfo、creationflags、shell、p2cread、p2cwrite、c2pread、c2pwrite、errread、errwrite、未使用的恢复信号、未使用的启动新会话)
995环境,
996 os.fspath(cwd)如果cwd不是None else None,
-->997(创业信息)
998最后:
999#儿童启动。关闭这些管道的父级副本
FileNotFoundError:[WinError 2]数据系统无法更新
-->系统找不到给定的文件简短回答
- 从此处下载PhyML:
- 将操作系统的适当可执行文件解压缩到计算机
- 将
添加到cmd=/your/path/PhyML-3.1_win32.exe'
调用中,例如PhymlCommandline
cmd = PhymlCommandline(cmd='c:/home/users/nicolas/PhyML-3.1_win32.exe', input='data/random.phy')
- 或者,您可以将可执行文件的路径添加到
(见下文)路径
继承类,该类只是可执行文件的包装PhymlCommandline
- 从文件中