我正在研究生物信息學項目,並試圖在python 2.7中運行一個名爲pycogent的模塊。我的目標是從由對齊的16s Fastq序列組成的文件創建一個祖先序列。如何使用pycogent在Python 2.7中創建祖先序列?
我的Python代碼如下:
from cogent import LoadSeqs
aln = LoadSeqs('FullStrep.fasta')
lf.setAlignment(aln)
lf.optimise(show_progress=False, local=True)
ancestors = lf.likelyAncestralSeqs()
print ancestors
不過,我收到以下錯誤消息。
Traceback (most recent call last):
File "/Users/paulfryling/Desktop/Mypythonproj/pycogentancestor", line 1, in <module>
from cogent import LoadSeqs
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/cogent/__init__.py", line 5, in <module>
import numpy
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/__init__.py", line 137, in <module>
import add_newdocs
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/add_newdocs.py", line 9, in <module>
from numpy.lib import add_newdoc
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/lib/__init__.py", line 4, in <module>
from type_check import *
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/lib/type_check.py", line 8, in <module>
import numpy.core.numeric as _nx
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/__init__.py", line 5, in <module>
import multiarray
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/multiarray.so, 2): no suitable image found. Did find:
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/multiarray.so: no matching architecture in universal wrapper
>>>
任何幫助或方向將非常感激。
最好的問候,
保羅
它看起來並不像我這樣與'pycogent'有關,而是用'numpy'安裝,而不是這個版本的32/64位問題。你能否成功地從控制檯導入numpy? – DSM
我認爲你是正確的關於numpy未被正確安裝,導入numpy不能從控制檯工作。我得到了安裝QIIME VirtualBox作爲解決方法的幫助,但只有很少的Ubuntu體驗,我在QIIME虛擬框中運行我的python程序時遇到了困難。 – Pfryling
雖然QIIME虛擬盒子像魅力一樣工作,但我遇到的問題是pycogent能夠讀取我的序列。我收到以下錯誤消息: – Pfryling