CGmapTools
CGmapTools

(40 functions for CGmap-oriented DNA methylation analyses)


  • Home

  • Tutorial

  • Source Code

  • Release log

  • Quick Start

  • Chinese

  • Q&A

Quick Start

In this section, we only show you some basic implementation of the CGmapTools toolset, please go to the tutorial page for more detail introduction of our CGmapTools.

Installation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# decompress the gzip tarball
tar -zxf cgmaptools.1.0.0.tar.gz
# go to cgmaptool.1.0.0
cd cgmaptools.1.0.0
# install
sh ./install.sh
# add cgmaptools to your system PATH if necessary
# open ~/.bashrc
vi ~/.bashrc
# add the following lines to the end of ~/.bashrc
export PATH=/path/to/cgmaptools/:$PATH
# if you want to use bin-command directly, add the following lines to the end of ~/.bashrc
export PATH=/path/to/cgmaptools/bin/:$PATH
# then, souce your ~/.bashrc
source ~/.bashrc

1. DNA methylation profiles from alignments

Suppose we have aligned reads stored in BAM format files. Currently, we support alignments in bam format from BSseeker2 and bismark.

1
2
# Obtain CGmap and ATCGmap
cgmaptools convert bam2cgmap -b <BAM> -g <genome.fa> -o <prefix>

If it’s paired-end sequencing strategy, we recommend you add --rmOverlap to the above command to remove overlapped region of two mate reads avoiding twice consideration of the same DNA fragment.

2. SNP calling using bisulfite sequencing data

After we have ATCGmap file, SNP calling can be performed.

1
2
# using bayes model
cgmaptools snv -m bayes --bayes-dynamicP -i <ATCGmap> -v <VCF>

There are two strategies we can use to call SNPs, binomial or bayesian mode. The default choice is the binomial mode as it’s faster, but the overall prediction precision of bayesian mode is better. If you are not in hurry, we recommand you the beyasian mode for more accuracy callings.
Also to increase prediction precision, --bayes-dynamicP is recommanded when using bayesian mode, which dynamicsly adjust p-value threshoulds according to the read coverage.

3. Allele-specific methylation (ASM) analysis

ASM is easy to perform by using asm utility in CGmapTools if you have already got SNP sites in vcf format.

1
2
# perform allele specific methylation
cgmaptools asm [options] -r <ref.fa> -b <input.bam> -l <snp.vcf>

4. Visualization of ASM

We present a new way to automatically display methylation on mapped reads, which we call Tanghulu plot.

1
2
# display reads mapped in a specified region or linked by a given SNP
cgmaptools tanghulu -r <genome.fa> -b <BAM> -l <region>

Tanghulu plot supports two kinds of region format.

format 1, e.g.: chr1:133. This will ask CGmapTools to show reads mapped over this site. If this is a heterozygous SNP site, we recommand you to add assign the genotype option -g to resolve more vague reads caused by bisulfite coversion.

1
2
# display reads linked by a given SNP
cgmaptools tanghulu -r genome.fa -b BAM -l chr1:133 -g GT

format 2, e.g.: chr1:133-144. This region format will tell CGmapTools to show reads mapped over this region.

1
2
# display reads mapped over a specified region
cgmaptools tanghulu -r genome.fa -b BAM -l chr1:133-144
© 2017 - 2019 Weilong Guo and Ping Zhu
Powered by Hexo
Theme - NexT.Muse