2016-09-21 25 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 
相關問題