2014年4月6日日曜日

MACSのインストール

HPはここhttp://liulab.dfci.harvard.edu/MACS/
右上のdownloadをクリック
ターミナルを開いてsrcに移動、Download version 1.4.2をドラッグアンドドロップ
cd src/
wget "https://github.com/downloads/taoliu/MACS/MACS-1.4.2-1.tar.gz"
--2014-04-06 13:55:08--  https://github.com/downloads/taoliu/MACS/MACS-1.4.2-1.tar.gz
github.com をDNSに問いあわせています... 192.30.252.128
github.com|192.30.252.128|:443 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 302 Found
場所: http://cloud.github.com/downloads/taoliu/MACS/MACS-1.4.2-1.tar.gz [続く]
--2014-04-06 13:55:09--  http://cloud.github.com/downloads/taoliu/MACS/MACS-1.4.2-1.tar.gz
cloud.github.com をDNSに問いあわせています... 54.230.27.179, 205.251.209.90, 205.251.209.218, ...
cloud.github.com|54.230.27.179|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 66569 (65K) [application/gzip]
`MACS-1.4.2-1.tar.gz' に保存中

100%[======================================>] 66,569      66.4K/s 時間 1.0s

2014-04-06 13:55:11 (66.4 KB/s) - `MACS-1.4.2-1.tar.gz' へ保存完了 [66569/66569]
次に解凍 .tar.gzなのでtar jxvfで解凍。-Cで解凍先を指定する。
tar zxvf MACS-1.4.2-1.tar.gz -C ../local/
解凍されたMACS-1.4.2-1ディレクトリに移動して、INSTALLファイルをみる
cd ../local/MACS-1.4.2-1
less INSTALL

* Prerequisite
Python version must be equal to 2.6 or 2.7 to run MACS. We recommend
using the version 2.6.5.

* Install under Debian or Ubuntu Linux system
The most convenient way to install MACS is through Debian APT system,
so that it can be perfectly integrated in the Python environment of
your operation system. You can easily manage the package, and the
uninstall is much easier. Download the deb package from MACS download
page, and type this in the commend line:

$ dpkg -i macs_1.4.0.deb

To uninstall, type:
$ dpkg -r macs_1.4.0

MACS uses Python's distutils tools for source installations. To
install a source distribution of MACS, unpack the distribution tarball
and open up a command terminal. Go to the directory where you unpacked
MACS, and simply run the install script :

$ python setup.py install

By default, the script will install python library and executable
codes globally, which means you need to be root or administrator of
the machine so as to complete the installation. Please contact the
administrator of that machine if you want their help. If you need to
provide a nonstandard install prefix, or any other nonstandard
options, you can provide many command line options to the install
script. Use the –help option to see a brief list of available options:

$ python setup.py --help

For example, if I want to install everything under my own HOME
directory, use this command:

$ python setup.py install --prefix /home/taoliu/

ようするにpython2.6か2.7が必要。Debian or Ubuntu Linux systemではdpkgというコマンドが使えるようだが、今の環境はCentOSなのでpython setup.py installを使う。prefixを使えば指定先にインストールできる。という事らしい。
python --version
Python 2.7.3
となったので問題ないかな。
python setup.py install --prefix /home/kosugi/local
と叩くと以下のようになり、Python2.7を使っているという事がわかる。
/usr/local/Python-2.7.3/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'console'
  warnings.warn(msg)
