Comparative network analysis aims to identify common subnetworks in biological networks. It can facilitate the prediction of conserved functional modules across different species and provide deep insights into their underlying regulatory mechanisms. Recently, it has been shown that hidden Markov models (HMMs) can provide a flexible and computationally efficient framework for modeling and comparing biological networks.In this work, we show that using global correspondence scores between molecules can improve the accuracy of the HMM-based network alignment results. The global correspondence scores are computed by performing a semi-Markov random walk on the networks to be compared. The resulting score naturally integrates the sequence similarity between molecules and the topological similarity between their molecular interactions, thereby providing a more effective measure for estimating the functional similarity between molecules. By incorporating the global correspondence scores, instead of relying on sequence similarity or functional annotation scores used by previous approaches, our HMM-based network alignment method can identify conserved subnetworks that are functionally more coherent.Performance analysis based on synthetic and microbial networks demonstrates that the proposed network alignment strategy significantly improves the robustness and specificity of the predicted alignment results, in terms of conserved functional similarity measured based on KEGG ortholog (KO) groups. These results clearly show that the HMM-based network alignment framework using global correspondence scores can effectively find conserved biological pathways and has the potential to be used for automatic functional annotation of biomolecules. With the increasingly high coverage of molecular interactions owing to the advancement of high-throughput techniques for measuring biomolecular interactions, such as the two-hybrid screening  and co-itopological similarity of the interaction patterns in the compared networks as well as the node similarity of the molecules that belong to different networks, typically measured based on sequence similarity. To obtain better alignment results that are biologically more significant, there have been research efforts to improve the scoring scheme by incorporating evolutionary [Current local network algorithms ,5,6,9,15utionary  or functutionary ,16 betweglobal correspondence score between every pair of nodes. The resulting global correspondence score reflects the global similarity between nodes in different networks, by seamlessly integrating the topological similarity and individual node similarity. Alignment results based on synthetic networks and microbial protein-protein interaction (PPI) networks show that the performance of the HMM-based local alignment scheme can be significantly improved by utilizing the global correspondence score instead of the original individual sequence similarity score. The major contributions of this paper include the following: first, we integrate the global node correspondence scoring scheme into the HMM-based local network alignment framework [Recently, we have introduced an effective framework for local network alignment based on hidden Markov models (HMMs), in which we integrate both the node sequence similarity and the interaction reliability into the scoring scheme by determining the parameters of the HMMs correspondingly . We alsoramework , which lN1 nodes represents the corresponding molecules, and M1 edges indicates the presence of interactions ijd between the two molecules iu and j.u Similarly, we assume that N2 nodes and a set M2 edges. We denote the interaction reliability score between iu and ju in w1 and the interaction reliability between iv and jv in w2. The node similarity between s.In this section, we briefly review our local network alignment algorithm based on hidden Markov models (HMMs) ,15. We fL in the respective networks that maximizes the pathway alignment score H. The alignment score H integrates the node similarity score s between the aligned nodes iu and jv , the interaction reliability score w1 between iu and iu+1 (1 ≤ i ≤ L – 1), the interaction reliability score w2 between jv and jv+1 (1 ≤ j ≤ L – 1), and the penalty for potential gaps in the alignment.In order to use HMMs to search for the pathways that are conserved in both networks, we search for the best matching pair of paths . The resulting HMM contains a hidden state for each node iu for convenience. State transition is allowed from iu to ju for  such that . The HMM for w1 and w2. By introducing a “virtual observation sequence” q = q1 ⋯ Lq that is jointly emitted by the two HMMs, we design the emission probabilities based on the node similarity s. Using these HMMs, the problem of finding the optimal pair of paths in the two networks is translated into that of finding the optimal pair of state sequences in the two HMMs that jointly maximize the probability P of the “virtual observation sequence”:We first construct two HMMs respectively for two given networks. For ribed in ,15. The P as the alignment score H, and find the best matching pair of paths using dynamic programming [t(≤ L) as follows:We can use log gramming . For thitw1  and tw2  are the logarithms of transition probabilities determined by the interaction reliability scores in the respective networks. Next, we find the optimal pair of paths where l = 1, 2, ⋯ , L. Instead of finding only the best matching pair of paths, we can also search for the top k path pairs by replacing the max operator in (2) by an operator that finds the k largest scores. The computational complexity of the described dynamic programming algorithm is only O(kLM1M2) for finding the top k pairs of matching paths. Note that the computational complexity is linear with respect to each parameter k, L, M1, and M2.by iteratively computing the score in (1) for s. As we discussed earlier, it is desirable to integrate all the available information to measure the similarity between network nodes, instead of relying on the similarity between individual molecules. In this paper, we propose to use a semi-Markov random walk model to define a global correspondence scoring scheme for measuring node similarity by incorporating the topological properties around the nodes. As we will demonstrate later, the use of global correspondence scores can improve the accuracy and robustness of the HMM-based alignment results.In our previous implementation of HMM-based local alignment ,15,20, wIn order to predict the global correspondence between nodes, we should first consider the similarity between the corresponding molecules themselves, in terms of sequence, structure, and/or function. However, considering that biomolecules carry out their functions through intertwined interactions with other molecules, it is important to consider these interaction patterns as well when evaluating the global similarity between nodes. As recently proposed and discussed in ,18,21,22s. The basic idea of this scheme is to perform a simultaneous semi-Markov random walk on iu, jv) will increase if iu and jv have higher individual node similarity . Furthermore, the proportion of time spent at  will also increase if the two nodes are surrounded by similar nodes, hence have a higher topological similarity. As a result, this semi-Markov random walk provides an elegant way of evaluating the global similarity between nodes by integrating individual node similarity and topological similarity. Using this model, we can compute the global correspondence score as follows:In this work, we adopt the semi-Markov random walk approach  to compuπ1(iu) is the stationary probability of visiting node iu in an ordinary Markov random walk on π2(jv) is the stationary probability of visiting jv in a Markov random walk on h estimates the individual node similarity between iu and jv, which is measured in terms of sequence similarity in this work. The above scheme is conceptually similar to the one proposed in [linearly combining the topological similarity score and the sequence similarity score. The resulting score can be viewed as the long-run proportion of time spent at the given pair of nodes based on a “Markov random walk with restart” model, in which the restart probability has to be chosen in advance to balance the contributions from the interaction similarity and the sequence similarity, typically in an ad-hoc manner. Note that such parameter tuning is not needed in the semi-Markov random walk approach adopted in this work.in which posed in , where ts given in (3), and compare it to the performance of the HMM-based alignment method that directly uses the sequence similarity score with s = h, as originally proposed in [In the following sections, we analyze the effect of using the global correspondence scores in the HMM-based local network alignment method. More specifically, we evaluate the performance of the HMM-based local network alignment method when using the global correspondence score for posed in ,15.u4, v11) and , which are shown by dashed lines in Fig. Additional file To illustrate the advantages of using the global correspondence scores in the HMM-based local network alignment scheme, we first conducted a set of experiments based on synthetically generated networks. Figure L = 5. The identified top pair of paths when directly using the assigned node similarity scores is shown in Fig. u4,v11) and  in this case and the prediction does not capture the obvious topological similarity in the two networks. Next, we computed the global correspondence scores between nodes based on the semi-Markov random walk scheme and used these scores in the alignment algorithm, instead of the original node similarity scores. Figure Additional file We applied the HMM-based local alignment to identify the most similar pair of paths of length For a more thorough performance comparison between the two different schemes—the original scheme that directly uses the individual similarity scores and the proposed scheme that uses the global correspondence scores computed by semi-Markov random walk—we further created a benchmark set that consists of large synthetic networks generated based on a scale-free model . Althougm existing nodes with a probability that is proportional to the number of links that the nodes already have. As shown in [P(k) ~ kγ, where γ is the degree exponent. In this work, we used this model with m = 10 to grow . To model the functional coherence between orthologous proteins, we then assigned a distinct group annotation to each pair of corresponding proteins in the two networks. More specifically, both the node iu in iv in ith functional group. We randomly assigned individual node similarity scores between orthologous nodes according to the Gaussian distribution oµ = 300 and standard deviation oσ = 100. The node similarity scores between non-orthologous nodes were randomly assigned according to a different distribution σ = 100, and µ was used as a free parameter that determines the level of overlap between the two similarity score distributions. Node similarity scores below a certain threshold (set to 50 in this work) were set to zero. For every node, we also restricted the number of non-orthologous nodes with a nonzero similarity score to 10. These settings were used to make the resulting random networks similar to real PPI networks in public databases.To construct the synthetic networks, we first randomly generated an undirected seed network t) model  to genert) model . In thisshown in , the resUp to this point, the two networks µ = 200. Using the HMM-based local network alignment algorithm, we identified the top 200 high-scoring path alignments with gaps. To find the top 200 path alignments, we iterated the following steps: (i) find the optimal path alignment; (ii) store the predicted alignment; (iii) remove the interactions included in the path alignments; (iv) repeat the experiment to find the next path alignment. The accuracy of the identified path pairs are measured based on the group annotations of the aligned nodes as in [k alignments as follows:Based on the above model, we generated two networks es as in ,15. We dith alignment, and ith alignment. We also define the cumulative coverage of the top k alignments as k path alignments. We repeated the alignment experiments for different path lengths: L = 10, 20, and 30. The alignment results are summarized in Fig. where L = 30 and evaluated the performance of the HMM-based alignment algorithm using the global correspondence scores and the individual similarity scores, respectively, for various values of µ. The simulation results are shown Fig. µ. When µ is small , we can accurately identify orthologous nodes by using individual node similarity scores. However, as µ increases and the individual node similarity scores become less discriminative, it becomes more critical to utilize topological information to identify orthologs. This can be seen when µ = 250, in which case the use of global correspondence scores can remarkably improve the accuracy of the alignment. It is also apparent from the figure that the performance of local network alignment using individual node similarity degrades much faster as the individual similarity gets less informative. This implies that we can obtain more robust and reliable alignment results by incorporating the global correspondence scores into the HMM-based local network alignment algorithm. Next, we investigated performance improvement by the proposed approach for varying levels of overlap between the node similarity score distribution for orthologous nodes and that for non-orthologous nodes. We set E. coli network and the C. crescentus networks to detect conserved functional modules in the two networks. Similarly, we also performed a pairwise alignment between the E. coli and the S. typhimurium networks to find conserved modules in these networks. As before, we have assessed the accuracy of the alignment results using two metrics—namely, specificity and coverage—based on the KEGG ortholog (KO) group annotations [For further evaluation of the proposed method, we performed pairwise alignments of three microbial PPI networks obtained from . In our otations  of the pwt in (1) were determined based on the presence (or absence) of protein interactions in the microbial networks determined by the SRINI algorithm [In these experiments, the parameters of the HMMs were chosen as follows. First, the transition scores lgorithm :(5)Second, we used the BLASTP hit scores between protein pairs, provided in , as the L = 10, 20, and 30. In all our experiments, we disallowed multiple occurrences of identical protein pairs in a given path alignment. The cumulative specificity kcs of the pairwise alignment of the E. coli and the C. crescentus networks using the two different types of node similarities are shown in Figs. L = 10, 20, and 30, respectively. The results of the pairwise alignment of the E. coli and the S. typhimurium networks are shown in Figs. kcc of the predicted path alignments using the two different node similarity scores.Based on the constructed HMMs, we used our local network alignment algorithm to find the 200 top-scoring pathway alignments with gaps. This experiment was also repeated for several different virtual path length: E. coli and the C. crescentus networks, shown in Fig. kcc) for the pairwise alignment of the E. coli and the S. typhimurium networks, in which case the specificity of the predicted alignment is not necessarily improved by the global scores. This can be seen in Fig. As we can see from the pairwise alignment results of the E. coli and the S. typhimurium networks. As these proteins do not have curated functional annotations, such as GO terms or KO groups, we manually checked the protein information for the first 20 unannotated pairs in the Protein database at the National Center for Biotechnology Information (NCBI) [Additional file 1. For the remaining two protein pairs  . Table 1In this paper, we studied the effect of using a global similarity scoring scheme to measure the node similarity and incorporating these global scores in the HMM-based local network alignment algorithm. We used the semi-Markov random walk framework to compute the global correspondence scores between nodes in different networks. The resulting scores can effectively combine the topological similarity of the subnetworks around the network nodes as well as their individual molecular similarity. Experimental results on microbial protein-protein interaction networks and synthetic scale-free networks show that the use of global correspondence scores can better identify paths with similar topological properties, thereby improving the specificity of the predicted alignment. We believe that the proposed alignment scheme can provide an effective and computationally efficient framework for developing robust and accurate functional annotation tools for proteins.Conceived and designed the experiments: XQ, SMES, BJY. Performed the network alignment experiments: XQ. Implemented the semi-Markov random walk based scoring scheme: SMES. Analyzed the data and wrote the paper: XQ, SMES, BJY.supplement.pdf This file contains: (i) information of the benchmark set that contains randomly generated synthetic networks, (ii) additional experimental results, and (iii) relevant information regarding the unannotated pairs of aligned proteins in microbial networks.Click here for file


Predicting new non-coding RNAs (ncRNAs) of a family can be done by aligning the potential candidate with a member of the family with known sequence and secondary structure. Existing tools either only consider the sequence similarity or cannot handle local alignment with gaps.In this paper, we consider the problem of finding the optimal local structural alignment between a query RNA sequence (with known secondary structure) and a target sequence (with unknown secondary structure) with the affine gap penalty model. We provide the algorithm to solve the problem.Based on an experiment, we show that there are ncRNA families in which considering local structural alignment with gap penalty model can identify real hits more effectively than using global alignment or local alignment without gap penalty model. A non-coding RNA (ncRNA) is a RNA molecule that does not translate into proteins. It has been shown to be involved in many biological processes -4. The nstructural alignment). Along this direction, there are some approaches , then  ∉ x,yM. We assume that there is no two base pairs sharing the same position, i.e., for any ,  ∈ M, i1 ≠ j2, i2 ≠ j1, and i1 = i2 if and only if j1 = j2.Formally speaking, let A regular structure is the structure in which there does not exist any two base pairs crossing each other. The formal definition is as follows:Definition 1x,y is a regular structure if there does not exist two base pairsM ,  ∈ x,y such that iM <k <j <lor k <i <l <j.Note that an empty set is also considered as a regular structure.S[1…m] be a query sequence with known secondary structure M, and T[1…n] be a target sequence with unknown secondary structure. S and T are both sequences of {A,C,G,U}. A structural alignment between S and T is a pair of sequences S′[1…r] and T′[1…r] where r ≥ m, n, S′ is obtained from S and T′ is obtained from T with spaces inserted to make both of the same length. A space cannot appear in the same position of S′ and T′. A maximal consecutive set of ℓ spaces in either S′ or T′ is referred as a gap of length ℓ. The score of the alignment , which determines the sequence and structural similarity between S′ and T′, is defined as score =Let η(i) is the corresponding position in S according to the position i in S′; γ and δ where u1, u2, v1, v2 ∈ {A, C, G, U}, are scores for character similarity and for base pair similarity respectively; k and l is the number of gaps and the total length of all gaps; h and s is the gap starting and extending penalty.where Definition 2 An optimal global structural alignment between S and T is a structural alignment of S and T such that the alignment score is maximum.S[x…y] where 1 ≤ x, y ≤ m be a substring of S with secondary structure x,yM (where S[x…y] is an empty string with empty structure if x >y). Similarly, let T[x′…y′] where 1 ≤ x′, y′ ≤ n be a substring of T (where T[x′…y′] is an empty string if x′ >y′).Let Definition 3 An optimal local structural alignment between S and T is a global structural alignment between two sub stings of S and T, S[x…y] and T[x′…y′] where 1 ≤ x, y ≤ mand 1 ≤ x′, y′ ≤ n of S and T such that the alignment score between them is maximum over all possible substrings.S (with known secondary structure) and T (with unknown structure), we want to compute an optimal local structural alignment with affine gap penalty between S and T.Given The details of the algorithm for solving the problem will be given in Method Section. In this section, we evaluate the resulting algorithm and show that considering local structural alignment with affine gap model can improve the effectiveness of locating ncRNAs for the families in which members may have variable size of hairpins, loops or stems when compared to using global alignment , local aQ. To demonstrate the effectiveness of the affine gap model, we select the longest seed member as this query sequence. We then created a long random sequence with even distribution of four characters {A, C, G, T} to simulate a long genome. The length of this long random sequence is around ten times of the total length of all the seed members of the family. Finally, we embedded the full members  of the family (except the one chosen as query) into this long random sequence in arbitrary positions. If there are more than 100 members, then we randomly picked 100 of them. This resulting sequence is our T.To test the algorithm, we selected around twenty ncRNA families in which the members have variable sizes of hairpins, loops or stems. We construct our testing cases based on real ncRNAs as follows. For each family, we first select a seed member  as the query sequence l be the the maximum length of all the members of the family. For every region in T with length l+20, we compute the structural alignment score of the region and the query sequence. We use the same scoring scheme as in  be the query sequence with known structure M and T[1…n] be the target sequence with unknown structure.We develop a dynamic programming algorithm to solve the problem. Before we describe the method, we would like to define some variations of alignments which will be used in our algorithm. Let Definition 4 Optimal prefix-global structural alignment between S[1…m] and T[1…n] is to find a prefix S[1…y] where 0 ≤ y ≤ m(i.e. S is an empty string when y = 0) such that the score of the optimal global structural alignment between the prefix S[1…y] and T[1…n] is maximum.Definition 5 Optimal suffix-global structural alignment between S[1…m] and T[1…n] is to find S[x…m] where 1 ≤ x ≤ m + 1 (i.e. S is an empty string when x = m + 1) such that the score of the optimal global structural alignment between the suffix S[x…m] and T[1…n] is maximum.Definition 6 Optimal semi-global structural alignment between S[1…m] and T[1…n] is to find a substring S[x…y] where 1 ≤ x, y ≤ m such that the score of the optimal global structural alignment between the substring S[x…y] and T[1…n] is maximum.h + sL, where h is the gap opening penalty, s represents a gap extension penalty, and L denotes the length of gap. Our method consists of two steps. In the first step, we compute the optimal semi-global structural alignment between S and all possible substrings of T. In the second step, we obtain the optimal local structural alignment between S and T resulted in the first step. Define A to be the score of the optimal semi-global structural alignment between S[p…q] and T [e…f]. The score of the optimal local structural alignment between S and T can be obtained from the entry maxe≤f+1A. We first show how to compute A, then show how to use the structure of S to guide the computation of A without considering all possible combinations of p, q.Let the affine gap model be S′ = S[x′…y′] of S[x…y], there are four possible cases: (1) S′ is equal to S ; (2) S′ is a proper prefix in S ; (3) S′ is a proper suffix in S ; (4) S′ is a substring of S[x + 1…y – 1] ; Therefore, we can consider each case one by one when computing the value of A.When considering any substring A1 to be the score of the optimal global structural alignment between S[p…q] and T[e…f]. Define A2 to be the score of the optimal prefix-global structural alignment between S[p…q – 1] and T[e…f]. Define A3 to be the score of the optimal suffix-global structural alignment between S[p + 1…q] and T[e…f]. Define A4 to be the score of the optimal semi-global structural alignment between S[p + 1…q – 1] and T[e…f].Define A can be computed recursively and it is the maximum value of four cases: (1) when S′ = S ); (2) when S′ is a proper prefix of S ); (3) when S′ is a proper suffix of S ; (4) when S′ is a substring of S ; Lemma 1 summarizes these cases.The value of Lemma 1A1,A2,A3,A4.The following subsections describe how to compute S[p…q] and T [e…f], there are nine possible cases: (1) S[p] is aligned with T[e] and S[q] with T[f]; (2) S[p] with T[e] and S[q] with space;(3) S[p] with T[e] and T[f]withspace; (4) S[p] with space and S[q] with T[f]; (5) S[p] with space and S[q] with space; (6) S[p] with space and T[f] with space; (7) T[e] with space and S[q] with T[f]; (8) T[e] with space and S[q] with space; (9) T[e] with space and T[f] with space. Hence, we can consider each case one by one when computing the value of A1.When considering the optimal global structural alignment (with affine gap model) between A1x, where 1 ≤ x ≤ 9, to be the score of the optimal global structural alignment between S[p…q] and T[e…f] where the above case x is satisfied. .Define A1 can be computed recursively and it is the maximum value of nine cases. Lemma 2 summarizes these cases.The value of Lemma 2A12. Similar skill can be applied for the others .We will describe the calculation of A12 is the score of the optimal global structural alignment between S[p…q] and T[e…f], which aligns S[p] with T[e] and S[q] with space. There are three situations and we need to consider them one by one. Note that according to the affine gap model, the penalty of a first space in a gap (i.e. which is h + s) is different from the penalty of the other space in a gap (i.e. which is s). Situation I: when  is a base pair - aligning the base pair S[p] with T[e] and S[q] with space. Considering the alignment between S[p + 1…q – 1] and T[e + 1…f], if S[q – 1] is aligned with space , then a penalty s should be considered. Otherwise (i.e. for the other six cases), a penalty h + s should be considered. Situation II: when ∃q′ where p <q′ <q such that  is a base pair - we need to find k ∈  such that the sum of the alignment score between S and T, and that between S and T is maximum. Since S[p] is aligned with T[e] and S[q] with space, the alignment between S and T should satisfy the case 1, case 2 and case 3 . Similarly, the alignment between S and T should satisfy the case 2, case 5 and case 8 . Situation III: when p does not form base pair with any base q′ ∈  - we align base S[p] with T[e]. Then the alignment between S[p + 1…q] and T[e+ 1…f] should satisfy the case 2, case 5 and case 8 . Lemma 3 summarizes these situations:Lemma 3S[p…q] and T[e…f], there are four possible cases: (1) S[p] is aligned with T[e]; (2) S[p] with space; (3) T[f] with space; and (4) an empty string of S with T.When considering the optimal prefix-global structural alignment (with affine gap model) between Ax2, where 1 ≤ x ≤ 3, to be the score of the optimal prefix-global structural alignment between S[p…q] and T[e…f] where the above case x is satisfied. . Note that we do not need to define function for the case 4 because the corresponding score is – h – s(f – e + 1). The value of A2 can be computed recursively and it is the maximum value of four cases. Lemma 4 summarizes these cases.Define Lemma 4A2 = max{A21, A22, A23, – h – s(f – e + 1)}A22. Similar skill can be applied to calculate A21 and A23.We will describe the calculation of A22.The following lemma lists out the computation of Lemma 5A22 is the score of the optimal prefix-global structural alignment between S[p…q – 1] and T[e…f], where S[p] is aligned with space. Similar to A12, there are also the same three situations. Situation I: when  is a base pair - aligning the base pair S[p] with space. Since a prefix of S[p…q – 1] is considered, there are two possibilities: a prefix of S[p + 1…q – 1] is aligned with T[e…f] , or the whole sequence S[p+ 1…q – 1] is aligned with T[e…f] . Situation II: when ∃q′ where p <q′ <q such that  is a base pair - we need to find k ∈  such that the sum of the alignment score between S and T, and that between S and T is maximum. Since a prefix of S[p…q – 1] is considered, there are two possibilities: (1) the whole sequence S is aligned with T  and a prefix of S is aligned with T ; (2) a prefix of S is aligned with T  only. Situation III: when p does not form base pair with any base q′ ∈  - we align base S[p] with space. For each possibility of situation I & III, there are also two conditions: if S[p + 1] is aligned with T[e] or T[e] is aligned with space, the penalty score h + s should be considered. Otherwise, if S[p + 1] is aligned with space, then the penalty score s should be considered. The lemma 5 summarizes these cases.A3 and A4 are similar. In the following subsection, we will describe the time complexity of the algorithm.The calculations for S needs to be filled. According to the design of the dynamic programming, there are three cases:To fill the dynamic programming table, not all entries for all possible subrange of p, q) ∈ p,qM, then all the entries for S of all tables  can be computed from the entries for S.Case 1: if  ∈ p,qM, then all the entries for S of all tables can be computed from the entries for S and S.Case 2: if ∃q′ s.t.  ∈ p,qM, then all the entries for S of all tables can be computed from the entries for S.Case 3: if ∄ζ to determine for which set of subregions in S, we need to fill the corresponding entires in all the tables.Therefore, we define a function p, q) can be obtained from  by applying ζ function repeatedly. Considering the ζ function, each time the total size of the subregions outputted cannot be greater than the size of the input region and each of the subregions outputted is smaller than the input region. Therefore, in total there are only O(m) such  values. Also, there are O(n2) values of different  values, and for each entry, it takes O(n) because of the consideration of e – 1 ≤ k ≤ f in the case that ∃q′ <q s.t.  ∈ p,qM. After finishing the calculation of values A for all 1 ≤ e, f ≤ n, the final answer }) can be computed in O(n2) time. Therefore the total time complexity = O(mn3) + O(n2) = O(mn3).We only need to fill in the entries for all the tables provided .The authors declare that they have no competing interests.TW and SY conceived the study. All authors refined the study. TW and BC came up the algorithm and BC implemented it. All authors contributed to the analysis. TW, SY and TL participated in drafting the manuscript. All authors read and approved the final version.


