WGLab / RepeatHMM

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

running RepeatHMM from virtual environment as suggested in issue 7 #25

Closed avitalsteiman closed 5 years ago

avitalsteiman commented 5 years ago

Hi I setup a virtual environment to run RepeatHMM with python2.7 as suggeted in issue 7, but when I run repeatHMM.py -h I get the following error:

Traceback (most recent call last): File "/home/git/RepeatHMM/bin/repeatHMM.py", line 17, in <module> from scripts import myBAMhandler File "/home/git/RepeatHMM/bin/scripts/myBAMhandler.py", line 24, in <module> import getAlignment File "/home/git/RepeatHMM/bin/scripts/getAlignment.py", line 7, in <module> from UnsymmetricPairAlignment import UnsymmetricPairAlignment File "/home/git/RepeatHMM/bin/scripts/UnsymmetricPairAlignment/UnsymmetricPairAlignment.py", line 28, in <module> _UnsymmetricPairAlignment = swig_import_helper() File "/home/git/RepeatHMM/bin/scripts/UnsymmetricPairAlignment/UnsymmetricPairAlignment.py", line 20, in swig_import_helper import _UnsymmetricPairAlignment ImportError: No module named _UnsymmetricPairAlignment Any ideas what could be the problem. Thanks, Avital

liuqianhn commented 5 years ago

Hi @avitalsteiman , do you go to "/home/git/RepeatHMM/bin/scripts/UnsymmetricPairAlignment" and type "make" to compile it?

avitalsteiman commented 5 years ago

Hi, Thanks for your response. You were correct. I did forget to use "make". However now when I try to run python repatHMM.py -h I get:

Traceback (most recent call last): File "repeatHMM.py", line 17, in from scripts import myBAMhandler File "/home/git/RepeatHMM/bin/scripts/myBAMhandler.py", line 25, in import myHMM File "/home/git/RepeatHMM/bin/scripts/myHMM.py", line 5, in from hmmlearn import hmm File "/home/miniconda3/envs/py27/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

Appreciate the help. Avital

liuqianhn commented 5 years ago

Hi @avitalsteiman , It seems that scikit-learn might not be installed. Could you please check whether you install scikit-learn or which version you installed? If you have no chance to install the dependent package yet, please refer to https://github.com/WGLab/RepeatHMM/blob/master/docs/Install.md.

liuqianhn commented 5 years ago

I also recommend you to read how to use conda to install dependent packages at https://github.com/WGLab/RepeatHMM/issues/7

avitalsteiman commented 5 years ago

I created another virtual environment and made sure to follow all the instructions from #7 https://github.com/WGLab/RepeatHMM/issues/7. I now receive this error: (pyth27)~/git/RepeatHMM/bin$ python repeatHMM.py -h Traceback (most recent call last): File "repeatHMM.py", line 17, in from scripts import myBAMhandler File "/home/git/RepeatHMM/bin/scripts/myBAMhandler.py", line 25, in

import myHMM File "/home/git/RepeatHMM/bin/scripts/myHMM.py", line 5, in from hmmlearn import hmm File "/home/miniconda3/envs/pyth27/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 I checked with conda list and the version of hmmlearn I have is: hmmlearn 0.3.0b np111py27_0 omnia Could this be the problem? Do you have a suggestion of how to fix this? Thanks, Avital On Mon, Oct 7, 2019 at 2:18 AM liuqianhn wrote: > I also recommend you to read how to use conda to install dependent > packages at #7 > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > , > or mute the thread > > . > --
liuqianhn commented 5 years ago

@avitalsteiman , my hmmlearn is hmmlearn 20151031 py27_1 bioconda. But I am not sure whether the error is related to this version. It could also be related to scikit-learn since the error occurs when import scikit-learn package. May I know your version of scikit-learn? My scikit-learn is scikit-learn 0.19.1 py27h445a80a_0

avitalsteiman commented 5 years ago

Hi, I changed my version of scikit-learn to the same as yours (before I had 0.20.3) and now it seems to work. Thanks for your help. Looking forward to using your tool. Avital

On Mon, Oct 7, 2019 at 4:21 PM liuqianhn notifications@github.com wrote:

@avitalsteiman https://github.com/avitalsteiman , my hmmlearn is hmmlearn 20151031 py27_1 bioconda. But I am not sure whether the error is related to this version. It could also be related to scikit-learn since the error occurs when import scikit-learn package. May I know your version of scikit-learn? My scikit-learn is scikit-learn 0.19.1 py27h445a80a_0

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/WGLab/RepeatHMM/issues/25?email_source=notifications&email_token=ALD3LRY3MQWDK72YSV6QY5DQNMZVHA5CNFSM4I47BPYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAQJU6Y#issuecomment-539007611, or mute the thread https://github.com/notifications/unsubscribe-auth/ALD3LR2RBCXVAUO4RRLD3FLQNMZVHANCNFSM4I47BPYA .

--

liuqianhn commented 5 years ago

@avitalsteiman , you are welcome and thank you for letting me which version of scikit-learn works. It seems that there is conflict for new packages.