Skip to content

Commit

Permalink
2.1.0 package. Revised testing scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
taoliu committed Jun 17, 2014
1 parent 97cb95a commit b85a265
Show file tree
Hide file tree
Showing 10 changed files with 91 additions and 51 deletions.
2 changes: 1 addition & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
2014-06-16 Tao Liu <[email protected]>
MACS version 2.0.10 20140616
MACS version 2.1.0 20140616 (tag:rc)

* callpeak module

Expand Down
4 changes: 2 additions & 2 deletions DEBIAN/builddeb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ python2.7 setup.py install --prefix=debian/usr/ --install-layout=deb
#for f in `ls debian/usr/bin/*.py`;do mv ${f} ${f/.py/};done
for f in `find debian/usr/lib/ -name '*.pyc'`;do rm -f ${f};done
fakeroot dpkg-deb --build debian
mv debian.deb macs2_2.0.10.deb
echo "finished!"
mv debian.deb macs2_2.1.0.deb
echo "finished!"
8 changes: 7 additions & 1 deletion DEBIAN/changelog
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
MACS (2.1.0)

* Version 2.1.0.

* Read the included ChangeLog for detail.

MACS (2.0.10)

* Read the included ChangeLog for detail.
* Read the included ChangeLog for detail.

* Made deb for macs2.

Expand Down
11 changes: 7 additions & 4 deletions DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Package: macs2
Version: 2.0.10
Version: 2.1.0
Priority: optional
Maintainer: Tao Liu <[email protected]>
Depends: python2.7, python2.7-numpy (>=1.3)
Depends: python2.7, python2.7-numpy (>=1.6)
Architecture: all
Suggests: bowtie, bwa, maq, peakanalyzer
Section: science
Homepage: http://liulab.dfci.harvard.edu/MACS/
Homepage: http://github.com/taoliu/MACS/
Tag: Science, Biology, Bioinformatics, ChIP-seq
Description: Model-based Analysis for ChIP-Seq
With the improvement of sequencing techniques, chromatin
Expand All @@ -26,5 +26,8 @@ Description: Model-based Analysis for ChIP-Seq
* Predict ChIP fragment size from + and - strand peaks from raw data
* Calculate local bias around ChIP peaks using a Poisson model.
* Allow multiple reads at the exact same position.
* Generate combined score track using Poisson CDF upper tail pvalue.
* Generate combined score track using Poisson CDF upper tail p/q-values, fold-enrichment and more.
* Support narrow and broad factor calling.
* Support Paired-End libraries.
* Support comparison between two conditions.
.
4 changes: 2 additions & 2 deletions DEBIAN/docs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
README
README.rst
ChangeLog
INSTALL
INSTALL.rst
COPYING
46 changes: 36 additions & 10 deletions INSTALL.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
======================
INSTALL Guide For MACS
======================
Time-stamp: <2012-04-28 12:54:45 Tao Liu>
Time-stamp: <2014-06-17 12:57:57 Tao Liu>

Please check the following instructions to complete your installation.

Expand All @@ -11,28 +11,54 @@ Prerequisites
Python version must be equal to *2.7* to run MACS. I recommend
using the version *2.7.2*.

Numpy_ (>=1.3.0) are required to run MACS v2.

.. _Numpy: http://www.scipy.org/Download
Numpy_ (>=1.6) are required to run MACS v2.

GCC is required to compile ``.c`` codes in MACS v2 package, and python
header files are needed. If you are using Mac OSX, I recommend you
install Xcode; if you are using Linux, you need to make sure
``python-dev`` is installed.

Cython_ (>=0.14.1) is required *only if* you want to regenerate ``.c``
Cython_ (>=0.18) is required *only if* you want to regenerate ``.c``
files from ``.pyx`` files using ``setup_w_cython.py`` script.

.. _Numpy: http://www.scipy.org/Download
.. _Cython: http://cython.org/

Easy installation through PyPI
==============================

The easiest way to install MACS2 is through PyPI system. 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.

Then under command line, type ```pip install MACS2```. PyPI will
install Numpy and Scipy automatically if they are absent.