Then, efficient high-throughput data stream clustering is used to group highly similar segments into so called quasi-alignments. Quasi-alignments have numerous applications such as identifying species and their taxonomic class from sequences, comparing sequences for similarities, and, as in this paper, discovering conserved regions across related sequences.Next Generation Sequencing techniques are producing enormous amounts of biological sequence data and analysis becomes a major computational problem. Currently, most analysis, especially the identification of conserved regions, relies heavily on Multiple Sequence Alignment and its various heuristics such as progressive alignment, whose run time grows with the square of the number and the length of the aligned sequences and requires significant computational resources. In this work, we present a method to efficiently discover regions of high similarity across multiple sequences without performing expensive sequence alignment. The method is based on approximating edit distance between segments of sequences using In this paper, we show that quasi-alignments can be used to discover highly similar segments across multiple sequences from related or different genomes efficiently and accurately. Experiments on a large number of unaligned 16S rRNA sequences obtained from the Greengenes database show that the method is able to identify conserved regions which agree with known hypervariable regions in 16S rRNA. Furthermore, the experiments show that the proposed method scales well for large data sets with a run time that grows only linearly with the number and length of sequences, whereas for existing multiple sequence alignment heuristics the run time grows super-linearly.Quasi-alignment-based algorithms can detect highly similar regions and conserved areas across multiple sequences. Since the run time is linear and the sequences are converted into a compact clustering model, we are able to identify conserved regions fast or even interactively using a standard PC. Our method has many potential applications such as finding characteristic signature sequences for families of organisms and studying conserved and variable regions in, for example, 16S rRNA. With the development of Next Generation Sequencing techniques, there has been a massive increase in the number of sequences available. Analyzing such a large volume of sequence data presents a major computational challenge, especially since it often involves finding an optimal alignment between the sequences as a first step. Multiple Sequence Analysis (MSA), which is most commonly used for aligning a set of sequences, is computationally very expensive. In many bioinformatics applications  of a sequence.In this section, we present the foundation for the analysis and clustering framework. The basic unit of analysis for our case is a word inside a segment of a sequence. In the case of global frequency analysis used by alignment-free methods , a word Definition 1. segment Si,l is defined as a subsequence starting at position i and having length l, where l < L − .Next, we define the distribution of words within a segment.Definition 2. i,l, we define NSVi,l = Given a segment S〈f1, f2, . . . , 〉 as a vector of length 4p where each element fi, i = {1, 2, . . . , 4p}i,l and is referred to the segment's Numerical Summarization Vectors (NSV), represents the count of a possible p-mer in the segment. This vector represents the word frequency distribution in S.p controls how well the similarity between segments is approximated with larger values leading to better approximation while smaller values lead to faster computation. We find that p = 3, i.e. we count the occurrence of tri-mers within a segment, produces good results while creating NSVs of length 43 or 64. Cutting a sequence into segments and then creating NSVs is illustrated in Figure The set of NSVs for an entire sequence can be created by partitioning it into equal sized segments that may or may not overlap. For example, a sequence of length 1500 base pairs (bp) can be divided into 15 segments each of length 100 without any overlap between them. The word frequency distribution will later be used to find similar segments. Thus, the word size parameter After constructing NSVs for the entire set of sequences to be examined, we use high-throughput data stream techniques  to clustDefinition 3. GenModel M is defined as a directed graph A where the vertices are the set of clusters of NSVs and the edges E represent the ordering of the NSVs in the sequences. Each cluster contains metadata such as location in the original sequence and the sequence IDs.We can now reframe the problem of alignment as the problem of finding similar subsequences (segments) via clustering.Definition 4. quasi-alignment and the segments are said to be quasi-alignedEach cluster C in a GenModel M represents a set of similar segments and is referred to as a .By using clustering, we avoid the expensive alignment process and yet obtain information about local similarity between multiple sequences. The data stream clustering algorithm makes just one single pass through the segments and thus it has a linear time complexity in terms of the length and number of sequences. Also, new sequences can be added very efficiently to an existing model.p-mers  for fast sequence search.Clustering algorithms use similarity measures for comparing individual data points. In our case, the sequence data is converted into fixed dimension NSVs representing the word frequency distribution within segments. NSVs can be compared using standard measures for vectors such as Manhattan distance, Euclidean distance, squared Euclidean distance, Kullback-Leibler discrepancy and Mahalanobis distance . They caq-gram profiles (which in our case will be the p-mer profile). The Manhattan distance between two frequency vectors x and y obtained from the segments x sand y sis defined as:The distance between NSVs can be related back to the difference between the original sequence strings also. The difference between two sequences is measured in terms of edit distance , which ip-mers that are different between the two sequences. It can be shown that the Manhattan distance gives a lower bound for the edit distance between the two segments.The Manhattan distance simply computes the number of p new p-mers and destroy p existing p-mers. Note that in theory it is possible to create two completely different sequences with the same q-gram profile , howevep. For example, we often use a segment size of 100 bases with 3-mers and a Manhattan clustering threshold of 30. Equation 2 shows that this threshold means that the edit distance between two segments needs to be at least 30/6 = 5 to put them into two separate clusters. Note also that position specific p-mer frequency clustering is not restricted to using Manhattan distance, it can be used with any proximity measure defined on the frequency counts in NSVs.The relationship in equation 2 can be used to determine a reasonable clustering threshold for the data stream clustering algorithm in  for a giGenModels provide vital information about the similarity between segments in the form of quasi-alignments. This allows us to identify regions that are highly similar across multiple sequences. For sequences related by evolution, such as those from the same taxonomic unit, these segments are known as conserved regions.They are likely to be responsible for a particular function or provide a needed structural characteristic.GN06. We used the unaligned version of the sequences from the Greengenes database [l = 100 bases each, which were then aggregated with 3-mers (p = 3) and clustered using Manhattan distance and a clustering threshold of 30. The resulting GenModel contains 54 clusters or quasi-alignments. The plot shows each of the quasi-alignment as circles uniquely identified by an id. The circle size is proportional to the size of the clusters  and arrows represent the direction of the transitions between them. A stronger arrow indicates that the transition occurs with a higher probability. For example, Figure As an illustration, Figure database . The avaIn Figure To validate our claim that the segments that are clustered together into a quasi-alignment are indeed highly similar, we performed traditional Multiple Sequence Alignment (MSA) on the segments that are part of quasi-alignment 10. We used Clustal  availabl159470, has its bases shifted to the right by 29 bases. This can be the result of insertions/deletions (indels) in the sequences due to evolutionary processes. If this offset becomes too large, then it can interfere with clustering segments. This problem can be removed by using overlapping segments, i.e., considering many or all possible offsets. This increases the time complexity in the worst case by a fixed factor of l (segment length). It also makes makes visualizing quasi-alignments more complicated and therefore we will restrict the discussion in this paper to non-overlapping segment.It is interesting to note that in Figure Further validation of the location of the found conserved regions can be obtained by looking at biological evidence available in the literature. Studies have reported that 16S rRNA contains regions that are highly conserved within each species, but variable between species. These regions are known as hypervariable regions ,26, whicGN06 contains 13 sequences potentially from multiple species, which in the data have not been identified and hence are coded as unknown in the Greengenes database. Since the data contains several species, we would expect greater variations in the hypervariable regions than in the flanking, preserved regions. The top part of Figure GN06. The positions of the hypervariable regions are shown as blue lines labeled V1 through V9 at the top of the plot. It is very clear that our algorithm identifies regions that flank the hypervariable regions. For example, quasi-alignment 10 covers the nucleotide bases between the hypervariable regions V5 and V6. Similarly, quasi-alignment 4, 6, 31, and 14 cover the bases between hypervariable regions V2, V3, V4, V5, V6, V8 and V9. The plot in the lower part of Figure Nine identified hypervariable regions in 16S rRNA consist of nucleotides number 69-99, 137-242, 433-497, 576-682, 822-879, 986-1043, 1117-1173, 1243-1294 and 1435-1465, and are denoted by V1 through V9, respectively . The seqR framework called QuasiAlign which can be downloaded from http://r-forge.r-project.org/projects/mmsa/. This package has methods to quickly load a large set of sequence files, that can be in FASTA format with Greengenes [Biostrings [rEMM [We have implemented an open source software package using the eengenes  annotatiostrings  for handgs [rEMM ,31. It pgs [rEMM .l = 100 bases with no overlap between and segments and a word size of p = 3. For creating GenModels, the default is Manhattan distance with a clustering threshold distance of 30 which requires a minimum edit distance of 5 between two segments to place the into separate clusters (see equation 2 above).For the analysis in this paper, we have used the default parameters for creating NSVs and GenModels. The parameters for NSVs are a segment length of p-mer clustering can work with a set of DNA/RNA sequences or even fragments of sequences from any source. This is a valuable asset for metagenomic analysis and also fits in nicely with the requirements of Next Generation Sequencing methods. All experiments in this paper can be reproduced using the QuasiAlign [Position sensitive asiAlign  package.QuasiAlign allows us to directly import FASTA sequences with Greengenes annotations into a relational database for further analysis.The method presented here for discovering conserved regions is general enough to be applied to any set of sequences. For this analysis, we used the more than 400,000 16S rRNA sequences obtained from the Greengenes project . The 16SWe processed the entire Greengenes 16S rRNA database using the default settings for creating NSVs and GenModels and then analyzed the models for interesting patterns and clusters to search for highly similar or conserved regions across multiple sequences that may be related by taxonomy.Leptotrichia buccalis that belongs to the phylum Fusobacteria and genus Leptotrichia. The database contains 11 sequences of this species having lengths between 1310 and 1510 bases. We ran the position sensitive p-mer clustering algorithm on these sequences. The plot of the GenModel is shown in Figure As an example, we present an analysis of the species Cetobacterium somerae that belongs to the phylum Fusobacteria and genus Cetobacterium. There are 207 sequences in the dataset for this species having lengths between 1335 and 1472 bases. We created the GenModel shown in Figure A second example comes for the species Leptotrichia buccalis, we have identified in the sequences that the region between nucleotides 100 and 300 has a highly similar word frequency distribution. While this does not necessarily mean that all bases in this region will be perfectly aligned, it does indicate that this region is a good candidate for alignment. Therefore, the search space for the best alignment can be reduced from the entire sequence length to just the strongly quasi-aligned segments. This can result in substantial savings in computational resources and time and produce results more efficiently.There are several possible applications of our method. The first is to discover regions of very high sequence alignment by limiting the search space to regions of strong quasi-alignment. For the case of the species Leptotrichia buccalis, we discovered the region between nucleotide base positions 100-300 contain highly similar sequences. Further analysis of MSA results reveals that in this region the nucleotide positions 122-168 and 183-235 are exactly identical. These regions can form the basis of a more thorough DNA barcoding analysis.Another application is in the area of DNA barcoding , which sO(N2L2) where N the number of sequences having average length L [The existing methods for analyzing a group of sequences for similarity rely mostly on Multiple Sequence Alignment (MSA). Finding the optimal MSA is known to be NP hard and thus computationally challenging ,34. Varilength L .p-mer clustering makes just one pass through each of the sequences to create the NSVs and construct the GenModels. Thus, the time complexity of our method is O(LN) for N sequences of average length L. In addition, adding new sequences to an existing model is very easy since the use data stream clustering allows us to add new NSVs at any time.In contrast to the above methods, position sensitive The above advantages allow us to analyze a large set of sequences for similarity and allow easy discovery of conserved regions. Our algorithm can easily analyze the entire data set from the Greengenes  using a Fusobacteria and ran quasi-alignment and the Clustal [To compare run times of our method against MSA, we incrementally sampled between 10 and 100 sequences from the phylum  Clustal  implemenp-mer clustering, a technique which applies high-throughput data stream clustering to produce GenModels, where strong clusters represent potential areas of high sequence similarity. In contrast to MSA heuristics, the runtime of quasi-alignment scales linearly in the number of sequences and the average sequence length. This allows us to process larger number of sequences efficiently. We carried out experiments for sequences consisting of single and multiple species and verified the accuracy of our results by comparing them to traditional MSA and using biological evidence from the hypervariable regions.In this work, we have presented the foundation for quasi-alignment based on position sensitive There are many possible applications such as identification of identical DNA fragments and their positions within multiple sequences for DNA barcoding studies. Our methods can reduce the search space from the entire length of DNA sequences to just those regions that are part of stronger quasi-alignments. Other applications might include identification of sequences from their quasi-alignment models and finding interesting regions within sequences, such as those with high GC content.l, the segment length. We are currently working on expanding the QuasiAlign package to support use of overlapping segments.In this paper we have restricted our discussion to creating non-overlapping segments. For dealing with sequences which contain a larger amount of insertions and deletions or for classification of shorter fragments sampled randomly from the sequence, it is necessary to use overlapping segments while constructing GenModels. The runtime complexity increases only by the constant factor The authors declare that they have no competing interests.Both authors contributed equally to this paper. All authors read and approved the final manuscript.


