首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >PhyML在BioPython Phylo中的应用

PhyML在BioPython Phylo中的应用
EN

Stack Overflow用户
提问于 2018-09-08 14:31:30
回答 1查看 363关注 0票数 2

最近,我尝试使用最大的可能性从对齐文件创建树,但是在遵循官方的BioPython文档时遇到了问题:

代码语言:javascript
运行
复制
cmd = PhymlCommandline(input='data/random.phy')
out_log, err_log = cmd()

我以轻松的phylip格式将路径替换为自己文件的路径。用AlignIO读取我的文件是有效的,所以路径不应该是问题所在。

是否需要安装PhyML并以某种方式将其链接到BioPython安装?

不幸的是,这方面的文档非常少。

我在Windows上通过Anaconda使用。

错误是:

代码语言:javascript
运行
复制
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

-->英语: WinError 2系统找不到给定的文件

EN

Stack Overflow用户

回答已采纳

发布于 2018-09-09 09:41:26

短答案

  • 从这里下载PhyML:http://www.atgc-montpellier.fr/phyml/download.php
  • 将操作系统的适当可执行文件解压到计算机上。
  • cmd=/your/path/PhyML-3.1_win32.exe'添加到PhymlCommandline调用中。 PhymlCommandline(cmd='c:/home/users/nicolas/PhyML-3.1_win32.exe',输入=“数据/随机.菲”)
  • 或者,您也可以将路径添加到您的PATH中(参见下面)

更长的答案

  • PhymlCommandline继承了AbstractCommandline类,它只是可执行文件的包装器。
  • 从文件中

注意,默认情况下,我们假设底层工具安装在system $PATH环境变量上。这在Linux/Unix下是正常的,但可能需要在Windows下手动完成。或者,可以将二进制文件的完整路径指定为第一个参数(cmd):

票数 0
EN
查看全部 1 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52236273

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档