CGmapTools
CGmapTools

(40 functions for CGmap-oriented DNA methylation analyses)


  • Home

  • Tutorial

  • Source Code

  • Release log

  • Quick Start

  • Chinese

  • Q&A

Questions and Answers

For users of CGmapTools

  • Any question or suggest or feedback is welcome!
  • Feel free to write to us! Your emails encourage us to improve the package.
  • We keep on updating selected and well-organized Q&A on this page.
  • We welcome your evolvment/submission if you are interested to improve the code throught github.

Content

  1. CGmap format
    • 1.1 Generate CGMapfiles from BAM files
    • 1.2 CGmap format by BS-Seeker2 and CGmapTools
    • 1.3 merge multiple CGmap files
  2. Installation
    • 2.1 R program error “optparse”
  3. Differientially methylated region
    • 3.1 DMR analysis when serveral replicates
    • 3.1 DMR analysis when lots of replicates
    • 3.3 annotate DMRs

Questions and Answers

1. CGmap format

1.1 Generate CGmap files from BAM files

Question (by Zhao, Sep. 13th, 2017)

Can I use cgmaptools convert bam2cgmap to generate CGmap files from the BAM files generated by BSMAP?

Answer

BS-Seeker2, Bismark and BSMAP are the mainstream aligners for BS-seq data. We designed CGmapTools to be more general as a downstream analysis pipeline.

From our test, CGmapTools works in right-way for the BAM files generated by both BS-Seeker2 and Bismark.

However, it shows strange result for the BAM file BSMAP when generating ATCGmap files. It is not suggest to directly feed the BAM of BSMAP to CGmapTools currently.

Let us know if you have good solution.

1.2 CGmap format by BS-Seeker2 and CGmapTools

Question (by Fan, Mar. 5th, 2017)

Here I know the BS-Seeker2 and CGmapTools both can get the ATCGmap file and CGmap file. Are they the same file?

Answer

The file format is consistent between two softwares.

  • BS-Seeker2 is implemented in python (depend on pysam package).
  • CGmapTools implemented generating of CGmap from BAM in C language, which would be significantly faster for large genome. Also, CGmapTools supported the BAM files being generated by Bismark.

1.3 merge multiple CGmap files

Question (by Jingyuan, Sep. 18th, 2017)

How could I merge multiple CGmap files using CGmapTools?

Answer

You can try two ways using CGmapTools:
The 1st way:

cgmaptools merge2 cgmap -1 A.CGmap.gz -2 B.CGmap.gz | cgmaptools merge2 cgmap -1 C.CGmap.gz | cgmaptools merge2 cgmap -1 D.CGmap.gz -o ABCD_merged.CGmap.gz

The 2nd way:

cgmaptools mergelist tosingle -i A.CGmap.gz,B.CGmap.gz,C.CGmap.gz,D.CGmap.gz -f cgmap -o ABCG_merged.CGmap.gz

Both works well. For two samples, cgmaptools merge2 cgmap has better computational efficiency.

2. Installation

2.1 R program error “optparse”

Question (by Zhao, Sep. 13th, 2017)

As the package optparse is required when running cgmaptools lollipop, I use install.packages("optparse) in R enviroment, but encounter the following error message
package \'optparse\' is not available (for R version x.x.x)

Answer

You can try to download the optparse to your local computer, and use install.packages to install the library locally.

3. Differientially methylated region

3.1 DMR analysis with several replicates

Question (by Christelle, Aug. 1st, 2017)

How could I used the DMR analysis function in CGmapTools if I have multiple replicates in both case and control? For example, 6 vs. 6.

Answer

The function cgmaptools dmr is designed to work with two CGmap files.
If you have multiple replicates, you can first merge the replicates to a single file (to increase coverage and detected region) use the command cgmaptools mergelist tosingle.
Then use cgmaptools dmr for the two merged files.

3.1 DMR analysis with lots of replicates

Question (by Yu-Ling, Sep. 5th, 2017)

I worked on RRBS libraries, high-coverage for specific regions, 33 samples vs. 33 samples. How could I use CGmapTools?

Answer

When there are lots of replicates, and they are not sufferring from low-coverage, you can
(1) use the command cgmaptools findCCGG to find regions for RRBS liraries.
(2) use the command cgmaptools mtr to caculate the average mC levels in region region for each sample.
(3) merge result by (2) into a matrix
(4) write your own program to do t-test.

3.3 annotate DMRs

Question (by Christelle, Sep. 16th, 2017)

How could I annotate the DMR find by CGmapTools.

Answer

You may want to annotate DMRs to see the overlapping with genes, or specific functional regions. The software bedtools would be helpful for investigating overlaps.
If you find specific genes are intersting, you can visuazlise the DNA methylations levels, DMR or DMS in local region, using the command cgmaptools lollipop.

© 2017 - 2019 Weilong Guo and Ping Zhu
Powered by Hexo
Theme - NexT.Muse