1. What is CompMethylationAnalysis?

CompMethylationAnalysis is a program that compares two DNA methylome datasets. It create plots comparing depth of reads and methylation rates, between the two datasets. This program is intended for use with whole-genome bisulfite sequencing (WGBS) data.


2. How to use CompMethylationAnalysis

CompMethylationAnalysis uses two graph files for its calculation. So, before using CompMethylationAnalysis,  you have to prepare two graph files with MPTC.

A typical command is as following.

>CompMethylationAnalysis -context all -species human -revision hg19_lambda -graph A.graph B.graph -methyl result.methyl.png -cover result.cover.png

After completion of the command, three files (i.e. "result.methyl.png", "result.cover.png" in the example above ).

Command line options for CompMethylationAnalysis

Option Value type Descriptions
-species string Species [required]
-revision string Revision [required]
-binseq string Binseq file, exclusive with the combination of -species and -revision
-graph strings Pair of graph file for methylation perspective track [required]
-bed string Path to BED file that specify the regions to be analyzed
-window integer Size of window for calculation of average methylation rates [default=1]
-step integer Step size for moving window [default=1]
-read integer Minimum read number for calculation of methylation rate. (optional) [default=10]
-num_c integer Number of cytosines to calculate average methylation rate for window-based analysis (optional) [default=1]
-context string Context of cytosines from {all, CG, CHG, CHH}]. Default is all cytosines (optional) [default="all"]
-min_r1 real Minimum methylation value for data 1 (value from 0 to 1)(optional)[default=0]
-max_r1 real Maximum methylation value for data 1 (value from 0 to 1)(optional)[default=1]
-min_r2 real Minimum methylation value for data 2 (value from 0 to 1)(optional)[default=0]
-max_r2 real Maximum methylation value for data 2 (value from 0 to 1)(optional)[default=1]
-scale integer Upper limit for image scaling (values larger than 0) (optional) [default=10]
-depth integer Upper limit for read depth to be shown in a chart (values larger than 0) (optional) [default=300]
-methyl string Name for output file for comparison of methylation [default="mout.png"]
-cover string Name for output file for comparison of coverage [default="rout.png"]
-thermal string Name for color-scaled output file (created only when it is specified)
-log string Name for log file (created only when it is specified)

3. How to compile CompMethylationAnalysis

CompMethylationAnalysis is coded with the C++ library Qt, you can compile and use it on the platforms supported by Qt. The source code is available from here.

Once you correctly install Qt in your system, you can easily compile the source codes. After extraction of the source codes to an appropriate directory, change working directory to the directory and type the following commands.

>qmake CompMethylationAnalysis.pro
>make (or nmake for Visual Studio on Windows)

After completion of the commands, you can find an executable file in the directory named "bin" located at the same layer with the directory of the source code.


4. A Notice for running CompMethylationAnalysis in CUI environment

CompMethylationAnalysis uses functions provided by an open source library QCustomPlot. Since  QCustomPlot requires X-window system, CompMethylationAnalysis needs both a X-server process and a correct environment variable "DISPLAY". If CompMethylationAnalysis can not find X-window system, an error message will be shown.

>CompMethylationAnalysis : cannot connect to X server localhost:10.0

To solve this, we use virtual X11 display server Xvfb. After installing Xvfb appropreately, we type following command to launch Xvfb.

>Xvfb :1 -screen 0 1024x768x24 1>/dev/null 2>/dev/null &

Then set an environment variable "DISPLAY" with typing following command.

>export DISPLAY=:1.0

After completion of runnning CompMethylationAnalysis, the Xvfb process can be killed as following.

>kill $

5. Precompiled executables

For your convenience, executable files are prepared as follows.

Platform compiled (Qt version) Link
Windows, 64-bit (Qt5.1) CompMethylationAnalysis-v1.0-win64.zip
Linux CentOS 5 , 64-bit (Qt4.7) CompMethylationAnalysis-v1.0-linux-centos64.tar.gz