我正在尝试使用BioPython来运行PAML并运行这些代码:
from Bio.Phylo.PAML import codeml
cml = codeml.Codeml(alignment = "lysin.phy", tree = "lysin.trees", out_file = "results.out")
cml.read_ctl_file("codeml.ctl")
results=cml.run()
但是,cml.run()将进入休眠状态并且永远不会完成。当我取消它时,消息返回是:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/bioinfo/anaconda3/lib/python3.5/site-packages/biopython-1.66-py3.5-linux-x86_64.egg/Bio/Phylo/PAML/codeml.py", line 186, in run
Paml.run(self, ctl_file, verbose, command)
File "/home/bioinfo/anaconda3/lib/python3.5/site-packages/biopython-1.66-py3.5-linux-x86_64.egg/Bio/Phylo/PAML/_paml.py", line 145, in run
stdout=subprocess.PIPE)
File "/home/bioinfo/anaconda3/lib/python3.5/subprocess.py", line 562, in call
return p.wait(timeout=timeout)
File "/home/bioinfo/anaconda3/lib/python3.5/subprocess.py", line 1651, in wait
(pid, sts) = self._try_wait(0)
File "/home/bioinfo/anaconda3/lib/python3.5/subprocess.py", line 1601, in _try_wait
(pid, sts) = os.waitpid(self.pid, wait_flags)
KeyboardInterrupt
任何人都可以帮我弄清楚错误在哪里。我使用的对齐文件和树文件位于PAML示例文件夹中。
答案 0 :(得分:0)
我有同样的问题,以下调整工作。我不知道为什么,也没有时间弄清楚,但如果有人可以解释,我会很高兴。基本上,顺序很重要,否则参数设置为null [您可以通过cml.print_options()进行验证。
cml = codeml.Codeml()
cml.read_ctl_file("ctl_file_path")
cml.tree = "full_tree_path"
cml.alignment = "full_alignment_path"
cml.out_file = "full_out_path"
cml.working_dir = "full_dir_path"
cml.run()
在以下情况下无效:
我也是通过conda运行python。