/usr/local/Python-2.7.3/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'app'
  warnings.warn(msg)
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/MACS14
copying lib/__init__.py -> build/lib/MACS14
copying lib/Constants.py -> build/lib/MACS14
copying lib/OptValidator.py -> build/lib/MACS14
copying lib/OutputWriter.py -> build/lib/MACS14
copying lib/PeakDetect.py -> build/lib/MACS14
copying lib/PeakModel.py -> build/lib/MACS14
copying lib/Prob.py -> build/lib/MACS14
creating build/lib/MACS14/IO
copying lib/IO/__init__.py -> build/lib/MACS14/IO
copying lib/IO/bedGraphIO.py -> build/lib/MACS14/IO
copying lib/IO/BinKeeper.py -> build/lib/MACS14/IO
copying lib/IO/FeatIO.py -> build/lib/MACS14/IO
copying lib/IO/Parser.py -> build/lib/MACS14/IO
copying lib/IO/WiggleIO.py -> build/lib/MACS14/IO
running build_scripts
creating build/scripts-2.7
copying and adjusting bin/macs14 -> build/scripts-2.7
copying and adjusting bin/elandmulti2bed -> build/scripts-2.7
copying and adjusting bin/elandresult2bed -> build/scripts-2.7
copying and adjusting bin/elandexport2bed -> build/scripts-2.7
copying and adjusting bin/sam2bed -> build/scripts-2.7
copying and adjusting bin/wignorm -> build/scripts-2.7
changing mode of build/scripts-2.7/macs14 from 644 to 755
changing mode of build/scripts-2.7/elandmulti2bed from 644 to 755
changing mode of build/scripts-2.7/elandresult2bed from 644 to 755
changing mode of build/scripts-2.7/elandexport2bed from 644 to 755
changing mode of build/scripts-2.7/sam2bed from 644 to 755
changing mode of build/scripts-2.7/wignorm from 644 to 755
running install_lib
creating /home/kosugi/local/lib
creating /home/kosugi/local/lib/python2.7
creating /home/kosugi/local/lib/python2.7/site-packages
creating /home/kosugi/local/lib/python2.7/site-packages/MACS14
copying build/lib/MACS14/__init__.py -> /home/kosugi/local/lib/python2.7/site-packages/MACS14
copying build/lib/MACS14/Constants.py -> /home/kosugi/local/lib/python2.7/site-packages/MACS14
copying build/lib/MACS14/OptValidator.py -> /home/kosugi/local/lib/python2.7/site-packages/MACS14
copying build/lib/MACS14/OutputWriter.py -> /home/kosugi/local/lib/python2.7/site-packages/MACS14
copying build/lib/MACS14/PeakDetect.py -> /home/kosugi/local/lib/python2.7/site-packages/MACS14
copying build/lib/MACS14/PeakModel.py -> /home/kosugi/local/lib/python2.7/site-packages/MACS14
copying build/lib/MACS14/Prob.py -> /home/kosugi/local/lib/python2.7/site-packages/MACS14
creating /home/kosugi/local/lib/python2.7/site-packages/MACS14/IO
copying build/lib/MACS14/IO/__init__.py -> /home/kosugi/local/lib/python2.7/site-packages/MACS14/IO
copying build/lib/MACS14/IO/bedGraphIO.py -> /home/kosugi/local/lib/python2.7/site-packages/MACS14/IO
copying build/lib/MACS14/IO/BinKeeper.py -> /home/kosugi/local/lib/python2.7/site-packages/MACS14/IO
copying build/lib/MACS14/IO/FeatIO.py -> /home/kosugi/local/lib/python2.7/site-packages/MACS14/IO
copying build/lib/MACS14/IO/Parser.py -> /home/kosugi/local/lib/python2.7/site-packages/MACS14/IO
copying build/lib/MACS14/IO/WiggleIO.py -> /home/kosugi/local/lib/python2.7/site-packages/MACS14/IO
byte-compiling /home/kosugi/local/lib/python2.7/site-packages/MACS14/__init__.py to __init__.pyc
byte-compiling /home/kosugi/local/lib/python2.7/site-packages/MACS14/Constants.py to Constants.pyc
byte-compiling /home/kosugi/local/lib/python2.7/site-packages/MACS14/OptValidator.py to OptValidator.pyc
byte-compiling /home/kosugi/local/lib/python2.7/site-packages/MACS14/OutputWriter.py to OutputWriter.pyc
byte-compiling /home/kosugi/local/lib/python2.7/site-packages/MACS14/PeakDetect.py to PeakDetect.pyc
byte-compiling /home/kosugi/local/lib/python2.7/site-packages/MACS14/PeakModel.py to PeakModel.pyc
byte-compiling /home/kosugi/local/lib/python2.7/site-packages/MACS14/Prob.py to Prob.pyc
byte-compiling /home/kosugi/local/lib/python2.7/site-packages/MACS14/IO/__init__.py to __init__.pyc
byte-compiling /home/kosugi/local/lib/python2.7/site-packages/MACS14/IO/bedGraphIO.py to bedGraphIO.pyc
byte-compiling /home/kosugi/local/lib/python2.7/site-packages/MACS14/IO/BinKeeper.py to BinKeeper.pyc
byte-compiling /home/kosugi/local/lib/python2.7/site-packages/MACS14/IO/FeatIO.py to FeatIO.pyc
byte-compiling /home/kosugi/local/lib/python2.7/site-packages/MACS14/IO/Parser.py to Parser.pyc
byte-compiling /home/kosugi/local/lib/python2.7/site-packages/MACS14/IO/WiggleIO.py to WiggleIO.pyc
running install_scripts
copying build/scripts-2.7/macs14 -> /home/kosugi/local/bin
copying build/scripts-2.7/elandmulti2bed -> /home/kosugi/local/bin
copying build/scripts-2.7/elandresult2bed -> /home/kosugi/local/bin
copying build/scripts-2.7/elandexport2bed -> /home/kosugi/local/bin
copying build/scripts-2.7/sam2bed -> /home/kosugi/local/bin
copying build/scripts-2.7/wignorm -> /home/kosugi/local/bin
changing mode of /home/kosugi/local/bin/macs14 to 755
changing mode of /home/kosugi/local/bin/elandmulti2bed to 755
changing mode of /home/kosugi/local/bin/elandresult2bed to 755
changing mode of /home/kosugi/local/bin/elandexport2bed to 755
changing mode of /home/kosugi/local/bin/sam2bed to 755
changing mode of /home/kosugi/local/bin/wignorm to 755
running install_egg_info
Writing /home/kosugi/local/lib/python2.7/site-packages/MACS-1.4.2-py2.7.egg-info
今回は、/home/kosugi/local/binにemacs14という実行ファイルとその他の実行ファイルが作られている。
elandexport2bed
elandmulti2bed
elandresult2bed
macs14
sam2bed
wignorm
INSTALLファイルにはOn Linux, using bash, I include the new value in my PYTHONPATH by adding this line to my ~/.bashrc となっているので
export PYTHONPATH=/home/kosugi/local/lib/python2.7/site-packages:$PYTHONPATH
と記述し再ログインして、macs14とコマンドを叩くと
Usage: macs14 <-t data-blogger-escaped-tfile=""> [-n name] [-g genomesize] [options]
Example: macs14 -t ChIP.bam -c Control.bam -f BAM -g h -n test -w --call-subpeaks
macs14 -- Model-based Analysis for ChIP-Sequencing
Options:
以下オプションの説明
となったのでインストール出来た。ヽ(゚∀゚)メ(゚∀゚)メ(゚∀゚)ノ 今回は、インストール先を自分の好きな場所にする事が出来た。--prefix 指定先とすると自動的にbinとlibというディレクトリが作られるようだ。 前もってbinを作ってPATHも通しておいた(ディレクトリの作成)ので、順調に進んだかな。ちゃんとreadmeやinstallといったファイルを見ながら確認してやれば結構敷居低いと感じた。これでChIP-seqの解析できるかな

0 件のコメント:

コメントを投稿