2016-09-21 78 views
0

我是python领域的新手,但我想用biopython来对齐一些DNA序列。我从网上一个剧本,我跑了如下(〜是短于我的主路径):biopython的肌肉非零返回码137

~$ python 
Python 3.5.1 (default, Jul 3 2016, 12:57:35) 
[GCC 5.4.0 20160609] on linux 
Type "help", "copyright", "credits" or "license" for more information. 
>>> from Bio.Align.Applications import MuscleCommandline 
>>> muscle_exe = r"/usr/bin/muscle" 
>>> in_file = r"~/SpiderOak Hive/LAB/Lab book/Ery/Seqs/tester.fasta" 
>>> out_file = "~/SpiderOak Hive/LAB/Lab book/Ery/Seqs/tester_aligned.fasta" 
>>> muscle_cline = MuscleCommandline(muscle_exe, input=in_file, out=out_file) 
>>> print(muscle_cline) 
/usr/bin/muscle -in "~/SpiderOak Hive/LAB/Lab 
book/Ery/Seqs/tester.fasta" -out "~/SpiderOak Hive/LAB/Lab 
book/Ery/Seqs/tester_aligned.fasta" 

但空空,我得到了应用程序时:

>>> muscle_cline() 
Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
    File "/opt/python3.5/lib/python3.5/site-packages/Bio/Application/__init__.py", 
line 516, in __call__ 
    stdout_str, stderr_str) 
Bio.Application.ApplicationError: Non-zero return code 137 from 
'/usr/bin/muscle -in "/home/gigiux/SpiderOak Hive/LAB/Lab 
book/Ery/Seqs/tester.fasta" -out "/home/gigiux/SpiderOak Hive/LAB/Lab 
book/Ery/Seqs/tester_aligned.fasta"', message 'MUSCLE v3.8.31 by 
Robert C. Edgar' 
>>> 

,会是什么问题?我在网上看到,这可能是由于内存问题;在那种情况下代码是好的?我如何运行大对齐?

还有:为什么我应该使用= r“path”而不是简单的“path”?

非常感谢,

路易吉

+0

的'r'path''问题是http://stackoverflow.com/questions/19065115/python-windows-path-slash - 在问之前你谷歌吗? – tripleee

+0

错误消息明确指出'/ usr/bin/muscle'失败。这对你的Python代码来说不是问题,因为它可能包含无效的假设。查看'肌肉'文档以找出它失败的原因 - 无论如何,如果没有访问失败的代码,我们无法辨别它的正确与否。 – tripleee

回答

0

您的代码似乎是正确的,并与小的比对工作。 137状态码可能与this question中的“Out Of Memory”内存有关。检查的最后一个内核消息以寻找像行命令dmesg

kernel: Out of memory: Kill process 52959 (java) score 164 or sacrifice child