User:Rachelhuang01/Bayesian tool for methylation analysis (Batman)

Bayesian tool for methylation analysis (Batman)

Batman is a statistical tool for analyzing methylated DNA immunoprecipitation (MeDIP) profiles. It can be applied to large datasets generated using oligonucleotide arrays (MeDIP-chip) or next-generation sequencing (MeDIP-seq), providing a quantitative estimation of absolute methylation state in a region of interest.



Theory
MeDIP (methylated DNA immunoprecipitation) is an experimental technique used to assess DNA methylation levels by using an antibody to isolate methylated DNA sequences. The isolated fragments of DNA are either hybridized to a microarray chip (MeDIP-chip) or sequenced by next-generation sequencing (MeDIP-seq). While this tells you what areas of the genome are methylated, it does not give absolute methylation levels. Imagine two different genomic regions, A and B. Region A has six CpGs (DNA methylation in mammalian somatic cells generally occurs at CpG dinucleotides ), three of which are methylated. Region B has three CpGs, all of which are methylated. As the antibody simply recognizes methylated DNA, it will bind both these regions equally and subsequent steps will therefore show equal signals for these two regions. This does not give the full picture of methylation in these two regions (in region A only half the CpGs are methylated, whereas in region B all the CpGs are methylated). Therefore, to get the full picture of methylation for a given region you have to normalize the signal you get from the MeDIP experiment to the number of CpGs in the region, and this is what the Batman algorithm does. Analysing the MeDIP signal of the above example would give Batman scores of 0.5 for region A (i.e. the region is 50% methylated) and 1 for region B (ie. The region is 100% methylated). In this way Batman converts the signals from MeDIP experiments to absolute methylation levels.

Development of Batman
The core principle of the Batman algorithm is to model the effects of varying density of CpG dinucleotides, and the effect this has on MeDIP enrichment of DNA fragments. Basic assumptions in Batman:
 * 1) Almost all DNA methylation in mammals happens at CpG dinucleotides.
 * 2) Most CpG-poor regions are constitutively methylated while most CpG-rich regions (CpG islands) are constitutively unmethylated.
 * 3) There are no fragment biases in MeDIP experiment (approximate range of DNA fragment sizes is 400-700 bp).
 * 4) The errors on the microarray are normally distributed with precision.
 * 5) Only methylated CpGs contribute to the observed signal.
 * 6) CpG methylation state is generally highly correlated over hundreds of bases, so CpGs grouped together in 50- or 100-bp windows would have the same methylation state.

Basic parameters in Batman: Based on these assumptions, the signal from the MeDIP channel of the MeDIP-chip or MeDIP-seq experiment depends on the degree of enrichment of DNA fragments overlapping that probe, which in turn depends on the amount of antibody binding, and thus to the number of methylated CpGs on those fragments. In Batman model, the complete dataset from a MeDIP/chip experiment, A, can be calculated by the following probability distribution:
 * Ccp: coupling factor between probe p and CpG dinucleotide c, is defined as the fraction of DNA molecules hybridizing to probe p that contain the CpG c.
 * 1) Ctot : total CpG influence parameter, is defined as the sum of coupling factors for any given probe, which provides a measure of local CpG density.
 * mc : the methylation status at position c, which represents the fraction of chromosomes in the sample on which it is methylated. mc is considered as a continuous variable since the majority samples used in MeDIP studies contain multiple cell-types.

where G (x|μ, σ2) is a Gaussian probability density function. Standard Bayesian techniques can be used to infer f(m|A), that is, the distribution of likely methylation states given one or more sets of MeDIP-chip/MeDIP-seq outputs. To solve this inference problem, Batman uses nested sampling (http://www.inference.phy.cam.ac.uk/bayesys/) to generate 100 independent samples from f(m|A) for each tiled region of the genome, then summarizes the most likely methylation state in 100-bp windows by fitting beta distributions to these samples. The modes of the most likely beta distributions were used as final methylation calls.

Work flow of Batman
Batman prerequisites:
 * 1) Installation: install Batman(freely available from http://td-blade.gurdon.cam.ac.uk/software/batman/ under the GNU Lesser General Public License), Apache ANT, MySQL database server, and MySQL database connector.
 * 2) Prepare dataset: break your dataset into small blocks, namely regions of interest (ROIs), each represented by a small number (typically about 100) probes on a microarray.
 * 3) Identify the database server: connect to a MySQL database server using both the MySQL administration tool, and many of the Batman programs.
 * 4) Initialize the Batman database: create a database on your database server.
 * 5) Register the experiments to be analysed.
 * 6) Register the array design: The array design (i.e. complete list of probes, with their genomic locations) should be provided as a GFF file.
 * 7) Load the array data.
 * 8) Load the genome sequence.

Run Batman:
 * 1) Calibrate the Batman model: Before any data can be analysed, it is necessary to calibrate each array by estimating how much extra array signal is produced by each methylated CpG. This step can give you a quick idea whether each of your arrays is giving sensible results.
 * 2) Sample methylation states from the Batman model: You’ll often have multiple arrays from the same experiment, and these should normally be analysed together to improve the confidence of the final calls. Each chromosome can take several days to process; therefore, if possible, run several in parallel.
 * 3) Summarize methylation states to generate the final calls: The “sample” files generated by Batman contain a large set of plausible methylation states for each region. For most purposes, you’ll actually want a single estimate of the likely methylation state at that position, and perhaps an estimate of how confident you can be that this is actually the correct value.

Visualization of Batman Data: More details related to Batman procedure can be found in Batman manual freely online from http://td-blade.gurdon.cam.ac.uk/software/batman/batmanual-alpha-0.2.3.pdf
 * 1) The output is in GFF format. For each window, a score (range: 0-1) is given which represents a likely fraction of methylation and the interquartile range is given as an estimate of confidence.
 * 2) Several genome browsers are available, such as Ensembl genome browser, which uses a colour gradient from 20 (bright yellow) to 80 (dark blue) to show the Batman methylation score for each probe in the ROI.

Limitations
It may be useful to take the following points into account when considering using Batman:


 * 1) Batman is not a piece of software; it is an algorithm performed using the command prompt. As such it is not especially user-friendly and is quite a computationally technical process.
 * 2) Due to the fact that it is non-commercial, there is very little support when using Batman beyond what is in the manual.
 * 3) It is quite time consuming (it can take several days to analyse one chromosome).
 * 4) Copy number variation (CNV) has to be accounted for. For example, the score for a region with a CNV value of 1.6 in a cancer (a loss of 0.4 compared to normal) would have to be multiplied by 1.25 (=2/1.6) to compensate for the loss.
 * 5) One of the basic assumptions of Batman is that all DNA methylation occurs at CpG dinucleotides. While this is generally the case for vertebrate somatic cells, there are situations where there is widespread non-CpG methylation, such as in plant cells and embryonic stem cells.