Question: Problem with MACS2 Install?
0
gravatar for priyasshah
4.0 years ago by
priyasshah0
United States
priyasshah0 wrote:

I have Python (2.7.10) on my Mac. I installed MACS2 for ChIP-seq peak calling. However I think my install is not complete or my PYTHONPATH is not point to the correct place. When I try to call macs2  I get the following error:

otp588935ots:~ Priya$ macs2 callpeak -t ChIP.bam -c Control.bam -f BAM -g hs -n test -B -q 0.01

-bash: macs2: command not found

I have set my PYTHONPATH and PATH to these values in my .bashrc:

export PYTHONPATH=/Library/Python/2.7/site-packages:$PYTHONPATH
export PATH=/bin:$PATH

When I try repeating the install (using pip or from source code) I find that it is already installed in the following location:

otp588935ots:~ Priya$ sudo -H pip install MACS2

Requirement already satisfied (use --upgrade to upgrade): MACS2 in /Library/Python/2.7/site-packages

Requirement already satisfied (use --upgrade to upgrade): numpy>=1.6 in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from MACS2)

 

Am I pointing to the wrong PATH/PYTHONPATH? Any thoughts would be greatly appreciated! Thank you!

 

chip-seq macs2 python • 3.8k views
ADD COMMENTlink modified 3.1 years ago by jimmy_zeng90 • written 4.0 years ago by priyasshah0
1
gravatar for priyasshah
4.0 years ago by
priyasshah0
United States
priyasshah0 wrote:

Update, I originally assumed that I needed to set the PYTHONPATH because MACS2 is a PYTHON package. I didn't see it automatically added to my PATH, so I added this PATH to my .bash_profile:
export PATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin:$PATH

Now the macs2 command works fine! Thanks so much for your input!

ADD COMMENTlink written 4.0 years ago by priyasshah0
2
gravatar for geek_y
4.0 years ago by
geek_y9.8k
Barcelona
geek_y9.8k wrote:

As you are installing with sudo, it should have been already added to PATH. You don't need to set the PATH. and moreover macs2 will not be in site-packages, it will reside in one of the bin directories. Just find out where is the macs2 file residing.

sudo find / -name macs2
ADD COMMENTlink modified 4.0 years ago • written 4.0 years ago by geek_y9.8k

Thanks for your response, Goutham! I reset my .bash_profile to not execute the .bashrc. And this is what I get when I look at my PATH now:

otp588416ots:~ Priya$ echo $PATH
/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin

otp588416ots:~ Priya$ echo $PYTHONPATH
*nothing*

Now, when I try to call macs2, I still get the same error. So it seems as though I am still not in the right place when I call macs2:

otp588416ots:~ Priya$ macs2 callpeak -t ChIP.bam -c Control.bam -f BAM -g hs -n test -B -q 0.01
-bash: macs2: command not found

It looks like macs2 could be in several locations (maybe from the multiple install attempts?). This is what I got when I used the find command to locate macs2:

otp588416ots:~ Priya$ sudo find / -name macs2
Password:
find: /dev/fd/3: Not a directory
find: /dev/fd/4: Not a directory
/Library/Python/2.7/site-packages/MACS2-2.1.0.20150731/bin/macs2
/Library/Python/2.7/site-packages/MACS2-2.1.0.20150731/build/scripts-2.7/macs2
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/macs2
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/MACS2-2.1.0.20150731/bin/macs2
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/MACS2-2.1.0.20150731/build/scripts-2.7/macs2

I get the same error when I call macs2 after setting the PYTHONPATH to:

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin

Any additional thoughts?

ADD REPLYlink written 4.0 years ago by priyasshah0

Update, I originally assumed that I needed to set the PYTHONPATH because MACS2 is a PYTHON package. I didn't see it automatically added to my PATH, so I added this PATH to my .bash_profile:
export PATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin:$PATH

Now the macs2 command works fine! Thanks so much for your input!

ADD REPLYlink written 4.0 years ago by priyasshah0
0
gravatar for jimmy_zeng
3.1 years ago by
jimmy_zeng90
University of Macau
jimmy_zeng90 wrote:

Download and install macs2

// https://pypi.python.org/pypi/MACS2/

cd ~/biosoft
mkdir macs2 &&  cd macs2
wget  ~~~~~~~~~~~~~~~~~~~~~~MACS2-2.1.1.20160309.tar.gz
tar zxvf MACS2-2.1.1.20160309.tar.gz
cd MACS2-2.1.1.20160309
python setup.py install --user

Then you can use it by : ~/.local/bin/macs2 --help

ADD COMMENTlink written 3.1 years ago by jimmy_zeng90
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: 1449 users visited in the last hour