WGLab / RepeatHMM

a hidden Markov model to infer simple repeats from genome sequences
Other
34 stars 14 forks source link

Installation issue #20

Closed MaestSi closed 5 years ago

MaestSi commented 5 years ago

Dear RepeatHMM developers, I just created a conda environment with python=2.7, installed the required python modules with pip install peakutils==1.0.3 hmmlearn sklearn biopython, and installed the other required dependencies (swig, make, trf, samtools and bwa); then went to bin/scripts/UnsymmetricPairAlignment and typed make.

However, when typing python repeatHMM.py -h, it gives error:

Traceback (most recent call last): File "repeatHMM.py", line 17, in from scripts import myBAMhandler File "/home/simone/MinION/software/RepeatHMM/bin/scripts/myBAMhandler.py", line 25, in import myHMM File "/home/simone/MinION/software/RepeatHMM/bin/scripts/myHMM.py", line 5, in from hmmlearn import hmm File "/home/simone/miniconda3/envs/RepeatHMM_env/lib/python2.7/site-packages/hmmlearn-0.2.1-py2.7-linux-x86_64.egg/hmmlearn/hmm.py", line 16, in ImportError: cannot import name distribute_covar_matrix_to_match_covariance_type

Any guesses about how to solve the issue? Thanks in advance, Simone

liuqianhn commented 5 years ago

Hi @MaestSi , it seems that there are issues during the installation of hmmlearn. My version of hmm-learn is "hmmlearn-0.2.0-py2.7.egg-info" and there is no issue. I have no idea what is going on for the importError now. Do you mind to install the version I installed to see what happens?

MaestSi commented 5 years ago

I tried with pip install hmmlearn==0.2.0 and the hmmlearn module seems to be correctly installed. However, when typing: (RepeatHMM_env) simone@r910-ddlab:~/MinION/software/RepeatHMM/bin$ python repeatHMM.py -h The error changed to:

Traceback (most recent call last): File "repeatHMM.py", line 17, in from scripts import myBAMhandler File "/home/simone/MinION/software/RepeatHMM/bin/scripts/myBAMhandler.py", line 25, in import myHMM File "/home/simone/MinION/software/RepeatHMM/bin/scripts/myHMM.py", line 5, in from hmmlearn import hmm File "/home/simone/miniconda3/envs/RepeatHMM_env/lib/python2.7/site-packages/hmmlearn/hmm.py", line 15, in from sklearn.mixture import ( ImportError: cannot import name GMM

I also pip installed GMM and it looked like successfully installed, but the error message was still there. However, when tried to import gmm inside python, it complained about NetworkX package being absent. I pip installed networkx, and can now import the gmm module into python, however the RepeatHMM.py error message didn't change. Thanks; Simone

liuqianhn commented 5 years ago

Hi @MaestSi , could you please run from hmmlearn import hmm in python to see whether there is any error?

MaestSi commented 5 years ago

Here it is: >>> from hmmlearn import hmm

Traceback (most recent call last): File "", line 1, in File "/home/simone/miniconda3/envs/RepeatHMM_env/lib/python2.7/site-packages/hmmlearn/hmm.py", line 15, in from sklearn.mixture import ( ImportError: cannot import name GMM

It looks like the python module that is installed with pip install GMM can be imported into python only with lower case name, i. e. import gmm. Could it be the reason for not being able to properly import it? Simone

liuqianhn commented 5 years ago

Hi @MaestSi , could you please try to install hmmlearn and gmm in conda so that whether you can solve the issue?

MaestSi commented 5 years ago

Hi @liuqianhn , conda install hmmlearn solved the issue! Thanks, Simone