1)下载MACS2
$ python setup.py install
出现如下问题:
MACS2/cProb.c -o error: #error Do not use this file, it is the result of a failed Cython compilation.
error: command 'gcc' failed with exit status 1.
后来更新了gcc(见我的日志 《Ubuntu安装与更新GCC》),安装了gcc4.7.0,同样运行了1),结果同样!(由于MACS2对一些软件的配置版本比较新,所以我对可能需要的用到的东西都进行了升级,换言之,也许更新gcc4.7.0并不能解决问题)
在网上查到一个资料,说需要的Cython版本应该>=0.14.1(https://github.com/taoliu/MACS/issues/3)。
出现如下问题:
MACS2/cProb.c -o error: #error Do not use this file, it is the result of a failed Cython compilation.
error: command 'gcc' failed with exit status 1.
后来更新了gcc(见我的日志 《Ubuntu安装与更新GCC》),安装了gcc4.7.0,同样运行了1),结果同样!(由于MACS2对一些软件的配置版本比较新,所以我对可能需要的用到的东西都进行了升级,换言之,也许更新gcc4.7.0并不能解决问题)
在网上查到一个资料,说需要的Cython版本应该>=0.14.1(https://github.com/taoliu/MACS/issues/3)。
2)安装Cython
在网上下载Cython0.16,运行命令行:
$ sudo apy-get install python-dev
$ cd Cython-0.16/
$ sudo python setup.py install
3) 安装 MACS2
$ cd MACS-2.0.9
$ sudo python setup.py install
4) 使用MACS2
macs2 [-h] [--version]
{callpeak,filterdup,bdgpeakcall,bdgcmp,randsample,bdgdiff,bdgbroadcall}
Example for regular peak calling: | |
---|---|
python2.7 macs2 callpeak -t ChIP.bam -c Control.bam -f BAM -g hs -n fileprefix -B -q 0.01 | |
Example for broad peak calling: | |
python2.7 macs2 callpeak -t ChIP.bam -c Control.bam --broad -g hs --broad-cutoff 0.1 |
There are seven major functions available in MACS serving as sub-commands.
callpeak: | Main MACS2 Function to Call peaks from alignment results. |
---|---|
bdgpeakcall: | Call peaks from bedGraph output. |
bdgbroadcall: | Call broad peaks from bedGraph output. |
bdgcmp: | Deduct noise by comparing two signal tracks in bedGraph. |
bdgdiff: | Differential peak detection based on paired four bedgraph files. |
filterdup: | Remove duplicate reads at the same position, then convert acceptable format to BED format. |
predictd: | Predict d or fragment size from alignment results. |
pileup: | Pileup aligned reads with a given extension size (fragment size or d in MACS language). Note there will be no step for duplicate reads filtering or sequencing depth scaling, so you may need to do certain post- processing. |
randsample: | Randomly sample number/percentage of total reads. |
refinepeak: | (Experimental) Take raw reads alignment, refine peak summits and give scores measuring balance of forward- backward tags. Inspired by SPP. |
详细参数说明:
https://pypi.python.org/pypi/MACS2 (有下载网址和安装、使用示例)
REF
http://lwzhanghz.blog.163.com/blog/static/136826369201251783236887/