Problem with MACS2 Install?
3
0
Entering edit mode
9.3 years ago
priyasshah • 0

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 Python MACS2 • 13k views
ADD COMMENT
0
Entering edit mode

Try reinstalling the whole program, I am quite sure that this issue will be resolved, however, while installing I came up with an unknown error called Mac Error Code 43, any solution regarding this issue will be appreciated.

ADD REPLY
0
Entering edit mode

much easier way should be install it using conda:

conda install -c bioconda macs2

if you don't have conda, install conda like this way:

cd /gpfs/home/guosa/hpc/tools
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
sh Miniconda3-latest-Linux-x86_64.sh
ADD REPLY
1
Entering edit mode

Will move to comment as 1) issue is solved > 3 years back, 2) OP was using Mac not Linux and 3) OP was asking specifically about a PYTHONPATH issue, but not conda. You are posting absolute paths that are specific to your computer (here and in multiple previous posts including some tutorial-like posts), there is little use in doing that. Shicheng Guo you are a very experienced user and good input is always appreciated, but please be smarter about your posts.

ADD REPLY
1
Entering edit mode
9.3 years ago
priyasshah • 0

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 COMMENT
2
Entering edit mode
9.3 years ago

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 COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode
8.4 years ago
jimmy_zeng ▴ 90
## 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 COMMENT

Login before adding your answer.

Traffic: 2625 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6