Question: help with MACS2 installation errors
0
gravatar for g.sathish.k
5 weeks ago by
g.sathish.k0 wrote:

I have been trying to install macs2 to run some jobs on hpc server, but still failing after multiple attempts to install. I used "pip install MACS2" and this is the error I get:

tommy35@hpc-login3:~/project/NGStools pip install MACS2
Collecting MACS2
Requirement already satisfied: numpy>=1.6 in /auto/rcf-40/tommy35/.local/lib/python2.7/site-packages (from MACS2)
Installing collected packages: MACS2
Exception:
Traceback (most recent call last):
  File "/home/rcf-40/tommy35/.local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/home/rcf-40/tommy35/.local/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/home/rcf-40/tommy35/.local/lib/python2.7/site-packages/pip/req/req_set.py", line 784, in install
    **kwargs
  File "/home/rcf-40/tommy35/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/home/rcf-40/tommy35/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "/home/rcf-40/tommy35/.local/lib/python2.7/site-packages/pip/wheel.py", line 345, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/home/rcf-40/tommy35/.local/lib/python2.7/site-packages/pip/wheel.py", line 316, in clobber
    ensure_dir(destdir)
  File "/home/rcf-40/tommy35/.local/lib/python2.7/site-packages/pip/utils/__init__.py", line 83, in ensure_dir
    os.makedirs(path)
  File "/usr/lib64/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/usr/lib64/python2.7/site-packages/MACS2'
You are using pip version 9.0.3, however version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

I can't do 'sudo' since I am on hpc and I don't have permission to do that.

Is manually installing MACS2 in my home directory the only option?

Thank you for time and suggestions.

pip install macs2 hpc • 149 views
ADD COMMENTlink modified 5 weeks ago • written 5 weeks ago by g.sathish.k0
1

I edited your post to format the output as code. You can do this by either indenting 4 spaces, or highlighting and pressing the code button (the one with the 1010) in the tool bar.

ADD REPLYlink written 5 weeks ago by i.sudbery4.3k

Awesome! Thanks so much. I will follow the formatting for my future posts

ADD REPLYlink written 5 weeks ago by g.sathish.k0
2
gravatar for i.sudbery
5 weeks ago by
i.sudbery4.3k
Sheffield, UK
i.sudbery4.3k wrote:

You have several options:

1) You could try installing with pip install MACS2 --user

2) You could create a virtual environment and install MACS2 in that with pip install MACS2

3) Download and install conda (which you can do into your home dir) and then install using conda from the bioconda channel.

Personally, if you are on a HPC do bioinformatics I recommend using conda. It will make it easy to install many bioinformatics packages. Whats more, the world is going over to python 3, but MACS2 requires python 2. This isn't a problem at the moment because your HPC appears to default to python2, but this will likely change. With conda, you can give MACS2 its own environment, and keep it, its dependencies, and python 2 isolated from whatever the wider environment is going to is.

However, that might be a big change in how you work and pip install --user MACS2 is simple.

ADD COMMENTlink modified 5 weeks ago • written 5 weeks ago by i.sudbery4.3k

I previously tried "pip install MACS2 --user" and it successfully installed, but couldn't call the package as shown below.

tommy35@hpc-login3:~ pip show macs2
Name: MACS2
Version: 2.1.2
Summary: Model Based Analysis for ChIP-Seq data
Home-page: http://github.com/taoliu/MACS/
Author: Tao Liu
Author-email: vladimir.liu@gmail.com
License: UNKNOWN
Location: /auto/rcf-40/tommy35/.local/lib/python2.7/site-packages
Requires: numpy

tommy35@hpc-login3:~ macs2
-bash: macs2: command not found

ThenI added the following to my bashrc file , even though I didn't have to.. And I am still not able to call macs2

export PYTHONPATH=/auto/rcf-40/tommy35/.local/lib/python2.7/site-packages/:$PYTHONPATH
export PATH=$HOME/bin/:$PATH
ADD REPLYlink modified 5 weeks ago • written 5 weeks ago by g.sathish.k0
1

I think pip --user puts the binaries under ~/.local/bin rather than $HOME/bin, so try the following in your .bashrc

export PATH=$HOME/.local/bin:$PATH
ADD REPLYlink written 5 weeks ago by i.sudbery4.3k

I didn't try this, but I ended up uninstalling and doing the manual install which was much less work than what I anticipated. I really appreciate your suggestions.

ADD REPLYlink written 5 weeks ago by g.sathish.k0
0
gravatar for g.sathish.k
5 weeks ago by
g.sathish.k0 wrote:

For others running into same issue, if none of the above suggestions work, then try manual installation as shown here : https://github.com/taoliu/MACS/wiki/Install-macs2#manually-install-python-software-to-your-home-directory

In short this is how I did,

  1. Add the following into bashrc file

    $ export PYTHONPATH=$HOME/lib/python2.7/site-packages/:$PYTHONPATH

    $ export PATH=$HOME/bin/:$PATH

    make sure to source bashrc after you have added the above lines

  2. I downloaded MACS2 and numpy into my desired working directory from below : https://pypi.org/project/numpy/#files https://pypi.org/project/MACS2/

  3. Next install the two downloaded packages, starting with numpy by going into their respective folders $ python setup.py install --prefix=$HOME

Hope this helps!

ADD COMMENTlink written 5 weeks ago by g.sathish.k0
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: 764 users visited in the last hour