Despite significant advancement in alignment algorithms, the exponential growth of nucleotide sequencing throughput threatens to outpace bioinformatic analysis. Computation may become the bottleneck of genome analysis if growing alignment costs are not mitigated by further improvement in algorithms. Much gain has been gleaned from indexing and compressing alignment databases, but many widely used alignment tools process input reads sequentially and are oblivious to any underlying redundancy in the reads themselves.Here we present Oculus, a software package that attaches to standard aligners and exploits read redundancy by performing streaming compression, alignment, and decompression of input sequences. This nearly lossless process (> 99.9%) led to alignment speedups of up to 270% across a variety of data sets, while requiring a modest amount of memory. We expect that streaming read compressors such as Oculus could become a standard addition to existing RNA-Seq and ChIP-Seq alignment pipelines, and potentially other applications in the future as throughput increases.http://code.google.com/p/oculus-bio.Oculus efficiently condenses redundant input reads and wraps existing aligners to provide nearly identical SAM output in a fraction of the aligner runtime. It includes a number of useful features, such as tunable performance and fidelity options, compatibility with FASTA or FASTQ files, and adherence to the SAM format. The platform-independent C++ source code is freely available online, at  Nucleic acid sequencing throughput has grown exponentially for the past ten years, and is expected to continue to shatter Moore’s law . Though Much intellectual effort has been invested in minimizing the time required to align a single read against an indexed database. When performed sequentially, each sequence in the input is processed individually, such that the sum of the alignment times of the input sequences is the total running time. Today’s fastest and most widely used aligners, such as Bowtie , BWA 4]4], MAQ , RazerS Harnessing redundancy in sequence alignment input is not a new concept. BLAST + gains a performance benefit by saving alignments within batches . CloudbuWe explored the nature of read redundancy across thirteen publicly available next-generation nucleotide sequencing datasets. In a series of experiments we measured the contributions of the application , read length, and sequencing depth to overall read redundancy, measured in the percentage of unique reads. Using these observations, we wrote the streaming read compression algorithm Oculus and constructed a model to determine the value of streaming read compression for a given dataset. Finally, we benchmarked Oculus on full sequencing datasets.We evaluated thirteen publicly available datasets that were representative of the major applications of high-throughput sequencing, identified here by their NCBI Sequence Read Archive (SRA) accession numbers. There were five RNA-Seq datasets (ERS025093 (pooled), and SRR097790, SRR097792, SRR097786, and SRR097787 from the iDEA challenge), three genome datasets , three Exome sequencing datasets , and finally two ChIP-Seq datasets: ). The ChIP-Seq data was downloaded from the ENCODE Project , hosted The sequencing datasets we selected varied widely in their composition. We compared read redundancy between sequencing types by standardizing the number of reads per dataset to 24 million with random subsetting, and read length to 36 bases with 3’ end trimming (both lowest common denominators). RNA-Seq had relatively redundant reads; only 43% to 57% of each single-end dataset was unique Figure . In contGiven some fixed input DNA from which fragments are sampled, each incremental read will be more likely to duplicate previous reads. In particular, RNA-Seq reads may disproportionately reflect highly expressed genes, suggesting that higher sequencing coverage could have a nonlinear effect on read redundancy . TherefoThe overall architecture of Oculus is shown in Figure By design, Oculus sacrifices FASTQ quality scores, read names beyond the first instance of the sequence, and the original order of the reads in the output. Optionally, users can direct Oculus to restore the original read names and quality scores by writing them to an intermediate file, sorting it, and reattaching them during the reconstitution step. This option incurs additional memory overhead, and additional time to sort the intermediate file.Oculus uses hashmap data structures to store sequences in memory. Users can either compile in standard library (STL) hashmaps, or Google-SparseHash maps, which are faster and require significantly less memory (2 bits of overhead per entry) .Optionally, users can direct Oculus at runtime to store unique reads in a separate hashset, reducing the burden on the hashmap to only redundant sequences. The effect of this is to reduce lookup times in the reconstitution step and total memory consumption, at the cost of more operations in the compression step. Hashsets are expected to be beneficial for lower redundancy input.Oculus uses a modified version of MurmurHash2 to hash binary sequence data . It has Instead of storing sequences in memory as ASCII characters, Oculus uses compressed sequence objects of our own design (cseqs) Figure . DNA seqThe most obvious benefit of using cseqs is an approximate four-fold reduction in memory use. However, two engineering benefits also arise for cseq string comparison, which help efficiently resolve map collisions. Sequences with different lengths or representations can be differentiated by comparing the first byte in constant time (very quickly). Moreover, by comparing nucleotides in blocks instead of individually, comparison time is reduced four-fold. Memory for sequences is allocated in large chunks (default: 10kB), which reduces overhead greatly.Lastly, Oculus can be directed to compress together reverse complements in single-end data, or reversed read order in forward-reverse oriented paired-end data, under the presumption that they should align to the same place in the database. This improves compression and therefore reduces aligner runtime. Using reverse complements is optional because BWA and Bowtie both use left-end seed sequences, so the orientation of the read can affect its alignment .i input reads that compress to Nc sequences, and assuming sa and so are the speeds of the aligner and Oculus, in reads/unit time, the following equations give the expected benefit of using Oculus as a fraction of the aligner’s run time.We developed a model to predict the effectiveness of Oculus for any given data set. Given Nc of Na into the aligner, the aligner only has to do Nc/sa work. However, there’s also an overhead for Oculus on the order of the total number of input reads. The fractional benefit of using Oculus is therefore related only to the compression achieved and Oculus’s speed relative to the aligner it’s wrapping. We therefore derived processing rates in reads per second for Oculus and each aligner, for both single-end and paired-end data, using experimental results for the 50 and 51-mer datasets. Table The aligner’s run time is simply the total number of input reads divided by the average alignment speed in reads per unit time of the aligner. In the second case, since Oculus passes some fraction NWe compared the performance of Oculus with BWA (version 0.5.9-r16) and Bowtie 1 (version 0.12.7 64-bit) by themselves. All alignment was performed against the reference human genome GRCh37/hg19.Every benchmarking test was run on the Flux supercomputing cluster maintained by the Center for Advanced Computing at the University of Michigan, using single CPU cores of 2.67 GHz Intel X5650 processors, with 64 GB of 1333 MHz DDR3 memory, and distributed access disks. To reduce noise in runtime measurement from disk I/O, each benchmark test was run three times, and the average runtime is presented here. Memory consumption was much less noisy, so similar averaging was unnecessary in reporting memory use. Both aligners ran with entirely default options, and Oculus used only the reverse complement storage option, “--rc”.To test consistency, we ran Bowtie using “-m 1” to eliminate multi-mapping reads, for which Bowtie reports one random alignment by default. We extracted alignment positions, sorted by read sequence (grouping together forward and reverse orientations), and counted and classified alignment differences. BWA has no such mono-mapping option, so we did not test Oculus’s wrapping of BWA for consistency (BWA was still tested for performance).Oculus yielded performance benefits that strongly correlated with the unique read fraction of each dataset Figure . NotablyThough BWA was much slower than Bowtie for single-end data, and somewhat slower for paired-end data, Oculus produced similar fractional speed improvements for the two aligners. Additionally, for the datasets tested, Oculus’s hashset option did not yield a significant improvement. For sequencing run information and exact CPU run times, see Additional file Oculus maintained high fidelity to original alignments for every dataset. Defining accuracy as the percentage of input reads that Oculus mapped to exactly the same location as the aligners, on average Oculus was >99.9% accurate, and in the worst case was 99.874% accurate. For individual dataset accuracy, see Additional file Since they change the seed sequence used in alignment, the vast majority of the differences (inaccuracies) produced were for reads that Oculus either reversed the orientation of (88% of single-end differences), or order of (67% of paired-end differences). Mostly these were previously unaligned reads that aligned and vice versa, but in some cases, an unambiguously mapped read actually changed alignment positions . Though initially surprising, this can be explained by mismatches in seed sequences. Bowtie is less permissive of mismatches in the seed than at the end of a read under the assumption that read quality tends to be better toward 5’ end. Of two closely homologous regions of the genome, one may count as the best hit in the forward orientation, and the other in reverse orientation. For example:CAGT - readCATT – genome position 1CCGT – genome position 2In this case, if CA is the seed, position 1 would be the optimal alignment and the third base would count as a G-T mismatch. However, if the reverse-complement were aligned, and the seed proceeded from the opposite direction, position 2 would be optimal and the third base would be recorded as a C-A mismatch.Oculus very consistently used (sequence length/4) + 20 bytes of memory per map entry. This 20-byte overhead comes from the forward and reverse count integers (4 each), the hash of the sequence (4), a pointer to the sequence (up to 8 on a 64-bit OS), the size field (2), and some heap memory structure overhead. Although these sum to 22 bytes, hash values are not stored multiple times for hash collisions, and pointer memory use varies by OS architecture, often using less than 8. This 20-byte overhead is halved for paired-end map entries, because each pair is stored together. Using the hashset option reduced memory use by about a third, by mitigating some of this overhead for unique reads.Total memory use is therefore highly dependent on the quantity and redundancy of input sequence, but in a worst-case scenario (perfect non-redundancy), 100 million single-end 80mers will use about 3.7 GB of memory, on top of memory used by the aligner’s database. Redundancy translates linearly to reduction in memory use – if only half of those reads were unique, 1.85 GB would be required instead.Our benchmarking tests suggest Oculus will generally perform very well with RNA-Seq data and on a case-by-case basis in other applications, particularly those with low complexity libraries. The likely source of benefit to RNA-Seq arises from highly expressed genes that are sequenced at great depth and generate multitudes of duplicate reads.a/so - > 0), so streaming read alignment will be of greater use to applications that require such sensitivity. Perhaps most importantly, as sequencing throughput increases so too will read redundancy and the marginal benefit of compressing input reads, though this will be mitigated by longer read lengths and paired-end reads.Shorter read length and larger datasets both correlated with higher redundancy in sequencing runs. The hidden variable of actual biological redundancy remains at large , but those two metrics provide good insight into the expected value of streaming read compression for a given sequencing application. We noted the added value Oculus provides for RNA-Seq applications that segment reads , but Oculus may also yield benefit to customized bioinformatics analyses that take similar approaches. Also of note is that for highly-sensitive but slow aligners such as BLAT  and SmitTo be effective, Oculus requires read redundancy and an aligner that does not already exploit that redundancy. To be consistent, Oculus requires the aligner to ignore quality score and use parameters that guarantee deterministic behavior. By default, Bowtie will report one alignment at random for ambiguously mapping reads, and Oculus by definition cannot produce multiple alignments for a single read sequence. The exception to this is if the aligner is configured to report multiple alignments per read, either on single or multiple SAM lines, in which case Oculus will reconstitute the reads aligning to each location.Since both Bowtie and BWA use left-end seeds, it makes sense that Oculus may report different alignments for reverse-complemented single-end reads. However, we were surprised to find alignment differences for paired-end reads with reversed order. Read order shouldn’t matter in paired-end alignment: since the read orientation remains the same, so should the seeds. Developers who wish to incorporate streaming read compression into their aligners may be interested in exploring this phenomenon.Another surprising result was that Oculus + Bowtie actually outperformed compression for the second ChIP-Seq data set . Stranger still, the runtime data for that dataset was not noisy – each of the three tests ran in < 28% of the original time. It is possible that Oculus may have compressed a disproportionately large number of slow-aligning reads – reads that take longer to align to the human genome. Better understanding this phenomenon may be a key to further alignment algorithm improvements.Though Oculus provides immediate benefit to RNA-Seq alignment, further performance gains may be possible by harnessing the idea of streaming read compression. Although implemented here as a customizable “attachment” to a sequential aligner, the streaming compression algorithm could be integrated directly into alignment kernels. One obvious benefit of this would be the ability to store paired-end reads individually (with an extra bit denoting the read number) thereby leveraging additional redundancy , g++ version 4.1.2 or higher (lower versions may work but are untested), Bowtie or BWA , or another SAM-compatible alignment algorithmLicense: GNU GPL v3DNA: Deoxyribonucleic acid; BWA: Burroughs-Wheeler aligner; RNA-Seq: Ribonucleic acid sequencing; ChIP-Seq: Chromatin immunoprecipitation sequencing; SAM: Sequence alignment map; MAQ: Mapping and Assembly with Quality; BLAST: Basic local alignment search tool; STL: Standard library; ASCII: American standard code for information interchange; I/O: Input/output; CPU: Central processing unit; GHz/MHz: Gigahertz/Megahertz; DDR3: Double data rate type 3; OS: Operating system; GB/MB: Gigabyte/Megabyte; PCR: Polymerase chain reaction; BLAT: BLAST-like alignment tool; GPL: GNU public license; GNU: GNU’s not Unix.The authors declare that they have no competing interests.BAV provided the original idea, wrote the algorithm, performed the benchmarking, modeling, and data interpretation, and drafted the manuscript. MKI contributed critical feedback on the manuscript, suggestions for datasets, and the reverse complement idea. AMC contributed critical feedback on the manuscript and the project, and provided the computational resources necessary to carry out the work. All authors read and approved the final manuscript.Table S1. Oculus performance statistics. Detailed benchmarking data used in generating runtime figures.Click here for file


