A hierarchical model for clustering m6A methylation peaks in MeRIP-seq data

Background The recent advent of the state-of-art high throughput sequencing technology, known as Methylated RNA Immunoprecipitation combined with RNA sequencing (MeRIP-seq) revolutionizes the area of mRNA epigenetics and enables the biologists and biomedical researchers to have a global view of N6-Methyladenosine (m6A) on transcriptome. Yet there is a significant need for new computation tools for processing and analysing MeRIP-Seq data to gain a further insight into the function and m6A mRNA methylation. Results We developed a novel algorithm and an open source R package (http://compgenomics.utsa.edu/metcluster) for uncovering the potential types of m6A methylation by clustering the degree of m6A methylation peaks in MeRIP-Seq data. This algorithm utilizes a hierarchical graphical model to model the reads account variance and the underlying clusters of the methylation peaks. Rigorous statistical inference is performed to estimate the model parameter and detect the number of clusters. MeTCluster is evaluated on both simulated and real MeRIP-seq datasets and the results demonstrate its high accuracy in characterizing the clusters of methylation peaks. Our algorithm was applied to two different sets of real MeRIP-seq datasets and reveals a novel pattern that methylation peaks with less peak enrichment tend to clustered in the 5′ end of both in both mRNAs and lncRNAs, whereas those with higher peak enrichment are more likely to be distributed in CDS and towards the 3′end of mRNAs and lncRNAs. This result might suggest that m6A’s functions could be location specific. Conclusions In this paper, a novel hierarchical graphical model based algorithm was developed for clustering the enrichment of methylation peaks in MeRIP-seq data. MeTCluster is written in R and is publicly available. Electronic supplementary material The online version of this article (doi:10.1186/s12864-016-2913-x) contains supplementary material, which is available to authorized users.

Background N 6 -methyl-adenosine (m 6 A) is the most abundant modification among 100 types of identified RNA modifications in eukaryotic mRNA/lncRNA [1,2]. Even though m 6 A was found existing in mammalian mRNAs in as early as 1970s [3], its biological relevance remains unclear due to the difficulties in identifying global m 6 A sites in mRNA [4]. In 2013, the m 6 A demethylase Fat mass and obesity associated protein (FTO) was first discovered [5], to be able to reverse the m 6 A modification in mRNA and it revived our interests of studying m 6 A in mRNA. To date, ALKBH5 is identified as another demethylase [6] and the methyltransferase like 3/14 (METTL3/METTL14) and Wilms' tumor 1-assoicating protein (WTAP) are discovered to be subunits of the m 6 A methyltransferase complex [7,8]. All these findings provide strong evidences to show that m 6 A is a dynamic modification and suggest that it may play a critical role in exerting post-transcriptional functions in mRNA metabolism [9][10][11].
These new wave of breakthroughs cannot be achieved without the recent development of MeRIP-seq [12,13], which was successfully developed to reveal the transcriptome-wide distribution of m 6 A in human and mouse cells. In this essay, mRNA is first chemically fragmented into approximately 100-nucleotide (nt) long before immunoprecipitation with anti-m 6 A antibody.
Then, the immunoprecipitated (IPed) methylated mRNA fragments and the un-immunoprecipited input control mRNA fragments are subjected to high-throughput sequencing [14]. The sequenced IP and input reads are aligned to the transcriptome and reads enrichment of IP out of the combined reads in IP and input samples are examined to predict to loci of methylation sites and infer the degree of methylation. We have previously developed exomePeak [15,16] and HEPeak [17], two algorithms for detecting m 6 A peaks in MeRIP-seq. Although MeRIP-seq and subsequent computational peak-calling analysis provide an accurate landscape of m 6 A methylation in transcriptome, the complete mechanisms of this methylation still remains unclear. Just like gene expression where co-expression might suggest co-regulation or similar gene functions, sites with similar methylation degree could be related to similar methylation mechanisms. Therefore, there is a need to develop algorithms to uncover co-methylation pattern in MeRIP-seq data. In this paper, we model the methylation degrees of m 6 A peaks as a mixture of the Beta-binomial distributions and propose an expectation-maximization based clustering algorithm to uncover the co-methylation patterns.

Methods
In this section, we first describe the proposed generative model to define m 6 A peak clusters and then derive the Expectation-Maximization algorithm for the inference. In the end, we discuss a Bayesian Information Criterion (BIC) [18] for selecting the optimal number of m 6 A peak clusters.

The proposed graphical model for clustering RNA methylation peaks
The proposed graphical model for clustering of m 6 A peaks in MeRIP-seq data is shown in Fig. 1. Suppose we have identified a set of N m 6 A peaks, by using peakcalling software such as exomePeak or HEPeak. The goal is to cluster these peaks according to their methylation degree, which is defined as IP reads count divided by the total count of IP and control reads. For the n th m 6 A peak, let Z n ∈ {1, 2,.., K} denote the index of the particular methylation cluster that n-th peak belongs to, with K representing the total number of clusters, then Z n follows a discrete distribution where π k is the unknown probability that an m 6 A peak belongs to cluster k, where ∑ K π k = 1 and I(⋅) is the indicator function. Also, let the observed reads count in the n th peak of the m th IP replicate sample be X m,n and that of the m th input replicate denote as Y mn . Under the assumption that reads count follows a Poisson distribution, the reads count X mn given the total reads account T mn = X mn + Y mn can be shown to follow a Binomial distribution where is p n represents unknown methylation degree at the n th Peak of the m th replicate. In order to model the variance of the replicates for the n th peak, given cluster assignment Z n , p n is assumed to follow the Beta distribution Therefore, after integrating the variable p n , X mn follows a mixture of Beta-binomial distribution P X mn jZ n ; α;β ð Þ¼ X p n P X mn jp n ; Z n ð Þ P p n jα;β ð Þ where α = [α 1 , α 2 ,.., α K ] T , β = [β 1 , β 2 ,.., β K ] T are the unknown parameters of Beta distribution and C is the normalization constant. Thus, by considering the N m 6 A peaks in M replicates, the joint distribution is where BB(X mn |Z n ) represents formula (3). Then, the loglikelihood of the observed data can be expressed as The goal of inference is to predict the cluster index Z n for all the peaks and estimate the unknown model parameters θ ¼ α; β; π ½ . Next, we first discuss the maximum likelihood solution for parameter inference, based which an EM algorithm is introduced afterwards to perform model parameters inference and cluster assignment jointly.

Parameter inference by the Newton's method
Given that the cluster indices are known, the model parameters can be inferred by the maximum likelihood criterion aŝ Given (5-6), the log-likelihood l can be rewritten as Here, given that q Z n ð Þ is a complex simplex, according to the Jensen's inequality, the lower bound of l is achieved when q Z n ð Þ ¼ P Z n jX ð Þ. With a little abuse of notation, l denotes the lower bound of (7). Given the equality constrain P K π k ¼ 1 , the parameters of π can be computed by maximizing l and its dual problem with Lagrange multiplier λ is then λ and π can be calculated as Due to lack of analytical solution for the derivatives of l with respect to α and β, a Newton's method is applied and the the gradient can be computed as ð11Þ and the Hessian is Then, the parameters for the k th cluster can be updated iteratively as m 6 A peak cluster assignment Assigning m 6 A peak to a cluster amounts to inferring cluster index Z n , whose posterior probability given θ can be written as However, P Z n ¼ kjX n ; θ ð Þcannot be computed directly, because parameter θ is also unknown. To circumvent the difficulty, we developed an EM [19] algorithm to infer Z n and estimate the model parameters θ in an iterative fashion. The steps of the proposed EM algorithm are described in the following Repeat until convergence achieved: E-step: use the previous computed parameters θ old to update the posterior probability of the hidden states P Z n ¼ kjX n ; θ ð Þaccording to (13). M-step: maximize the lower bound l in (7) and estimate parameters θ new according to (12).

Selection of the number of states by Bayesian information criterion (BIC)
Note that the total number of states K is also unknown. In order to determine K, the BIC is applied search in the range of 2 to 15. The best number of states is selected by the lowest BIC, which is denoted as

Performance evaluation by simulation
The performance was evaluated by simulation where the true states of methylation peaks are known. Each peak was simulated independently, where the reads count was generated according to the proposed graphical model in Fig. 1. Notably, from (3), we can determine that the distribution of the methylation degree follows the following mixture Beta distribution where the kth Beta distribution model the methylation degree in cluster k. In our case, we assume there are K ¼ 4 clusters and π ¼ 0:3; 0:4; 0:2; 0:1 ½ . Note that the degree p may vary vastly when the variance of the Beta distribution is large. In addition, the total reads count T n of the n th peak can introduce another layer of variance and the larger the T n is, the smaller the variance is. For simplicity, we only investigate the impact of the variances from the Beta distributions on performance. Here, two cases were considered; in the first case, moderate variances of the methylation degree were simulated where α; β ½ = 16; 2; 16; 4; 20; 10; 25; 10 ½ and in the second case, the variances were assumed very high and set as α; β ½ ¼ 8; 1; 4; 1; 1:2; 1; 9; 10 ½ . To best mimic the real MeRIP-Seq data, N ¼ 10000 methylation peaks and M ¼ 2 replicates were simulated. Also, we let the total count T n ¼ 100 for any methylation peak.
The performance of the proposed algorithm in uncovering the clusters of m 6 A peak methylation degree can be evaluated by examining the goodness-of-fit of the mixture Beta distribution (15). Figure 2a demonstrates that the fitting performance for both moderate and high variance cases both cases and we can see the estimated mixture density is extremely close to the true ones, indicating a good fitting performance by the algorithm. In order to quantify the influence of the number of replicates on the fitting performance, simulated datasets with replicates varying from 1 to 10 were generated. The goodness-of-fit measured by Kullback-Leibler (KL) divergence between the estimated and the true mixture distributions was examined for different number of replicates separately. We can see from Fig. 2b that even with no replicate the fitting performance is very high with a KL divergence less 0.7 %. When there are two or more replicates, further improvement can be obtained, where the KL divergence can be reduce to as low as 0.2 %. Taken together, the results provide strong evidence to support a good fitting performance of the proposed algorithm for different reads variations.

Evaluation on real m 6 A MeRIP-seq data
To further validate the accuracy of the proposed algorithm, we applied it to two real public available m 6 A MeRIP-seq datasets [5,8]. One is from the mouse midbrain cells including 3 replicates, download from Gene Expression Omnibus (GEO) (accession number GSE47217) and the other dataset including 4 replicates measures transcriptome-wide m 6 A in human HeLa cells (accession number GSE46705). The datasets were pre-processed according to the HEPeak pipeline and for midbrain dataset, a total of 18162 m 6 A peaks were identified, whereas 7243 m 6 A peaks were reported in the HeLa cells both for FDR < 0.05. Next, we applied our algorithm to uncover the peak clusters in two datasets. 2 m 6 A peak clusters were determined to exist for the mouse midbrain cells (Fig. 3a), where cluster 1 contains 60 % (10875) of the peaks and cluster 2 includes the remaining 40 % (7287). In contrast, 4 different m 6 A peak clusters were discovered for HeLa cells (Fig. 3b), with the proportion of peaks as 21 % (1521) for cluster 1, 44 % (3155) for cluster 2, 12 % (886) for cluster 3, and 23 % (1681) for cluster 4, where the cluster is ranked according to a descending order of methylation degree.
To evaluate the accuracy of the proposed algorithm in characterizing the true mixture distribution of the methylation degree, the estimated density was next tested against the empirical distribution of peak methylation degrees obtained from MeRIP-Seq data. As illustrated in Figs. 4a and 5a, the estimated mixture distributions capture the real distributions of methylation degrees very well for both mouse and human MeRIP-seq datasets. We further investigated each components of the mixture. Figure 4b shows the empirical peak distributions of the two uncovered clusters in the mouse midbrain, which have distinct patterns. The fitted distributions of each cluster well captured the corresponding empirical distribution (chi-square test, pvalue: 9.2e-14 and 4.4e-4 for cluster 1 and 2). For human HeLa cells Fig. 5b, four

A novel pattern of m 6 A distribution is revealed
In order to gain insights into different clusters of methylation peaks, peaks in each cluster were mapped to the corresponding mRNA or lncRNA and their distribution was subsequently examined. In mouse midbrain cells, noticeable differences in the distributions of two clusters can be observed on mRNA (Fig. 6a). Peaks in cluster 1 that have higher methylation degree are highly enriched near the stop codon, a distribution similar to the general m 6 A distribution previously reported in the literature [1,12,13,20], whereas those in cluster 2 that have less degree of methylation are clearly more enriched near the start codon towards the 5′ UTR. Interestingly, m 6 A peak clusters in lncRNA (Fig. 6b) also show the same pattern where the higher methylated peaks are more likely to be enriched toward its 3′UTR. This phenomenon was further supported by the results in human HeLa cells   Fig. 7a, b). We see once again that the highly methylated peaks tend to locate around the stop codon and the peaks move towards the 5′ end as their methylation degree decreases. This pattern was also verified on additional MeRIP-seq datasets (Additional files 1: Figure S1 and Additional file 2: Figure S2).
To gain additional insights into these m 6 Aclusters, sequence motifs searching was performed on the sequences of the predicted m 6 A peaks for each particular cluster. The sequences of peaks were obtained by bedtools2.1 and motif search was done by using DREME [21,22], with the shuffled sequences as the background. The most enriched consensus motifs are illustrated in the Fig. 8 and Additional file 3: Figure S3 in Additional files. Interestingly, the motifs for the highest methylated cluster in both mouse midbrain cells and human HeLa cells are found to be very similar and this similarity also exists for the lowly methylated cluster. For the highest methylated cluster, the common motif is GGAC, which has been shown by PAR-CLIP experiments as the binding motif of methyltransferase METTL14 [8]. For the lowest methylated peaks, the motif is determined as GGAGGA. This distinct motif has not been reported to be associated with any protein binding and thus requires further investigation.

Discussion and Conclusions
In this paper, a novel graphical model based methylation peak clustering algorithm, was developed for discovering the patterns in methylation degrees of m 6 A peaks in the MeRIP-seq data. The peak cluster is modelled as the mixture Beta-binomial distribution, where the Beta distribution can model the variance of the methylation degree across sample replicates. The evaluation on both simulation and real MeRIP-seq datasets demonstrates the accuracy and robustness of our model. In addition, our algorithm successfully uncovered a unique and novel pattern for m 6 A peak cluster, providing a new lead for understanding the mechanisms and functions of m 6 A methylation.

Additional files
Additional MeRIP-seq datasets were further examined. One experiment was conducted by knocking out an m 6 A demethylase obesity associated protein (KO-FTO) in mouse midbrain cells. The other MeRIP-seq dataset was generated by knocking out m 6 A methyltransferase METTL14 (KO-METTL14) in human HeLa cells.
Additional file 1: Figure S1. Distribution of m 6