Question: problems with macs2 installation
0
gravatar for Lila M
2.2 years ago by
Lila M 460
UK
Lila M 460 wrote:

Hi, I'm trying to install macs2. After set the path and python path, I've tried to run macs2 and I have the following error message

Traceback (most recent call last):
  File "/home/projas/MACS2-2.1.1.20160309/bin/macs2", line 31, in <module>
    from MACS2.Constants import *
ImportError: No module named 'MACS2'

does anyone know whats going on?

Thanks!

chip-seq • 1.7k views
ADD COMMENTlink modified 2.2 years ago by RamRS20k • written 2.2 years ago by Lila M 460
1

Is it possible to use the Anaconda package manager to install?

Simply download Anaconda, and then do conda install -c bioconda macs2

ADD REPLYlink written 2.2 years ago by Sinji2.8k

Thanks, it totally works now!

ADD REPLYlink written 2.2 years ago by Lila M 460

I'm not familiar with the software, but it looks like a standard python error where it can't find your modules. Which installation approach did you use?

ADD REPLYlink written 2.2 years ago by jonasmst280

I've used that:

$ pip install -U --no-deps MACS2

And after that I set my PYTHONPATH and PATH as follow:

$ export PYTHONPATH=$HOME/lib/python2.7/site-packages/:$PYTHONPATH
$ export PATH=$HOME/bin/:$PATH
ADD REPLYlink modified 2.2 years ago by RamRS20k • written 2.2 years ago by Lila M 460
1

Hmm, what's the output if you run pip show MACS2? And also, what is the output of python -c "import sys; print sys.path"? We want to see if the path to the MACS2 directory is in your python path. It seems like your python is currently not looking for the module in the right place.

ADD REPLYlink modified 2.2 years ago • written 2.2 years ago by jonasmst280

for pip show MACS2

Location: /home/projas/MACS2-2.1.1.20160309

and for python -c import sys; print sys.path

 File "<string>", line 1
    import
         ^
SyntaxError: invalid syntax
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%{ <-- HERE (.*?)}/ at /usr/bin/print line 528.
Error: no such file "sys.path"

is the error here?

Thank you

ADD REPLYlink modified 2.2 years ago by RamRS20k • written 2.2 years ago by Lila M 460

No sorry, did you remember the quotation marks on the last one? python -c "import sys; print sys.path"

ADD REPLYlink written 2.2 years ago by jonasmst280

Sorry,

['', '/usr/local/lib/python2.7/site-packages', '/home/projas/MACS2-2.1.1.20160309', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages']
ADD REPLYlink modified 2.2 years ago by RamRS20k • written 2.2 years ago by Lila M 460
1

Ok, what's the output of this command: python -c "from MACS2.Constants import *; print MACS_VERSION"?

ADD REPLYlink written 2.2 years ago by jonasmst280

It says:

No module named MACS2.Constants

any clues?

ADD REPLYlink modified 2.2 years ago by RamRS20k • written 2.2 years ago by Lila M 460
1

Yes, the python you're using to run MACS can't see the MACS directory. Try this: export PYTHONPATH=/home/projas/MACS2-2.1.1.20160309/:$PYTHONPATH. To check if it works, then try python -c "from MACS2.Constants import *; print MACS_VERSION" again. What is the output now?

ADD REPLYlink modified 2.2 years ago • written 2.2 years ago by jonasmst280

Lila M : Please use ADD REPLY/ADD COMMENT when responding to existing posts to keep threads logically organized.

ADD REPLYlink modified 2.2 years ago • written 2.2 years ago by genomax63k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2499 users visited in the last hour