-
Notifications
You must be signed in to change notification settings - Fork 271
Install macs2
Tao Liu (τν) edited this page May 4, 2015
·
32 revisions
MACS2 can be found at PyPI website https://pypi.python.org/pypi/MACS2/ (more stable release) or at GitHub https://github.com/taoliu/MACS/ (developmental version)
A *nix system including Linux, Mac OSX and other *nix variants
- Python 2.7 (Note that Python 2.7.4 has a bug which causes error while reading compressed BAM file'. Fix it according to this report in MACS user group. This bug has been fixed in Python 2.7.5 which was released on 5/12/2013.')
- Numpy, and Scipy (I recommend you install your own through rpm for Redhat variants or dpkg for Debian variant linux, or install from source code. Although if you are lucky, you can let pip to fix the dependancies. Check the next section.)
- GCC compiler. As for Mac OSX users, it means you have to install Xcode then select 'install command line tools' within Xcode program. As a sidenote, current setup script for MACS2 needs GCC>=4.6 so that the optimization flag '-Ofast' can be accepted. If you have older version of GCC or saw an error complaining 'invalid option argument ‘-Ofast’', please manually download MACS2 source code and modify the 'setup.py' script to replace '-Ofast' with '-O3'.
- Follow this instruction to get pip if it's not available in your system. Note if you have already installed numpy and scipy system-wide, you can use 'virtualenv --system-site-packages' to let your virtual Python environment have access to system-wide numpy and scipy libraries so that you don't need to install them again.
- Under command line, type
$ pip install MACS2
PyPI will install Numpy and Scipy automatically if they are absent. - To upgrade, type
$ pip install -U MACS2
. It will check currently installed MACS2, compare the version with the one on PyPI repository, download and install new version while necessary. - Sometimes, you don't want pip to fix dependencies. For example, you already have a workable Scipy and Numpy, and when 'pip install -U MACS2', pip downloads newest Scipy and Numpy but unable to compile and install them. This will fail the whole installation. You can pass '--no-deps' option to pip and let it skip all dependencies. Type
$ pip install -U --no-deps MACS2
- Download source code package from MACS2 page on PyPI then follow the instruction in INSTALL file.
- Type
$ python setup.py install --prefix=/X/Y
- Fix environments PATH and PYTHONPATH while necessary.
- To install MACS2 globally is not always a good option, especially while you don't have permission to write to '/usr/' or /usr/local/', or you find the required Python library, Numpy, is not available in the system. Here are several options. Please use this instruction as a general guidance to install any Linux/Unix software to your own user space for full control.
- Manually install anything to your home directory
- The virtual environment