Statistical methods for phylogeny estimation, especially maximum likelihood (ML), offer high accuracy with excellent theoretical properties. However, RAxML, the current leading method for large-scale ML estimation, can require weeks or longer when used on datasets with thousands of molecular sequences. Faster methods for ML estimation, among them FastTree, have also been developed, but their relative performance to RAxML is not yet fully understood. In this study, we explore the performance with respect to ML score, running time, and topological accuracy, of FastTree and RAxML on thousands of alignments  with up to 27,634 sequences. We find that when RAxML and FastTree are constrained to the same running time, FastTree produces topologically much more accurate trees in almost all cases. We also find that when RAxML is allowed to run to completion, it provides an advantage over FastTree in terms of the ML score, but does not produce substantially more accurate tree topologies. Interestingly, the relative accuracy of trees computed using FastTree and RAxML depends in part on the accuracy of the sequence alignment and dataset size, so that FastTree can be more accurate than RAxML on large datasets with relatively inaccurate alignments. Finally, the running times of RAxML and FastTree are dramatically different, so that when run to completion, RAxML can take several orders of magnitude longer than FastTree to complete. Thus, our study shows that very large phylogenies can be estimated very quickly using FastTree, with little (and in some cases no) degradation in tree accuracy, as compared to RAxML. Phylogeny estimation is an important part of much biological research. Methods (either Bayesian or maximum likelihood) based upon stochastic models of sequence evolution have many desirable statistical properties, but are also computationally the most challenging. Bayesian MCMC methods , in which we constrain RAxML's running time so that it is not substantially longer than FastTree's.Our study shows that in many cases, phylogenetic analyses of very large nucleotide alignments can be performed using FastTree without a substantial difference in tree accuracy, and in a small fraction of the time needed by RAxML. Thus, FastTree represents an important contribution achievement in the state of the art for ML tree estimation on nucleotide sequence alignments.www.cs.utexas.edu/users/tandy/science-paper.html. These alignment were estimated on simulated datasets , all the model conditions showing statistically significant differences between RAxML and FastTree favored RAxML. The average improvement on these model conditions was 0.5% on the true alignment, 0.5% on the SATé alignment, and 1.1% on the MAFFT alignment. Thus, although there were statistically significant differences, their magnitudes were small.On the less accurate alignments, we see some interesting differences. On the ClustalW alignments, nine of the ten harder model conditions showed statistically significant differences between RAxML and FastTree: two showed RAxML having an advantage over FastTree (but with the average improvement only 0.4%), and seven showed FastTree having an advantage over RAxML (average improvement 2.1%). On the Quicktree alignments, eight of the ten model conditions showed statistically significant differences, with three in favor of FastTree (average improvement 1.2%) and five in favor of RAxML (average improvement 1.1%). Finally, on the PartTree alignments, eight of the ten harder model conditions showed statistically significant improvements, all in favor of FastTree (average improvement 0.6%).Thus, with respect to tree topology accuracy, the relative performance of RAxML and FastTree depended upon both the model parameters and alignment accuracy, RAxML tending to have an advantage on alignments that were highly accurate , and FastTree tending to have an advantage otherwise. Furthermore, although many of the differences were statistically significant see  and S6, A comparison of running times shows dramatic differences among these three methods . Note thWe studied performance on ten ribosomal RNA datasets with 117 to 27,643 sequences from CRW , only the Quicktree and PartTree alignment methods could be run The next two largest datasets, 16S.3 and 16S.T, have 6323 and 7350 sequences, respectively, and represent comparable challenges. For these datasets we were able to obtain alignments from all five alignment methods, the sole exception being MAFFT on the 16S.3 dataset, which failed due to memory requirements on a machine with 32 GB of main memory.RAxML produced more accurate trees than RAxML-Limited on all alignments, with differences ranging from small (about 1.5%) to large (about 6%) . RAxML pAs before, RAxML produced more accurate trees than RAxML-Limited, and RAxML-Limited produced the least accurate trees . The relThe study showed that RAxML produced better ML scores than both FastTree and RAxML-Limited, and topologically more accurate trees than RAxML-Limited, in almost all cases. However, the relative performance of FastTree and RAxML depended upon the alignment and dataset, so that RAxML typically produced slightly more accurate trees than FastTree on the large datasets. et al.'s study We now compare our study to Price Our results are in agreement with Our study examined the relative performance of two variants of RAxML and FastTree on nucleotide datasets, including several very large biological datasets  and simulated datasets with 1000 sequences. The results of our study establish the following. First, RAxML clearly produces better ML scores compared to RAxML-Limited and FastTree, and topologically more accurate trees than RAxML-Limited, in almost all cases. When used with highly accurate alignments, RAxML also tends to produce topologically more accurate trees than FastTree, but the differences tend to be small on large datasets. When used with less accurate alignments  at www.cs.utexas.edu/users/phylo/datasets/tol/tol.html). We used the following commands with these programs:Multiple sequence alignments were produced using MAFFT  version 6.240 MAFFT L-ins-i default:mafft –localpair –maxiterate 1000–quiet <input>><output>MAFFT PartTree:mafft –parttree –retree 2–partsize 1000 <input>><output>ClustalW default:clustalw2 -align -infile = <input>-outfile = <output> -output = fastaClustalW Quicktree:clustalw2 -align -infile = <input>-outfile = <output> -output = fasta-quicktreeSATé :./sate_basic.pl -r <name of run>-w <empty temporary work directory with full path>-d <input unaligned sequences file with full path>-l 1 -s 1 -a 5To perform ML analyses, we used RAxML version 7.2.6 and FastTree version 2.1.3. The following commands were used to run these programs:RAxML (and RAxML-Limited):raxmlHPC -m GTRCAT -w <work dir>-n <identifying suffix> -s <input> -jFastTree:FastTree -nt -gtr -nosupport-log <log file> <input alignment>><output tree>Where necessary, we parallelized the RAxML analyses by either recompiling with PTHREADS and using the flag -T <number of threads> or by recompiling with MPI; the parallelization did not otherwise affect the RAxML commands. RAxML's outputs were unaffected by parallelization, and all reported runtimes are for serialized execution.For all datasets except the three largest biological datasets, SATé and two-phase analyses were performed using a heterogeneous Condor To run SATé and the two-phase methods on the 16S.T and 16S.3 datasets, we used a 64-bit computing cluster at the University of Texas at Austin, consisting of machines with 8-core 2.83 GHz Intel Xeon 64-bit CPUs with 32 GB main memory per CPU. Due to the memory requirements of SATé and the two-phase methods on the 16S.B.ALL dataset, we used two machines with very large shared memory, each having a 16-core 64-bit AMD Opteron CPU running at 2.5 GHz, and with either 128 GB or 256 GB main memory.Figure S1ML scores of ML methods on alignments of simulated 1000-taxon datasets. ML scores are computed using RAxML, and then normalized by the ML score obtained on the RAxML(MAFFT) topology. Standard error bars are shown. n = 20 for each reported value. Using one-tailed pairwise t-tests with Benjamini-Hochberg correction α = 0.05 and n = 40 for each test). Using similar tests, FastTree's ML score is a statistically significant improvement over RAxML-Limited's ML score for all alignments of all model conditions (α = 0.05 and n = 40 for each test).(EPS)Click here for additional data file.Table S1Simulation parameters and empirical statistics for the 1000-taxon datasets. The model conditions varied the gap length distribution, the probability of a gap event, and the model tree height according to the simulation procedure described in (TIF)Click here for additional data file.Table S2Q-values from statistical tests comparing the missing branch rates of FastTree and RAxML-Limited. One-tailed pairwise t-tests were used to check if FastTree's missing branch rate was a significant improvement over RAxML-Limited's missing branch rate. n = 40 for each test.(TIF)Click here for additional data file.Table S3Q-values from one-tailed pairwise t-tests comparing the missing branch rates of RAxML and FastTree. One-tailed pairwise t-tests were used to check if RAxML's missing branch rate was a significant improvement over FastTree's missing branch rate. Similar tests were used to check if FastTree's missing branch rate was a significant improvement over RAxML's missing branch rate. All q-values were corrected for multiple comparisons using the Benjamini-Hochberg method n = 40 for each test.(TIF)Click here for additional data file.Table S4Q-values from statistical tests comparing the ML scores of RAxML and FastTree. One-tailed pairwise t-tests were used to check if RAxML's ML score was a significant improvement over FastTree's ML score. n = 40 for each test.(TIF)Click here for additional data file.Table S5Q-values from statistical tests comparing the ML scores of FastTree and RAxML-Limited. One-tailed pairwise t-tests were used to check if FastTree's ML score was a significant improvement over RAxML-Limited's ML score. n = 40 for each test.(TIF)Click here for additional data file.Table S6Q-values from  tests comparing the missing branch rates of RAxML and FastTree.n = 40 for each test.(TIF)Click here for additional data file.Table S7Empirical statistics for the biological datasets. From left to right, the dataset name, number of taxa, number of aligned sites in the reference alignment, resolution of the reference tree, average and maximum p-distance of the reference alignment, percentage of the reference alignment consisting of indels, and average gap length of the reference alignment are shown. The resolution of the reference tree is the number of internal edges in the reference tree divided by the maximum possible number of internal edges in the reference tree . The p-distance between two aligned sequences is defined as the percentage of sites for which the two sequences have differing nucleotides. The average p-distance in an alignment is the average p-distance for all pairs of aligned sequences in the alignment, and the maximum p-distance in an alignment is the maximum p-distance for any pair of aligned sequences in the alignment.(TIF)Click here for additional data file.