To upgrade MACS2, type ```pip install -U MACS2```. It will check
currently installed MACS2, compare the version with the one on PyPI
repository, download and install newer version while necessary.

Note, if you do not 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```.

.. _pip: http://www.pip-installer.org/en/latest/installing.html


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
uninstallation is much easier. Download the *deb* package from MACS
download page, and type this in the commend line::
You can install MACS2 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 uninstallation is
much easier. Download the *deb* package from MACS download page, and
type this in the commend line::

$ dpkg -i macs_2.0.10.deb

Expand Down
2 changes: 1 addition & 1 deletion MACS2/Constants.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MACS_VERSION = "2.0.10.20140616"
MACS_VERSION = "2.1.0.20140616"
#MACSDIFF_VERSION = "1.0.4 20110212 (tag:alpha)"
FILTERDUP_VERSION = "1.0.0 20140616"
RANDSAMPLE_VERSION = "1.0.0 20120703"
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python
# Time-stamp: <2014-06-17 12:00:10 Tao Liu>
# Time-stamp: <2014-06-17 15:08:15 Tao Liu>

"""Description
Expand Down Expand Up @@ -57,7 +57,7 @@ def main():
]

setup(name="MACS2",
version="2.0.10.20140616",
version="2.1.0.20140616",
description="Model Based Analysis for ChIP-Seq data",
author='Tao Liu',
author_email='[email protected]',
Expand Down
4 changes: 2 additions & 2 deletions setup_w_cython.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python
# Time-stamp: <2014-06-17 11:59:57 Tao Liu>
# Time-stamp: <2014-06-17 15:11:17 Tao Liu>

"""Description:
Expand Down Expand Up @@ -84,7 +84,7 @@ def main():
]

setup(name="MACS2",
version="2.0.10.20140616",
version="2.1.0.20140616",
description="Model Based Analysis for ChIP-Seq data",
author='Tao Liu',
author_email='[email protected]',
Expand Down
57 changes: 31 additions & 26 deletions test/test.sh
Original file line number Diff line number Diff line change
@@ -1,71 +1,76 @@
python test_callsummits.py
macs2 callpeak -t random_test.bed -g 10000 -n random_test_CS --nomodel --extsize 150 --call-summits -B
macs2 callpeak -t random_test.bed -g 10000 -n random_test --nomodel --extsize 150
macs2 refinepeak -b random_test_CS_summits.bed -i random_test.bed -o random_test
bdg2bw random_test_CS_treat_pileup.bdg hg19.len
bedtools sort -i random_test.bed | bedtools bedtobam -i - -g hg19.len > random_test.bam
samtools index random_test.bam


# test all sub-commands

CHIP=ChIP_200K.bed.gz
CTRL=Control_200K.bed.gz

# callpeak
echo "callpeak"

macs2 callpeak -t $CHIP -c $CTRL -n run_callpeak_narrow -B --outdir run_callpeak_narrow
macs2 callpeak -t $CHIP -c $CTRL -n run_callpeak_broad -B --outdir run_callpeak_broad --broad
macs2 callpeak -t $CHIP -c $CTRL -n run_callpeak_narrow -B --outdir run_callpeak_narrow --call-summits &> run_callpeak_narrow/run_callpeak_narrow.log
macs2 callpeak -t $CHIP -c $CTRL -n run_callpeak_narrow2 -B --outdir run_callpeak_narrow --nomodel --extsize 100 &> run_callpeak_narrow/run_callpeak_narrow2.log
macs2 callpeak -t $CHIP -c $CTRL -n run_callpeak_narrow3 -B --outdir run_callpeak_narrow --nomodel --extsize 100 --shift -50 &> run_callpeak_narrow/run_callpeak_narrow3.log
macs2 callpeak -t $CHIP -c $CTRL -n run_callpeak_broad -B --outdir run_callpeak_broad --broad &> run_callpeak_broad/run_callpeak_broad.log

# bdgcmp
echo "bdgcmp"

macs2 bdgcmp -t run_callpeak_narrow/run_callpeak_narrow_treat_pileup.bdg -c run_callpeak_narrow/run_callpeak_narrow_control_lambda.bdg -m ppois FE --outdir run_bdgcmp_oprefix --o-prefix run_bdgcmp_oprefix
macs2 bdgcmp -t run_callpeak_narrow/run_callpeak_narrow_treat_pileup.bdg -c run_callpeak_narrow/run_callpeak_narrow_control_lambda.bdg -m ppois FE --outdir run_bdgcmp_oprefix --o-prefix run_bdgcmp_oprefix &> run_bdgcmp_oprefix/run_bdgcmp_oprefix.log

macs2 bdgcmp -t run_callpeak_narrow/run_callpeak_narrow_treat_pileup.bdg -c run_callpeak_narrow/run_callpeak_narrow_control_lambda.bdg -m ppois FE --outdir run_bdgcmp_ofile -o run_bdgcmp_ofile_ppois.bdg run_bdgcmp_ofile_FE.bdg
macs2 bdgcmp -t run_callpeak_narrow/run_callpeak_narrow_treat_pileup.bdg -c run_callpeak_narrow/run_callpeak_narrow_control_lambda.bdg -m ppois FE --outdir run_bdgcmp_ofile -o run_bdgcmp_ofile_ppois.bdg run_bdgcmp_ofile_FE.bdg &> run_bdgcmp_ofile/run_bdgcmp_ofile.log

# bdgpeakcall
echo "bdgpeakcall"

macs2 bdgpeakcall -i run_bdgcmp_single/run_bdgcmp_single_myFE.bdg -c 2 --outdir run_bdgpeakcall --o-prefix run_bdgpeakcall_w_prefix
macs2 bdgpeakcall -i run_bdgcmp_single/run_bdgcmp_single_myFE.bdg -c 2 --outdir run_bdgpeakcall --o-prefix run_bdgpeakcall_w_prefix &> run_bdgpeakcall/run_bdgpeakcall_w_prefix.log

macs2 bdgpeakcall -i run_bdgcmp_single/run_bdgcmp_single_myFE.bdg -c 2 --outdir run_bdgpeakcall -o run_bdgpeakcall_w_ofile.narrowPeak
macs2 bdgpeakcall -i run_bdgcmp_single/run_bdgcmp_single_myFE.bdg -c 2 --outdir run_bdgpeakcall -o run_bdgpeakcall_w_ofile.narrowPeak &> run_bdgpeakcall/run_bdgpeakcall_w_ofile.log

# bdgbroadcall
echo "bdgbroadcall"

macs2 bdgbroadcall -i run_bdgcmp_single/run_bdgcmp_single_myFE.bdg -c 4 -C 2 --outdir run_bdgbroadcall --o-prefix run_bdgbroadcall_w_prefix
macs2 bdgbroadcall -i run_bdgcmp_single/run_bdgcmp_single_myFE.bdg -c 4 -C 2 --outdir run_bdgbroadcall --o-prefix run_bdgbroadcall_w_prefix &> run_bdgbroadcall/run_bdgbroadcall_w_prefix.log

macs2 bdgbroadcall -i run_bdgcmp_single/run_bdgcmp_single_myFE.bdg -c 4 -C 2 --outdir run_bdgbroadcall -o run_bdgbroadcall_w_ofile.gappedPeak
macs2 bdgbroadcall -i run_bdgcmp_single/run_bdgcmp_single_myFE.bdg -c 4 -C 2 --outdir run_bdgbroadcall -o run_bdgbroadcall_w_ofile.gappedPeak &> run_bdgbroadcall/run_bdgbroadcall_w_ofile.log

# diffpeak

#NA

# bdgdiff
echo "bdgdiff"

macs2 callpeak -c $CHIP -t $CTRL -n run_callpeak_narrow_revert -B --outdir run_callpeak_narrow_revert
macs2 callpeak -c $CHIP -t $CTRL -n run_callpeak_narrow_revert -B --outdir run_callpeak_narrow_revert &> run_callpeak_narrow_revert/run_callpeak_narrow_revert.log

macs2 bdgdiff --t1 run_callpeak_narrow/run_callpeak_narrow_treat_pileup.bdg --c1 run_callpeak_narrow/run_callpeak_narrow_control_lambda.bdg --t2 run_callpeak_narrow_revert/run_callpeak_narrow_revert_treat_pileup.bdg --c2 run_callpeak_narrow_revert/run_callpeak_narrow_revert_control_lambda.bdg --o-prefix run_bdgdiff_prefix --outdir run_bdgdiff
macs2 bdgdiff --t1 run_callpeak_narrow/run_callpeak_narrow_treat_pileup.bdg --c1 run_callpeak_narrow/run_callpeak_narrow_control_lambda.bdg --t2 run_callpeak_narrow_revert/run_callpeak_narrow_revert_treat_pileup.bdg --c2 run_callpeak_narrow_revert/run_callpeak_narrow_revert_control_lambda.bdg --o-prefix run_bdgdiff_prefix --outdir run_bdgdiff &> run_bdgdiff/run_bdgdiff_w_prefix.log

macs2 bdgdiff --t1 run_callpeak_narrow/run_callpeak_narrow_treat_pileup.bdg --c1 run_callpeak_narrow/run_callpeak_narrow_control_lambda.bdg --t2 run_callpeak_narrow_revert/run_callpeak_narrow_revert_treat_pileup.bdg --c2 run_callpeak_narrow_revert/run_callpeak_narrow_revert_control_lambda.bdg -o cond1.bed cond2.bed common.bed --outdir run_bdgdiff
macs2 bdgdiff --t1 run_callpeak_narrow/run_callpeak_narrow_treat_pileup.bdg --c1 run_callpeak_narrow/run_callpeak_narrow_control_lambda.bdg --t2 run_callpeak_narrow_revert/run_callpeak_narrow_revert_treat_pileup.bdg --c2 run_callpeak_narrow_revert/run_callpeak_narrow_revert_control_lambda.bdg -o cond1.bed cond2.bed common.bed --outdir run_bdgdiff &> run_bdgdiff/run_bdgdiff_w_o_file.log

# filterdup
echo "filterdup"

macs2 filterdup -i $CHIP --outdir run_filterdup -o run_filterdup_result.bed --dry-run &> run_filterdup/run_filterdup_d.log

macs2 filterdup -i $CHIP --outdir run_filterdup -o run_filterdup_result.bed
macs2 filterdup -i $CHIP --outdir run_filterdup -o run_filterdup_result.bed &> run_filterdup/run_filterdup.log

# predictd
echo "predictd"

macs2 predictd -i $CHIP --outdir run_predictd --rfile run_predictd.R
macs2 predictd -i $CHIP --outdir run_predictd --rfile run_predictd.R &> run_predictd/run_predictd.log

# pileup
echo "pileup"

macs2 pileup -i $CHIP --outdir run_pileup -o run_pileup.bdg
macs2 pileup -i $CHIP --outdir run_pileup -o run_pileup.bdg &> run_pileup/run_pileup.log

# randsample
echo "randsample"

macs2 randsample -t $CHIP -n 100000 --seed 31415926 --outdir run_randsample -o run_randsample.bed
macs2 randsample -t $CHIP -n 100000 --seed 31415926 --outdir run_randsample -o run_randsample.bed &> run_randsample/run_randsample.log

# refinepeak
echo "refinepeak"

macs2 refinepeak -b run_callpeak_narrow/run_callpeak_narrow_peaks.narrowPeak -i $CHIP --outdir run_refinepeak --o-prefix run_refinepeak_w_prefix
macs2 refinepeak -b run_callpeak_narrow/run_callpeak_narrow_peaks.narrowPeak -i $CHIP --outdir run_refinepeak --o-prefix run_refinepeak_w_prefix &> run_refinepeak/run_refinepeak_w_prefix.log

macs2 refinepeak -b run_callpeak_narrow/run_callpeak_narrow_peaks.narrowPeak -i $CHIP --outdir run_refinepeak -o run_refinepeak_w_ofile.bed
macs2 refinepeak -b run_callpeak_narrow/run_callpeak_narrow_peaks.narrowPeak -i $CHIP --outdir run_refinepeak -o run_refinepeak_w_ofile.bed &> run_refinepeak/run_refinepeak_w_ofile.log

0 comments on commit b85a265

Please sign in to comment.