Summary: We propose SW#, a new CUDA graphical processor unit-enabled and memory-efficient implementation of dynamic programming algorithm, for local alignment. It can be used as either a stand-alone application or a library. Although there are other graphical processor unit implementations of the Smith–Waterman algorithm, SW# is the only one publicly available that can produce sequence alignments on genome-wide scale. For long sequences, it is at least a few hundred times faster than a CPU version of the same algorithm.Availability: Source code and installation instructions freely available for download at http://complex.zesoi.fer.hr/SW.html.Contact:mile.sikic@fer.hrSupplementary information:Supplementary results are available at Bioinformatics online. Sequence alignments are fundamental in bioinformatics, as they can provide information about unknown genes and proteins. They also have an important role in comparative sequence assembly . In sequTwo classic algorithms for local alignment are Smith–Waterman  and BLASThe increasing popularity of using CUDA-enabled graphical processor units (GPUs) has intensified work on accelerating the Smith–Waterman algorithm. However, to the best of our knowledge, the only pairwise GPU implementation with optimized space complexity tested on the chromosome level is CUDAlign , but it In this article, we present our parallel implementation of the Smith–Waterman algorithm.The Smith–Waterman algorithm could be divided into two phases: solving and reconstruction. In the solving phase, the maximum score is calculated, whereas the optimal alignment path is derived in the reconstruction phase. The easiest approach for the reconstruction phase is by backtracking the solved matrix, but this requires quadratic space complexity. The space-efficient methods use either of the following approaches: storing each nth solved row in the matrix and using them in reconstruction phase and the divide and conquer approach . CUDAligB*T cells can be calculated at the same time, where B is the number of CUDA blocks and T is the number of CUDA threads. The outputs of the solving phase are the total score and the endpoint of the alignment. Here, we present how this phase could be divided into two subproblems and run faster with two GPU cards (t (edit distance) is calculated as the ratio between the alignment score and the highest substitution score. If the lengths of the subsequences are m and n, where m > n, parameter m′ can be calculated as min(n+(n–t)/ge, m), where ge is the gap extension penalty. Padding p can then be calculated as ceil(0.5*(2*n–t–m′)). This observation is done by calculating the maximum score that a cell can reach and comparing it with the found score. The cell blocks that do not contain any of the diagonals between −p and p+(m–n) are pruned.In the solving phase, we used parallelization and the pruning method given by PU cards a. ApplyiPU cards . The maxt is calculated as max–score, where m and n are the lengths of the sequences between the startpoint and the endpoint, and the score is the alignment score. The Myers–Miller algorithm is applied recursively in this manner. Difference from the original algorithm is that it stops as soon as the solving submatrix size drops below defined boundaries. When this size is small enough, GPU part sends it to the CPU part. As the scores of the submatrices are known, the CPU part performs the banded algorithm with the backtracking. Finally, alignments of the submatrices are joined in the complete alignment.The reconstruction phase considers only the cells between the start and the endpoint c. We comApplication run times are displayed in