The various roles of versatile non-coding RNAs typically require the attainment of complex high-order structures. Therefore, comparing the 3D structures of RNA molecules can yield in-depth understanding of their functional conservation and evolutionary history. Recently, many powerful tools have been developed to align RNA 3D structures. Although some methods rely on both backbone conformations and base pairing interactions, none of them consider the entire hierarchical formation of the RNA secondary structure. One of the major issues is that directly applying the algorithms of matching 2D structures to the 3D coordinates is particularly time-consuming. In this article, we propose a novel RNA 3D structural alignment tool, STAR3D, to take into full account the 2D relations between stacks without the complicated comparison of secondary structures. First, the 3D conserved stacks in the inputs are identified and then combined into a tree-like consensus. Afterward, the loop regions are compared one-to-one in accordance with their relative positions in the consensus tree. The experimental results show that the prediction of STAR3D is more accurate for both non-homologous and homologous RNAs than other state-of-the-art tools with shorter running time. Non-coding RNAs (ncRNAs) play diverse cellular functions in biological systems –4. Unlikn) in the RNAs by using hash tables. Similar to LaJolla, FRIEs  are determined by the superimposition of their atomic coordinates. With this local structural equivalence, the optimal global alignment is generated by using 3D least squares fitting. Unlike the previously mentioned tools, DIAL  , a numbea, FRIEs  also use. Rclick  is anothls, DIAL  incorporls, DIAL . Then thThe other group of RNA 3D structural alignment tools relies on the comparison of base pairing interactions in the molecules. In ARTS , two sucO(n3)] ] –27, applHere, we propose a novel RNA 3D structural alignment tool called STAR3D that explicitly makes use of the conservation of secondary structures with high efficiency. It aims at finding the consensus of stacks by using 2D topology and 3D geometry first, and then uses it to guide the alignments of the loop regions. To achieve this goal, first, the sub-stacks with similar 3D structures are detected and assembled into conserved stack pairs. Then, a compatible graph is constructed based on their secondary structural relations and spatial distances. In this graph, the maximum clique can be converted into a tree-like consensus structure of two RNAs. After that, the loop regions are ordered by the common tree. Each of them only needs to be compared with its partner by using 3D information. STAR3D has been implemented in Java. The benchmarking results show that STAR3D outperforms the state-of-the-art RNA 3D structural alignment tools with high efficiency.The inputs of STAR3D are the atomic coordinates of two polymer RNA chains, which are presented in the corresponding PDB files. They are preprocessed to obtain the RNA secondary structures to guide the 3D structural alignment. All plausible pairing interactions are identified by using MC-Annotate ,29. Amonk, namely k-stacks. A stack with l base pairs (l ≥ k) can be divided into l − k + 1 overlapping k-stacks. All the possible k-stacks are collected for further processing.Helical structured stacks are formed by consecutively nested Watson–Crick base pairs and wobble base pairs. To detect the 3D structural conservation in the stacks efficiently, the double-stranded regions in the pseudoknot-free secondary structures are decomposed into consecutive sub-stacks of size k-stack, we introduce some basic notations. Given an RNA A, the 3D coordinates of the i-th residue are denoted as A[i]. At the secondary structure level, the set of k-stacks in the pseudoknot-free structure is denoted as k-stack b(pA) and the index of the rightmost base (3′ end) is represented as e(pA). Thus the 3D coordinates of the double-stranded subsequences in pA are A[b(pA)…b(pA) + k − 1] and A[e(pA) − k + 1…e(pA)], which are defined as 3D(pA).Based on the definition of k-stacks  in the inputs are retrieved as the building blocks for the larger conserved regions. Shorter helices are not considered because of their low occurrence in the real RNAs.STAR3D identifies the stack components conserved in 3D structures as anchors and uses them to constrain the global alignment. Similar approaches have been applied in numerous computation-efficient tools for genome alignment ,34 and RA and B, the two sets of k-stacks k-stacks in A and B are determined by their RMSDs. Ci, j, the indicator of conservation for RMSD measures the average spatial distance between the superimposed residues in rc being the RMSD cutoff   to represent the number of base pairs in qA. Hence 3D(qA) are A[b(qA)…b(qA) + l(qA) − 1] and A[e(qA) − l(qA) + 1…e(qA)].Given two input RNAs  is 4 Å) . In our  is 4 Å)  by using is 4 Å) . The inde-stack pairs are too large for computation. To determine the highly significant ones, we consider two criteria: the RMSD between two e-stacks and their size. The significant scores of e-stack pairs are defined using the formula e-stack pairs are sufficient to cover most of the conserved helical regions in 23S rRNAs, the largest RNAs in PDB. More e-stack pairs may be used by setting the parameter if more complex structures are presented.For some large RNAs, the numbers of e-stack pairs in the secondary structures and 3D space are analyzed. In the pseudoknot-free secondary structure of A, two e-stacks directly encloses directly before and juxtaposed to To generate a consensus of stacks, the positions of E and ≺J are strict partial orders, so the non-overlapping e-stacks in an RNA can form a directed acyclic graph. It is well-known that the RNA secondary structures have a tree-like topology  of the tree construction procedure, the orders of their children should be the same. Then it is proved that the lemma holds for the top two levels of the trees. Assume it is also true for the top n levels. Then for an e-stack n-th level, its partner n-th level and their relative positions on the trees are the same. Assume an e-stack n + 2)-th or lower levels, otherwise the numbers of the ancestors of e-stack pairs, and they can be sorted by the juxtaposing relation. By induction, we know the lemma is true.Without loss of generality, we assume that e-stack configuration for the consensus, we construct a compatible graph. The vertices are the e-stack pairs. A vertex si is connected to another one sj if they meet two requirements. First, si and sj are compatible, which ensures the e-stacks in them are well-ordered in the secondary structures. Second, si and sj must satisfy si and sj share similar rigid transformation . Therefore, the 3D similarity requirement will filter most of the improper edges, and make the compatible graph very sparse. Although normally finding the maximum clique takes exponential time, it is solved very efficiently in our method. Figure Lemma 1 indicates how to find the 3D structural consensus of the stack regions in two input RNAs. Thus, to detect the lgorithm . After te-stacks can be identified. For the internal nodes, their enclosed regions are split by their children nodes into internal loops, bulges, or multi-loops. Hence, the numbers of loops in the inputs are the same, and we can find the mapping of them by traversing the tree. This approach has two benefits. First, the computational efficiency of loop alignment can be improved significantly for large RNAs, because only the matched loops need to be aligned together. Second, the superimposition of stack regions can be used to guide the 3D structural alignment of loop regions. For the functional RNAs, the stack regions are more conserved than the loop regions. Thus, any RMSD computation during the loop alignment uses the rotation and translation of the stack alignment.With the tree-like consensus of stacks, all the other regions not in it can be divided into ordered loops. For one leaf node, two hairpin loops enclosed in two k-th pair of matched loops are o and εe are the gap open penalty and gap extension penalty. I, D, M denote the optimal alignment scores for insertions, deletions and substitutions, respectively. These functions are initialized with M0, 0 = I0, 0 = D0, 0 = 0, Mi, 0 = Mj0,  = −∞, Ii, 0 = εo + εe × i, Dj0,  = εo + εe × j, Ij0,  = Di, 0 = −∞. The optimal score is A dynamic programming algorithm with quadratic-time complexity is applied to the 3D structural alignment of two loops. Assume the 3D structures of i, j) and β. The function α is based on the 3D distance between two bases. The corresponding formula is:di, j denotes the RMSD between two nucleotides di, j. The possible values of di, j can be categorized into three groups. The two nucleotides are not allowed to be aligned if the spatial distance is too large (≥2 · rc). Otherwise, they are defined to be ‘matched’ or ‘mismatched’ and the matched nucleotides may be assigned with two different scores.The scores for substitution contain two parts: α calculates the bonus scores for the base pairs in loop regions. Pseudoknots, non-canonical base pairs and canonical base pairs in the unaligned stack regions are considered in the computation. Due to the potential crossing in pseudoknots and non-canonical base pairs, finding the optimal matching of these pairing interactions is an NP-hard problem. To reduce the running time, we propose a heuristic algorithm to solve the problem. Generally, each base has three possible pairs: Watson–Crick base pair, Hoogsteen base pair and Sugar base pair . The match of two base pairs is valid if the corresponding RMSD is less than rc. The maximum number of matched pairs is returned as the result of β. Thus the problem is converted into bipartite graph matching, which can be solved by dynamic programming.The second function β, SARA (v1.0.7) and R3D Align in this section. Their batch programs are available and widely used for performance testing. In addition, they can output the exact one-to-one mapping of nucleotides, which is important for the analyzing of specific alignments of homologous and non-homologous RNAs. R3D Align is dedicated to homologous RNAs. To make the comparison fair, it is only used in the experiments for homologous rRNAs. An in-house modification of LaJolla is implemented to output not only the rigid transformation but also the exact alignments. All the experimental results were performed with default parameters. To evaluate the secondary structure similarity and optimize the superimposition, ‘-b’ and ‘-s’ options are specified for SARA. Both ARTS and LaJolla generate ‘disordered alignments’, e.g. The R-FSCOR dataset  containse-stacks in the inputs are less than k(=3). However, the alignments for these inputs can be detected if a smaller k (e.g. 2) is specified. In addition, RNAMotifScanX  23S rRNA . The aligned regions and the corresponding secondary structures are shown in Figure The first example is the alignment between a GNRA motif  and a Haloarcula marismortui (H. marismortui) and 11 from D. radiodurans. The 3D structural alignments of the motif and all the 23S rRNAs are analyzed. Compared with the GNRA motif, sarcin-ricin is more complex: it contains 27 residues, 6 canonical base pairs and 4 non-canonical base pairs. For ARTS and LaJolla, no highly conserved region is found in those rRNAs. SARA can detect potential motifs in all the H. marismortui 23S rRNAs, but none in the D. radiodurans 23S rRNAs. STAR3D not only finds the motif candidates in H. marismortui 23S rRNAs, but also in 6 of 11 D. radiodurans 23S rRNAs. To verify the detected motifs, the docking results of the alignments are analyzed. An example alignment of the sarcin-ricin motif and one H. marismortui 23S rRNA is shown in Figure D. radiodurans 23S rRNA, we can find the structural variance in the motif regions. For the five rRNAs in which STAR3D can not detect the motifs, only four base pairs are annotated in the helix of the motif regions. The different annotation between these regions and the sarcin-ricin motif, which has five base pairs in the stack, disallows STAR3D to make the correct prediction.The sarcin-ricin motif is an important structural motif involved in the interaction between rRNAs and the elongation factors . In the H. marismortui , Escherichia coli  and Thermus thermophilus ; and two 16S rRNA chains from two species: T. thermophilus  and E. coli . We also used the two manually generated alignments of these 16S rRNAs as references. The first one is the Crystallographer alignment, which is implied in the numbering system used by the crystallographers; the second one is the Composite alignment, which is hand-crafted and based on comparative analysis. They have been used as benchmarking dataset before . In STAR3D, one loop region only needs to be compared with another one marked by the e-stacks. Thus the time complexity is O((n1 × n2)/m), where m denotes the number of e-stack pairs in the consensus. With the relatively large number of stacks in RNAs with complex structures, our method can significantly improve the efficiency of the loop alignments.First, we compare the running time of five tools for the rRNA alignments (see Table Based on manually generated alignments of two 16S rRNAs, the accuracy of five tools is also examined. The results are shown in Table e-stack pairs depends on ungapped alignment. The computation at each diagonal can be performed at an individual thread. For maximum clique finding, the Bron–Kerbosch algorithm can be implemented in parallel too. In the last step, the alignments of loop regions are independent, and can be deployed in different threads as well.In this article, we have proposed a novel tool, named STAR3D, for RNA 3D structural alignment. First it detects the conserved double-stranded regions in two input RNAs by joining the matches of small stack components. Then the consensus of stacks is assembled based on the 3D structural similarity and 2D compatible relationship. Its underlying tree-like topology leads to the ordering of loop regions. In addition, the rigid transformation of the aligned stacks can guide the 3D alignment of the loop regions. As a result, each loop only needs to be compared with its partner in the other sequence by using the superimposition of the conserved stacks. Finally, we combine the stack alignment and all the loop alignments as the final result. This ‘two-step’ strategy is derived on the basis of three observations. First, insertions and deletions are rarely seen in the conserved helical regions, which means that the ungapped extension is applicable to the stacks; second, the 3D structural similarity of conserved stacks is higher than that of random stacks; third, the stack regions are easier to annotate, even for low resolution PDB structures, so the stack alignment can be used as an anchor for the loop alignment. By integrating these properties into the design, STAR3D avoids the complex computation of secondary structure comparison. Furthermore, the one-to-one loop alignments, which replace the all-to-all base matching in entire single-stranded regions, reduce the running time of STAR3D for large RNAs significantly. The benchmark results show that the prediction accuracy of STAR3D outperforms the state-of-the-art tools, and does so with higher efficiency. What's more, STAR3D can be easily implemented with multi-thread support. The detection of A potential expansion of STAR3D is to implement a local alignment version of the tool. From the experiment of aligning the GNRA motif and the 23S rRNA, it can be seen that STAR3D is sensitive to local similarities in RNA 3D structures. On the other hand, it is natural to convert STAR3D into finding local alignments. In the original method, only the maximum clique in the compatible graph is chosen to build the structural tree. To develop a local alignment approach, we can change STAR3D to deal with multiple cliques. For each one, a local alignment can be generated by only comparing the loops covered by the aligned stacks. With this new method, we anticipate that more structural motifs will be found in the functional ncRNAs.Another direction for future study is to incorporate comparative methods into STAR3D. There are two approaches. The first one is to use the comparative methods to improve the alignments of the RNAs with low resolution coordinates. The excessive flexibility of atomic positions challenges the prediction of base pairing interactions, which may affect the performance of STAR3D. To solve the problem, we plan to design an iterative pipeline to find the base pairs in the low resolution RNA structures. First, we need a homology of the target that has high resolution 3D structural data. Hence a better annotation of base pairs for the target can be inferred by aligning two RNAs with STAR3D. In the following run, these predicted base pairs can be used as the secondary structural information in STAR3D to generate a more precise alignment. This procedure is continued until no new base pairs can be detected for the target. Considering the high efficiency of STAR3D, the time consumption of the pipeline should be practical. In addition, the low resolution RNAs can be aligned to other RNAs more accurately with the inferred base pairs. The second way is to find the 3D structural conservation among the RNAs in one family by using comparative methods. A hierarchical clustering based method, which is similar to CLUSTALW , is adophttp://genome.ucf.edu/STAR3D.


Traditionally biological similarity search has been studied under the abstraction of a single string to represent each genome. The more realistic representation of diploid genomes, with two strings defining the genome, has so far been largely omitted in this context. With the development of sequencing techniques and better phasing routines through haplotype assembly algorithms, we are not far from the situation when individual diploid genomes could be represented in their full complexity with a pair-wise alignment defining the genome.We propose a generalization of global alignment that is designed to measure similarity between phased predictions of individual diploid genomes. This generalization takes into account that individual diploid genomes evolve through a mutation and recombination process, and that predictions may be erroneous in both dimensions. Even though our model is generic, we focus on the case where one wants to measure only the similarity of genome content allowing free recombination. This results into efficient algorithms for direct application in (i) evaluation of variation calling predictions and (ii) progressive multiple alignments based on labeled directed acyclic graphs (DAGs) to represent profiles. The latter may be of more general interest, in connection to covering alignment of DAGs. Extensions of our model and algorithms can be foreseen to have applications in evaluating phasing algorithms, as well as more fundamental role in phasing child genome based on parent genomes. Mutations can occur so that the child chromosome pair is not an exact copy of recombined sequences inherited from the mother and the father.A The problem we tackle in this paper is how to define optimal alignment between two diploid chromosome pairs , so that only the sequence content is taken into account allowing arbitrary recombinations.inversion distance  = 1, and I[i] = 0.A recombination Diploid to diploid distance: Given two pair-wise alignments  and  the diploid to diploid distance is defined asA, SBS) and X, SYS).This problem can be interpreted as a covering alignment of two labeled DAGs created from pair-wise alignments: see the discussion in the end of synchronized diploid to diploid alignment section. Unfortunately, we do not know how to solve this problem efficiently or how to argue about its complexity. We leave this as an interesting open problem and continue to the variants that we know how to solve and that also have important applications; we also believe the basic notions derived for the variants give insights for tackling the general case later.A, B), X, Y) to measure a distance between diploid individual  and a pair of haploid sequences X and Y.In this section we propose a distance D and two sequences X and Y, the pair of haploids to diploid distance is defined as A, SBS)}.An example of recombination in pair-wise alignments and the pair of haploids to diploid distance measure is included in Figure Vi,j,k for i ∈ {1, . . . , N}, j ∈ {1, . . . M}, and k ∈ {1, . . . , L}, such that Vi,j,k stands for the pair of haploids to diploid distance between sequences X..i1, Y..j 1and alignment To compute the pair of haploids to diploid distance, we propose to compute values AS[k] = BS[k] = c ∈ ∑:For the sake of simplicity we first show the recurrence when X, Y, or both; and expressions (1.5) and (1.6) stand for deletion from X or Y . Note that we do not include the case X and Y at the same time, and that can be obtained by first deleting a character from X, and then from Y.Here, expression (1.1) stands for a match or substitution; expressions (1.2) to (1.4) stand for insertions either into a = SA[k] ≠ SB[k] = b we have to consider symmetric cases:When a = b those duplicated equations become redundant and we recover the previous formulation. Also it would be possible to formulate simplified recursions when there is a gap in the alignment , however those are also particular cases of the general formulation, given that C = 0.We need to consider twice as many expressions for matches/substitutions (2.1 and 2.2), twice as many conditions for insertions (2.3 to 2.8), and the same number of conditions for deletions (2.9 and 2.10). When V in time O(MNL). If we want to find the actual alignment, in addition to the standard traceback process, we need to traceback the table carrying a bitvector I which is initially empty. Every time we take a transition that decreases k we need to prepend a 0 (respectively a 1) to I, if we choose an expression from 2.1, 2.3, 2.4, or 2.5 . With this bitvector I we identify the recombination To compute the recombinant distance using dynamic programming we need to fill a table synchronized. We first present some auxiliary concepts that are useful for expressing the algorithms.Now let us assume that we have again two diploid genomes represented as pair-wise alignments. We derive a restricted variant of diploid to diploid alignment that keeps both input alignments X, SYS) for the sequences X and Y, we build a guiding function h as follows: h(z) = (ih(z), jh(z)) is such that Given an alignment . Therefore, a guiding function is an alternative representation of an alignment. The guiding function allows us to traverse X and Y in a way that both i hand j hincrease in the areas of the alignment without gaps. In the gapped areas, only the index corresponding to the non-gapped sequence increases. Figure Given the two sequences X and Y appearing inside the partial alignment Let us denote by synchronized with alignment  iff for each partial alignment p = ih(k) and q = jh(k), where h is the guiding function of .We say that two alignments Synchronized diploid to diploid distance: Given two pair-wise alignments  and  of length L1 and L2 respectively, the synchronized diploid to diploid distance is defined as min{D+ D: A, SBS), and D and D correspond to alignments that are synchronized with }.Figure A S= B tc, S= ag and X S= Y ngc, S= atv. If the cost of any substitution is 10, and the cost of any indel is 1, the optimal diploid to diploid alignment is given by recombining the second alignment in the second position, by d = D+ D = 6.The example in Figure i and j freely as in the cubic time algorithm, we will vary only the parameter of the guiding function, so that the guiding function provide us indexes i and j that are synchronized with the alignment Now we can formalize a recurrence for the synchronized diploid to diploid alignment problem. The idea is that instead of varying Dz,k for z ∈ {1, . . . , L1}, k ∈ {1, . . . L2}, where Dz,k stands for the synchronized diploid to diploid distance between sequences We compute values ih(z) and jh(z) are given by the guiding function of , the alignment is synchronized with the alignment .As the indexes X and Y is preserved. For this sake, the function ζ receives as input the triplet  that corresponds to the previous cell, and the triplet  that corresponds to the current cell.The rationale is to consider, among all the possibles transitions used in the cubic time algorithm for pair of haploids to diploid alignment, those that are compatible with the guiding function. In this way the alignment of z or k decreases in each recursive call, the valid cases for the function ζ are those where at least one of k, i, j increase. For any of those cases, the valid recombination costs from equation 2 are considered:Given that at least one of k and z increase areThe cases where both z increases:The cases where only k increases:The case where only O(ND) running time for the Levenshtein distance of strings can be applied here. The key observation here isThe same technique ,9 used tLemma Let  and  be two alignments, and let Dz,k be the synchronized diploid to distance costs computed as before. Then ∀k ∈ 0, . . . , L1, z ∈ 0, . . . L2 it holds Dz,k >Dz-1,k and Dz,k >Dz,k-1.Proof It is enough to verify that expressions 8.1 to 8.3, and 9.1 are always positive. This holds because X and Y contain no gaps. On the other hand, AS[k] or BS[k] might contain a gap, but it is not possible that both of them contain a gap at the same time.   □L1| = |L2| = N and we store values zDk ,in a table. We want to test if the distance between  and  is smaller than a threshold t or not. That is, we want to test if NDN ,≤ t for some threshold t. To do that, we do not need to fill the entire table. It is enough to consider the diagonals j - i ∈ {-t/2, -t/2 + 1, . . . , 0, 1, . . . , t/2} in the computation, because any path using a diagonal outside this zone must use more than t operations that have a positive cost, leading to an alignment with cost greater than t. Starting with t = 1 and doubling this value until NDN ,does not decrease any more gives the optimal answer, and the final area where the computation is done is of order O(ND); the previous zone sizes form a geometric series, so the computation done inside them is of the same order as the computation inside the final zone.Let us assume for simplicity of exposition that |C++. For the computation of the Levenshtein distance, we resorted to a boost-compatible implementation of a O(ND) time algorithm [O3.We implemented the three algorithms in lgorithm . We ran Our first experiments compared the performance of our three algorithms. In order to do that, we considered samples from the human chromosome 21 of different sizes between 1000 and 100000. In order to generate the pair of diploid individuals we made random mutations (SNPs and deletions) independently on four copies of the sequence. The pair of haploids for the cubic time algorithm were extracted from one of the generated diploids. Table Then we wanted to test our new formulations on more realistic instances. We simulated again a pair of diploid individuals that contained the same variants, but this time they were recombined differently. In addition we added mutations independently in every strand. The results are shown in Table Same kind of diploid genomes can also result from variation calling predictions after applying haplotype assembly ; long haWe proposed new metrics to compare diploid individuals, extending classical pair-wise sequence alignment, to compare a pair of pair-wise alignments under free recombination. Our motivation for the study came from variant calling evaluation, where one wants to ignore the phasing errors. For some other applications, one might want to add a penalty on the recombination events. Such penalties are easy to add to the formalism and to the algorithms. A prominent application for such an approach is the evaluation of phasing algorithms: The optimal covering alignment also defines the recombination positions, so one could compare two alignments resulting from different phasing algorithms and evaluate how close they are, without requiring a ground-truth. Comparison against ground-truth gives an estimate on how many phasing errors the predicted diploid contains. One could actually apply our current model for this application, but free recombinations may give too much freedom to optimize sequence content so that predictions could seem to be containing many phasing errors.m, Gf, A, and B denote a labeled DAG representing mother, a labeled DAG representing father, and two haploid sequences representing a child diploid genome, respectively. We find a path X in Gm and a path Y in Gf such that max + S, S + S) is maximum, where S is the optimal alignment score for two sequences. The mutations contributing to the optimal solution give a way to trace the mutations coming from mother (father) lineage. Observe that, before phasing, our information on the child genome is as well just a labeled DAG Gc created from a pair-wise alignment representation of predicted diploid. To find the optimal phasing of child genome, we could try to find  trough a one-sided covering alignment of Gc to the path-alignments in Gm and Gf. This is almost identical to our pair of haploids to diploid alignment, except in the place of pair of haploids we have a pair of diploids represented by labeled DAGs. The cubic time algorithm extends to this case: Topological traversal of Gm and Gf in place of two sequences results into some more recurrence options to take into account the in-neighbors for each pair of nodes  from the two DAGs. We find this an extremely promising approach to tackle the phasing problem and as future work we will conduct experiments on simulated models. In the same line of development, we will try to make this approach scalable by exploiting similar properties as those used for the shortest detour speed-up.We want to emphasize that our model captures the similarity between predicted diploid genomes, and if we want to use it for modelling the actual recombinations appearing during evolution some modifications are required: The reason is that full information of child diploid genome comes from parts of mother and father diploid genomes. The partial measure in terms of path-alignment ,6 capturFinally, although the restricted variant of diploid to diploid alignment using synchronization results into good experimental behaviour, studying the complexity of the general diploid to diploid alignment is certainly another focus for our future work.The authors declare that they have no competing interests.Both authors contributed equally to the development of the models and algorithms, as well as to the writing of this manuscript. DV implemented the algorithms and performed the experiments.


To address such scalability problems, we present DIDA, a novel framework that distributes the indexing and alignment tasks into smaller subtasks over a cluster of compute nodes. It provides a workflow beyond the common practice of embarrassingly parallel implementations. DIDA is a cost-effective, scalable and modular framework for the sequence alignment problem in terms of memory usage and runtime. It can be employed in large-scale alignments to draft genomes and intermediate stages of de novo assembly runs. The DIDA source code, sample files and user manual are available through http://www.bcgsc.ca/platform/bioinfo/software/dida. The software is released under the British Columbia Cancer Agency License (BCCA), and is free for academic use.One essential application in bioinformatics that is affected by the high-throughput sequencing data deluge is the sequence alignment problem, where nucleotide or amino acid sequences are queried against targets to find regions of close similarity. When queries are too many and/or targets are too large, the alignment process becomes computationally challenging. This is usually addressed by preprocessing techniques, where the queries and/or targets are indexed for easy access while searching for matches. When the target is static, such as in an established reference genome, the cost of indexing is amortized by reusing the generated index. However, when the targets are non-static, such as contigs in the intermediate steps of a  Performing fast and accurate alignments of reads generated by modern sequencing technologies represents an active field of research. At its core, the sequence alignment problem is about identifying regions of close similarity between a query and a target. Most modern algorithms in this domain work by first constructing an index of the target and/or the query sequences. This index may be in the form of a suffix tree , 2, suffde novo assembly process where index construction needs to be performed several times.When the target sequence is static , the cost of index construction represents a one-time fixed-cost. It is performed once as a pre-alignment operation, and the resulting index is used for many subsequent queries. Hence, it is often discounted in performance measurements of alignment tools. However, there are many applications where the reference is not static and/or the computational cost of indexing is not negligible. Such cases include resequencing data analysis of non-model species, where the target index has to be established, and intermediate stages of a One more complicating factor in these two domains is that the target sequence may not represent chromosome-level contiguity, requiring alignments to a fragmented target sequence. This may be a particular challenge for many alignment algorithms, which perform poorly near target boundaries, introducing “edge effects”.To address these challenges, we have designed and developed DIDA, for Distributed Indexing and Dispatched Alignment. DIDA works by first distributing the index construction over several computing nodes. It dispatches the query sequences over corresponding computing nodes for alignment. Finally, partial alignment results from different computing nodes are gathered and combined for reporting.C. elegans genome, (2) Human draft genome, (3) Human reference genome, and (4) P. glauca genome. Here, we report on the scalability, modularity and performance of the tool.We tested DIDA using four datasets: (1) The sequence alignment task is often suitable for parallel processing, and the widely practiced approach is to perform the task in an embarrassingly parallel manner. When the target index is available, it is loaded on multiple processors, and a subset of the query sequences  are aligned in parallel to this common target.In DIDA, we parallelize both the indexing and alignment operations using a five-step workflow . For thede Bruijn graph, overlap graph, string graph) consisting of a set of vertices (reads or k-mers) and edges (overlaps) representing the relationship between vertices. After building such graphs, the assembly problem is converted to a graph traversal problem, where a walk along the graph would reconstruct the source genome. In practice, assembly algorithms report unambiguous walks on the assembly graphs, building contigs as opposed to full genomes or chromosomes. Especially for large genomes, use of short reads from high-throughput sequencing platforms for assembly results in a large number of contigs. For example, using 150 base pairs (bp) reads, the white spruce genome is assembled into several million contigs ] = 1, i = 1, 2, …, k. After constructing the Bloom filters, all possible read b-mers are queried against the Bloom filters. If at least one hit is found for each read, the read is dispatched to the corresponding node. This procedure continues until all the reads are either dispatched or discarded. By choosing the b-mer length, b, small enough, we make sure that no read sequence will be missed in the Bloom filter query step. This is performed by setting b less or equal than the minimum seed or exact match length of aligners, l, for candidate hits. Detailed procedure for choosing b, loading and querying Bloom filters is presented in To create a Bloom filter for each partition of target sequences, all target subsequences of length r and k can be set as input parameters and we have considered 8 bits for each b-mer, r = 8, as default. Therefore, the optimal number of hash functions that minimizes the false positive rate of Bloom filter is k = rln2 ≈ 5, resulting in a false positive error rate slightly larger than 2%. It should be mentioned that the false positive rate does not affect the final alignment result. It only imposes more workload on nodes by dispatching reads that do not necessarily belong to those nodes as a result of false positive Bloom filter hits. r and k affect the number of extra dispatched reads over multiple nodes.In the implementation, the values of Align and Merge. After constructing indices for all sets of target sequences and dispatching the reads to the computing nodes, DIDA aligns the reads against the target sequence in parallel on each node. Note that, DIDA itself does not offer an alignment algorithm; instead, it can use a variety of third party alignment tools.In the merging step, partial alignment results, usually stored as SAM/BAM  records The workflow and algorithm of DIDA are presented in DIDA is written in C++ and parallelized using OpenMP for multi-threaded computing on a single computing node. For distributed computing, DIDA employs Message Passing Interface (MPI) for inter-process communications. As input, it gets the set of target sequences and the set of queries in FASTA or FASTQ formats, and the default output alignment format is SAM (Sequence Alignment/Map Format).http://www.novocraft.com), and ABySS-map [To evaluate the performance of DIDA, four alignment tools have been used within the proposed framework: BWA-MEM , Bowtie2BySS-map . A summaBWA is an FM-index based aligner. It starts by creating an index for target sequences to find exact matches. For inexact matches, it employs a backtracking strategy; within a defined distance, it looks for matches between a substring of target sequences and the read sequence.Bowtie2 is also an FM-index based alignment method. After constructing the index for target sequences, it uses a modified Ferragina and Manzini  matchingk-mers. In the mapping phase, it utilizes the Needleman-Wunsch dynamic programming algorithm [Novoalign is a hash-based alignment method. It builds a hash table by dividing the target sequences into overlapping lgorithm  with affSimilar to BWA and Bowtie2, ABySS-map, a utility within the ABySS genome assembly software , construAll four tools are run with their default parameters, and the parameters related to the resource usage are set in a way to utilize the maximum capacity on each computing node as described in Results were obtained on a high performance computer cluster consisting of 500 computing nodes, each of which has 48 GB of RAM and dual Intel Xeon X5650 2.66GHz CPUs with 12 cores. The operating system on each node is Linux CentOS 5.4. The cluster’s network fabric and file system are Infiniband 40 Gbps and the IBM GPFS, respectively.C. elegans genome, Human draft assembly, Human reference genome, and P. glauca (white spruce) genome from the following websites.To evaluate the performance and scalability of DIDA on real data, we downloaded publicly available sequencing data on C. elegans: http://www.ncbi.nlm.nih.gov/sra/?term=ERR294494http://www.nature.com/ng/journal/v43/n5/full/ng.806.htmlHuman genome (NA12878): http://hgdownload.cse.ucsc.edu/goldenPath/hg19/database/Human genome reference : P. glauca (accession number: ALWZ0100000000 and PID: PRJNA83435): http:/www.ncbi.nlm.nih.gov/bioproject/83435In order to assess the performance of DIDA for each aligner on non-static targets, we assembled the reads from each dataset using ABySS 1.3.7, and used the assembly graph in intermediate stages to guide partitioning. We have also evaluated the performance of DIDA for each aligner on human genome reference  as a static target. The detailed information of each dataset is presented in C. elegans dataset, in standalone case (grey bars) or within the DIDA framework on two, four, eight, and 12 nodes, as indicated. For instance, for ABySS-map, the runtime of 2154 sec without DIDA is decreased to 893 sec using DIDA on four computing nodes. From b-mer length value small enough, we make sure that no potential alignment is missed in the dispatch step, and therefore, the accuracy of final alignment results will not be degraded  algorithms to generate BWT (Burrows Wheeler Transform) in the index construction process. For short target sets (≤ 25Mb), bwa-index uses is algorithm while for long target sets (> 25Mb) it employs bwtsw. The memory usage of bwtsw is less than is for a given target set. When we divide C. elegans dataset into 8 or more partitions, the size of each subset will be less than 25Mb, and hence, bwa-index automatically invokes is algorithm. On the other hand, for 4 partitions or less, bwa-index uses bwtsw algorithm. Therefore, we see the memory scalability of BWA for C. elegans is not as expected.One point that should be addressed is that by increasing the computational power, lability . For insP. glauca draft assembly. Due to resource restrictions, we could not obtain the result of ABySS-map aligner without DIDA. The required memory for constructing the index for the spruce draft assembly is about 400 GB. However, using DIDA framework we can divide the draft spruce assembly into a number of partitions, and perform the indexing and alignment operation in a distributed way. From Indexing large target sequences, and aligning large queries are computationally challenging. In this article, we described a novel, scalable and cost-effective parallel workflow for indexing and alignment, called DIDA.C. elegans, human draft genome, human reference genome, and P. glauca genome. Compared to their baseline performance, when run through the DIDA framework with 12 nodes, BWA, Bowtie2, Novoalign, and ABySS-map use less memory  and execute faster  for a draft human genome assembly.The performance of DIDA was measured and evaluated when coupled with popular alignment methods BWA, Bowtie2, Novoalign, and ABySS-map on P. glauca draft genome [DIDA is an enabling technology for labs that have limited compute resources. For example, for the t genome , the reqde novo assembly are becoming two key steps in everyday research and analysis. Since many labs may have limited computational resources, DIDA may be an appropriate solution to address their needs and expectations by reducing heavy computational resource requirements.As the cost of DNA sequencing is dropping faster than the cost of computational power, the need for scalable and cost-effective parallel and distributed algorithms and software tools for accurately and expeditiously processing “big data” from high-throughput sequencing is increasing. DIDA offers a solution to this growing issue for the alignment problem, especially when the target is non-static, or large. In life sciences research organizations and clinical genomics laboratories, alignment and S1 Fig(PDF)Click here for additional data file.S1 Text(PDF)Click here for additional data file.S2 Text(PDF)Click here for additional data file.S3 Text(PDF)Click here for additional data file.S1 Table(PDF)Click here for additional data file.S2 Table(PDF)Click here for additional data file.S3 Table(PDF)Click here for additional data file.S4 Table(PDF)Click here for additional data file.S5 Table(PDF)Click here for additional data file.


The contents of the biological assemblies of potential templates are provided, and alignments of the target sequences to the templates are produced with a profile-profile alignment algorithm. BAM provides for visual examination and mouse-editing of the alignments supported by target and template secondary structure information and a 3D viewer of the template biological assembly. Side-chain coordinates for a model of the biological assembly are built with the program SCWRL4. A built-in protocol navigation system guides the user through all stages of homology modeling from input sequences to a three-dimensional model of the target complex. Availability: http://dunbrack.fccc.edu/BAM.Many if not most proteins function in oligomeric assemblies of one or more protein sequences. The Protein Data Bank provides coordinates for biological assemblies for each entry, at least 60% of which are dimers or larger assemblies. BioAssemblyModeler (BAM) is a graphical user interface to the basic steps in homology modeling of protein homooligomers and heterooligomers from the biological assemblies provided in the PDB. BAM takes as input up to six different protein sequences and begins by assigning Pfam domains to the target sequences. The program utilizes a complete assignment of Pfam domains to sequences in the PDB, PDBfam ( High-throughput methods in proteomics have resulted in substantial information on protein-protein interactions and identification of the components of large protein complexes As with predicting the structure of a single protein, homology modeling of complexes, when suitable templates exist, is very likely to produce better models than ab initio prediction via computational docking For X-ray structures, the PDB provides Cartesian coordinates for asymmetric units and for biological assemblies. The asymmetric unit is defined as the smallest portion of a crystal structure that can be used to model the entire crystal using crystallographic symmetry operators. This is in contrast to the biological assembly, which represents a hypothetical biologically active structure which may be present within the crystal. These biological assemblies may be identical with the asymmetric unit . We have tested BAM using VirtualBox  on both Linux and Mac OS and it functions well. The BAM graphical installer [49 MB] is available for free download. With a few mouse clicks the installer automatically extracts and configures initial databases, utilities, and software required. In Beginner mode, BAM informs a user about the required actions at each step by means of message boxes, highlighting of different user controls in BAM's graphical user interface (GUI) and giving instructions in a status bar at the window bottom. The beginner mode can be disabled in Tools->Settings. Advanced settings of BAM and third-party dependencies can be adjusted in Tools-> Settings->View or Edit.BAM is a Windows application that runs on both the 32-bit or 64-bit editions of Windows XP, Vista, Windows 7 and Windows 8. It was written in C# with Microsoft Visual Studio. Windows can be installed on Linux and all recent Macintosh machines using free virtualization software such as VirtualBox  and a large set of protein sequences formatted for use by PSI-BLAST . Whenever a new version of BAM or PDBfam database update are available, the user will be automatically notified through the BAM user interface. In addition BAM relies on a set of online third-party services like RCSB PDB or Sanger Pfam. Problems may occur once these providers make changes to their formats or service. The BAM updates will comply with any future format changes in the PDB or Pfam that may arise.http://dunbrack.fccc.edu/BAM.Homology modeling of biological assemblies with BAM can be accomplished with the following eight steps. The user is advised to refer to video and screenshot tutorials and more detailed information on how to use BAM available at (1) To start a new homology modeling project, a user needs to open for editing a FASTA-formatted sequence file with one or more different amino acid sequences of a target protein complex. Even when a homooligomer model is desired, only one copy of the sequence is required in the input file. Sample sequence files are included in the BAM installer for learning and testing purposes. BAM automatically checks the user's FASTA sequence input for any inconsistencies and advises if any are detected.(2) PSI-BLAST  is run with two or more rounds to generate a sequence profile for each target sequence - a matrix of 20 amino acid types by the sequence length, giving a log odds score of finding a particular amino acid in each position of a multiple sequence alignment of the target sequence family. These profile matrices are required for secondary structure (SS) prediction and profile-profile alignment of the target and template sequences.(3) PsiPred  is run next to predict the secondary structure of each target sequence for each PSI-BLAST run. The results can be viewed within BAM – red for helix, green for sheet, and gray for coil. Higher color intensity corresponds to higher confidence of prediction.(4) Each target sequence is submitted to the Pfam web service (5) A search for the target Pfams is performed on a precompiled relational database, based on PDBfam (6) A user selects one or more template architectures and presses a Compute button to perform profile-profile sequence alignments (7) Double-clicking any row from the template hit table opens a form with the content of the biological assembly with assigned Pfam domains of each chain copy. After confirming the choice, BAM automatically downloads a template structure in XML format from the PDB, applies symmetry operators in the file to build a biological assembly, and opens a visualization window that contains a rotatable view of the structure. The alignments depict the predicted secondary structure of the targets and the experimental secondary structure of the template chains. The start/end positions, deletions and insertions are shown in the viewer, and are dynamically updated as the alignment is edited. The user can choose which chains to include into a target complex model so that substructures of the assembly can be modeled. The user is advised to try several templates and review biological assembly content, alignment identities, and locations of gaps until a satisfactory template is found.(8) The model is built by clicking on a button that copies the template backbone to a new PDB file with the sequence numbered according to the edited alignments, and clicking another button to run our side-chain prediction program SCWRL4 An example session of modeling a heterohexameric complex is shown in BAM presents a straightforward modeling procedure for assemblies containing up to six different sequences. These assemblies can be oligomers of any size, as dictated by the biological assemblies recorded in the XML files of each PDB entry. Such assemblies should be used with caution since they do not always correspond to what authors describe in papers and in some cases authors may fail to recognize the presence of the correct oligomeric assembly within their crystals One advantage of BAM is that all available templates are presented, and a number of models can be produced and compared. The alternatives are laid out in the template hit table. Another strong side of BAM is that it presents its templates in terms of their biological contents in the form of Pfam domains. Many modeling web servers and programs simply present a list of templates with their PDB codes and perhaps the protein names but the user has no way of knowing whether the hits all come from the same protein family and whether they would produce the same protein folds or entirely different ones. Because BAM finds the Pfams of the target and the Pfams of the PDB proteins in separate steps, the procedure is effectively an intermediate sequence profile search To get an idea of the relationships that can be identified via HMM-sequence alignments of the target and template sequences to the same Pfam HMM, we produced a density estimate of the sequence identities of PDB sequence pairs in the same Pfam as identified in our PDBfam database Another important aspect of modeling oligomers is whether the target sequences are likely to share the same interfaces and biological assemblies as the templates. This is a complicated issue, because we have previously shown that the annotated biological assemblies in the PDB are only 80–90% accurate We developed our ProtCID database to investigate just this issue To examine this for the current PDB, we calculated the minimum sequence identity of Pfam-Pfam domain interactions in ProtCID clusters with at least 5 crystal forms and minimum sequence identity below 90%, as determined by sequence alignment or structure alignment. The results for same Pfam-Pfam interface clusters and heterodimeric Pfam-Pfam interface clusters are shown in Finally, we used ProtCID to identify well-documented cases where Pfam domain-domain interactions may in fact be different for homologous proteins or pairs of proteins. We found 1801 Pfams or pairs of Pfams for which there is at least one interface clusters comprising 5 or more crystal forms with minimum sequence identity <90%. Of these, 572 clusters (32%) had two or more such clusters and only 115 (6%) had no overlap of PDB entries or crystal forms between the two largest clusters. The remaining 457 had entries in both clusters and are presumably components of oligomers larger than dimers. It is an important point that some domains may interact in more than one way but may do so only as part of the same oligomer, rather than reflecting mutually exclusive interactions. When biological assemblies in the PDB are incorrect, it may appear as if two homologous proteins have evolved different dimer interactions, when in fact both crystals may contain the same larger oligomer. Not accounting for this may lead to some underestimation of the extent of interface conservation Despite these caveats, the utility of modeling biological assemblies has been made evident in our experience in collaborating with colleagues in applying molecular modeling to real-world biological problems


Due to the size of Next-Generation Sequencing data, the computational challenge of sequence alignment has been vast. Inexact alignments can take up to 90% of total CPU time in bioinformatics pipelines. High-performance Integrated Virtual Environment (HIVE), a cloud-based environment optimized for storage and analysis of extra-large data, presents an algorithmic solution: the HIVE-hexagon DNA sequence aligner. HIVE-hexagon implements novel approaches to exploit both characteristics of sequence space and CPU, RAM and Input/Output (I/O) architecture to quickly compute accurate alignments. Key components of HIVE-hexagon include non-redundification and sorting of sequences; floating diagonals of linearized dynamic programming matrices; and consideration of cross-similarity to minimize computations.https://hive.biochemistry.gwu.edu/hive/ Sequence alignment is the critical first step of sequence analysis 1…r…N with sizes of rG and cumulative size of rR = ΣG bases.There exists a set of “Reference Genomes” numbered 1…s…S, each one having a length of L.There exists a set of “Short Reads” from A = 1r1),…(sirj),… (sAsrAr)(s where iri)(s of the short read and reference genomesDefine a set of “Scoring Parameters” l)SA = Σ between short sequence s and reference genome r such that SA is no smaller (≥) than any other SA where s′ is not equal (≠s) to s and/or r′≠r.Find an optimal alignment .O(S×L×R) in big O notation. Such an approach has no technical value for realistic sizes of genomes (in Giga-bases 9R∼10) and high throughput sequence (HTS)-scale sequence read files (600 Giga-bases 12S×L>10) for a single run. A more realistic approach is to detect highly scoring regions of candidate positions by finding exact matches of sequence seeds of length K (K-mers), up to K = 14, either by hashing techniquesThe simplistic approach of comparing every short read position to every other genomic position, even without mismatches allowed, has a complexity of K-mer seed based hash indexes. The reference genome is precompiled into a hash table where every K-mer’s occurrence is maintained in the hash container FM-index based substring search methods. The reference genome is compiled into a compressed suffix array container using the Burrows-Wheeler transform The speed and computational complexity of detecting candidate positions are comparable for both approaches and either can be suitable depending on the exact situation. The K-mer hash compilation stage is usually much faster than FM index building, but the hash table is also significantly larger in memory than an FM-index array Extension of the seed candidate alignment. The detected seeds’ exact matches are extended in both directions with or without mismatches, insertions and deletions. This step is typically very fast and is of ∼O(L) average performance.Optimal alignment. Dynamic programming techniques are usually performed in a rectangular matrix where alternative trajectories of alignments are considered concurrently. Each cell represents an alignment between two sequences at a given position. The best possible trajectory across cells is determined by cumulative alignment scores from left to right 2)∼O.We have chosen.Influenza (IZ) sample. Multi-segmented RNA virus which is accurately represented by its H5N1 genome and the mutations and divergence of the sample were well categorized from previous Sanger sequencing data;Mycoplasma hyorhinis (MH) sample. Bacterial sample of known origin with a known set of multiple repeats determined by Sanger sequencing;Homo sapiens(HS)whole genome sequencing sample. Eukaryotic DNA-seq sample from Sequence Read Archive out of which artificial reads were generated from 2 reference segments (chromosomes) X and Y Human Genome v19 Build 37.3;mixture of 15 viruses (VM) out of which artificial reads are generated from 2 of the genomes Human adenovirus C (gi|9626158|ref|NC_001405.1) and Dengue virus 1 (gi|9626685|ref|NC_001477.1);mixture of 10 bacterial genomes (BM) from which artificial reads are generated for 2 of the genomes Shigella dysenteriae Sd197 (gi|82775382|ref|NC_007606.1) and Streptococcus pneumonia ST556 chromosome (gi|387787130|ref|NC_017769.1).and, similarly, a Full information regarding mixed samples and concentrations can be found in AR0-), 1% error (AR1) and 5% error (AR5) or taken the original submissions produced by a sequencing hardware (OR). To define a consistent notation for our samples within this publication we also signify the number of reads as a suffix for the sample name. Thus, in this notation the sample AR5-IZ-1M would mean 1 million reads artificially generated from the Influenza reference with 5% random errors; similarly OR-HS-100M indicates a large, original sequence file of human origin with 100 million reads.We have generated artificial reads from original reference sequences with no error  increases. The higher sensitivity of a method for divergent sequences is critical for detection pipelines where adventitious agents present in small quantities can have adverse effects on biological products safety. An inability to detect a significant amount of sequence hits when the reference sequence is not well known can render Next-Gen based techniques useless. HIVE-hexagon has been specifically optimized to improve sensitivity and clearly outperforms both Bowtie and BWA in this respect.As mentioned above, read sets with variable error rates were generated from select genomes within viral mixture and bacterial mixture samples. Alignment of the read files created with zero error to the entire mixture sample allows us to demonstrate HIVE-hexagon’s ability to separate multiple references within one sample. Subsequent comparison to files with error rates tests the sensitivity with which HIVE-hexagon can separate and map a query to the correct reference in a mixed file when the query has an increasing degree of divergence from its reference. Separation and mapping follows the same principle here as in the single species check such that it is increasingly difficult  as divergence increases.The viral mixture shows HIVE-hexagon once again to surpass performance of other tools. The bacterial mixture results demonstrate a more complex mode of alignment, ultimately showing HIVE-hexagon to be more sensitive for files with or without divergence. Because the chosen bacterial mixture contains species having significant numbers of repeats, HIVE-hexagon was run both with and without a specific argument forcing careful detection of such repeats. In the repeat and transposition detection mode, HIVE-hexagon misses significantly fewer alignments while being only 10–15% slower compared to the non-repeat mode. Once again, HIVE demonstrated much higher sensitivity than Bowtie and BWA while being more time-optimal.The large genome sensitivity concept is similar to the mixture approach because of the nature of eukaryotic (human) genome references as compilations of separate reference files of various segments . Thus, HIVE-hexagon’s ability to separate references is essential to its utility in human mappings. Furthermore, human genomes and sequence data are much larger, on average, than bacterial and viral counterparts and the stress to memory and IO in algorithms is significantly greater. Regardless, results follow the established trends with HIVE-hexagon missing fewer alignments than both Bowtie and BWA. This test showcases the viability of HIVE-hexagon as a faster and more sensitive tool for eukaryotic contiguous alignments.The hashing of extra-large eukaryotic genomes can be a time consuming step. An FM index may take 2–3 hours to compile for BWA and Bowtie on modern x86 CPUs, but once finished, results can be maintained for application to future computations. As a native component of the HIVE system, HIVE-hexagon is required to allow users to subset and superset genomic reference sequences in an arbitrary manner during alignments and therefore cannot maintain permanent indexes of precompiled references: HIVE-hexagon recompiles the reference sequence K-mer hash tables every time a computation is initiated. Although it takes up to 8 minutes to recompile a eukaryotic size genome, this is considered an affordable tradeoff between convenience and functionality given the approximately 1–1.5 hours it takes to perform an alignment of 100 million sequences on such genomes. For smaller genomes this step takes only a few seconds and does not play a significant role in our performance considerations.∼1–1.5 hours to 35–40 minutes. The sensitivity of biologically dense sequence alignments deteriorates only slightly  and only in long, low complexity stretches of the reference genome.As mentioned before, low complexity regions and over-represented repeated subsequences can strongly diminish alignment algorithm performance. Large reference genomes tend to be more prone to such regions; it takes super-linearly disproportional time to map reads to such genomes compared to compact and dense genomes. With simple low complexity read filters, low complexity reference region masking and over-represented seed masking, the performance of HIVE-hexagon alignment of 100 million reads to human genome can boost from Thus, the total time consumed by HIVE-hexagon may be from 15 minutes to 1.5 hours for 100 million reads against a 3GB human genome depending on the set of parameters. Comparable and still less sensitive runs using BWA and Bowtie take about 1–1.5 hours assuming the references have been precompiled (2–3 hours).∼15 min). Similar computation against 25 pico- and entero-viruses using HIVE-hexagon took around 15–17 minutes (larger cumulative genome) for a metagenomic poli-virus environmental sample dataset of the same size where the unique count was roughly similar to the total sequence count. BWA and Bowtie both take about 20–25 minutes for the same datasets, although generally slightly less sensitive.Due to its non-redundification feature, HIVE-hexagon consistently outperforms BWA and Bowtie linearly proportional to the coverage. For example: alignment of a real dataset containing 100 million reads (out of which only 16 million were unique) to a small influenza genome (12KB) resulted in 6x time-saving (2–3 min) for HIVE-hexagon when compared to itself without utilizing the non-redundification algorithm  implemented within HIVE infrastructure run in a parallel execution environment. The time and benchmarks compared in the two previous sections were those of the applications run from within the system. The actual running times for standalone applications can be significantly longer, and are roughly linearly proportional to the level of parallelism used to run. For example, computational alignment of a human genome of 100 million sequences which takes It is clear from this preliminary validation and performance testing that HIVE-hexagon has all the characteristics necessary to become an industry staple for alignments on any species. HIVE has already embarked on a number of studies and collaborations using the HIVE-hexagon aligner and other HIVE-developed tools and workflows A number of the previously mentioned performance-enhancing ideas have been borrowed from the AceView Magic Aligning short reads to reference genomes results in a high degree of coverage, such that every genetic position is mapped by a large number of base-calls. It is not unusual to see 10,000–1,000,000× uniform coverage on shorter genomes like viruses and bacteria and 5–100× coverage on eukaryotic genomes with a lesser degree of uniformity Bioinformatics pipelines performing alignment and mapping computations are frequently heuristic in nature and, with memory access patterns driven by the data itself, often need to access large memory chunks randomly. For such large datasets, the “memory hungry” processes with unorganized “page hits” can create a bottleneck in computations where the vast majority of time is lost on memory pages caching into the CPU. The HIVE-hexagon algorithm proposes a novel method of linearized data organization to minimize memory usage of underlying matrixes and structures used for programming alignment algorithms, optimize memory page hits and boost algorithmic performance by taking advantage of modern CPU architecture.The overall pipeline for the HIVE-hexagon algorithm proposed within this publication consists of a few major steps see :The non-redundification of the sequence space is accomplished by building a sequence suffix tree 4L)∼O, but the corresponding storage needs are minimal. Conversely, a very diverse set of reads is computationally cheaper but has higher storage demands to accommodate the increased quantity of unique records.Our simple tree algorithm minimizes the number of comparisons against new sequences base-four logarithmically as they are added into the tree. Computationally, the average scenario behaves as a task of Redundant sequences are discarded, but counters are associated with the unique sequences to signify that a similar sequence  has already been stored in the tree. Thus, each sequence in the tree at any given time is unique and, upon addition of a new sequence to the tree, it is a simple process to identify whether the sequence is a repeat or whether a new branch should be created.k portions. Each thread will pick up sequences starting with a prefix which is the 2-na representation of its thread index in K-mer space. For example, in 16 part execution mode the portions will include the prefixes: AA…, AC…, AG…, AT…, CA…, CC…, CG…, CT…, TA…, TC…, TG…, TT… Splitting the tree parsers in this manner removes the need for a joining step where trees must be collapsed. Since no overlaps are possible in each portion and within portions, there is no need to repeat the non-redundification step and re-sort the sequences.The actual implementation of the algorithm has a built-in parallelization schema such that, depending on the memory limitations imposed on the algorithm from the execution environment, a decision is made to split data into 4, 16, or 4Another piece of valuable information stored at each sequence node is the cross-similarity coefficient which shows the degree of similarity between prefixes of consecutive sequences in the tree. This is used for explicit cross-similarity optimization of the alignment algorithm described later in this paper.Once all sequences are digested into the tree, it is easy to traverse the tree by visiting every node exactly once in a pre-determined order using a single traversal iteration function which operates on any given node. The function returns the node itself (which represents a sequence) or it continues the traversal through its children nodes from left to right if such nodes exist. This simple recursive procedure will, in turn, generate a final version of the file with unique and sorted sequences.O(S) operations where S is the count of non-redundant sequences.By maintaining an iterator structure on a bound, self-referenced tree this operation is of constant time access and the whole tree can be generated within 1,…ri,… rK.r The compiled result is a hashed bucket list (O(R). In a genomic alphabet of four letters , the K-mer table consists of K4 elements, each occupying so many integers in memory to hold the list of occurrence positions and the hash back reference. In a conventional hash-table implementation, one would need to store backward references to hash indexes. However, in the HIVE-hexagon implementation, the K-mers themselves are considered indexes in 2-na representation of sequence space where each nucleotide is represented by a 2-bit value . By considering sequences as indexes we remove the need to maintain the sparse hash table back-references and avoid hash collisions using an over-exaggerated hash table. There is some penalty for having to maintain significantly sparse arrays for small genomes, but the benefit outweighs the cost, especially for larger genomes where the hash table is almost fully occupied.HIVE-hexagon compiles a dictionary of K-mer occurrences (seeds) in the reference set of genomes, where the K-mer is defined as a shorter subset of ket list  where ea2×R cells of integers to refer to the index of the reference genome and to a position on the genome where the particular seed has occurred. Thus, the memory footprint for a seed-hash table is roughly in the order of ∼K4+∼R integers. Contemporary (2013) computers can realistically hold a dictionary of up to 14-mers without sacrifice to the execution environment. K-mers larger than this are typically problematic, causing too great a stress to memory and, in parallel execution environments, diminishing performance benefits of hashing by memory swapping. Additionally, long K-mers require a sacrifice in sensitivity with over 1/K ∼7% error. HIVE-hexagon implements a double-hashing schema where lookup for K-mers larger than 14 is done by double-lookups of K-mers with K<14 in consecutive continuous positions.The list of occurrence positions in a bucket list requires at least R has in average KR/4 occurrences of candidates for every K-mer. Increasing K results in fewer candidate positions where each has a higher chance of being a true alignment, thus increasing the speed of computations. However, an increase in K also has the potential of increasing the footprint of the memory as ∼K4+∼R. For L positions of the sequence there are L-K  positions to be looked up using the dictionary. Thus, the complexity of lookup step is O(S×L) and the memory footprint measures as ∼KR/4×S×L with proportionality coefficient dependent on the relatedness of the reference sequence and the number of successful alignments.For every short read, HIVE-hexagon retrieves the K-mers sequentially and matches them to a seed-dictionary to obtain the list of occurrences of each particular K-mer on a reference sequence as potential candidates of alignment position. A genome of size ∼1–2% more memory compared to the original bloom-less variant of the algorithm.A significant number of hash lookups are misses, and from the perspective of the CPU the lookup results in a memory page load on a random access basis and is therefore costly and to be avoided. HIVE-hexagon maintains a bloom lookup table  [32] wheThe HIVE-hexagon implementation of the lookup table ignores seeds which are overexpressed as defined by a count greater than a given threshold: overexpressed seeds are usually present in low complexity regions in eukaryotic genomes and, although not always, frequently do not represent biological relevance. However, if the actual biological genomic region does have such overexpressed seeds adjacent to those with normal level of expression, the alignment algorithm will be able to capture the exact seed match in subsequence k-mers and then extend as much as needed regardless of the seed’s expression level. If the entire region is made of overexpressed seeds, HIVE-hexagon will exclude alignments above a certain number of findings.HIVE-hexagon can maintain seeds of K-mers on every genomic position, but it can also skip positions based on expression levels and preset parameters. This decreases the memory required for bucket list storage and decreases the pool of candidate positions without a great sacrifice to sensitivity for cases where the reference is well known. In viruses and bacteria, divergence can achieve large values and so this technique may decrease the sensitivity due to the fact that an exactly-matched seed has been skipped. For eukaryotic genomes, however, the reference tends to be more stable, so we frequently observe continuous exact matches longer than that of the K-mer size chosen for HIVE-hexagon.Once K-mer seeding has detected a candidate region, HIVE-hexagon determines the frame of possible alignment windows around the exact seed match positions. The presence of a short exact match only hints at the potential alignment: the actual alignment must be computed by other means. Extension methodologies (like that in BLAST) do not need an exact reference frame of alignment, but dynamic programming methods require a strictly defined matrix where the optimal alignment will be computed. Underestimation of the frame may result in loss of sensitivity whereas overestimation may result in vertical extension see  of the mHIVE-hexagon implements both double-sided extension of the seed and a dynamic programming matrix. The fuzzy extension algorithm is similar to cost-based dynamic programming methods except that it runs in a very small floating window along the bidirectional extension front using integer arithmetic. This approach not only allows more accurate definition of the alignment frame , but alsk)SA = Σ leading to it. The usual strategy involves computing the dynamic matrix values and backward pointers from the top left corner down to the bottom right corner. Backward pointers are then propagated in the opposite direction starting from the maximal score position to re-identify the trajectory which generated best local or global alignment.Dynamic programming methods of alignment r)O(L×G into O(L×w) where w is the constant width of the diagonal and does not scale with the size of the selected reference segment.The first, most obvious level of NW/SW optimization implemented in HIVE-hexagon is to avoid computation of the whole matrix and concentrate only on the diagonal region  where thAlignments with multiple insertions or deletions can be problematic for such optimizations. Although not usually an issue for short read alignments, a significant number of multiple in-dels is a critical problem  for longTo even further reduce the amount of computations in memory, HIVE-hexagon maintains a variable width diagonal . Cells l∼w×L instead of the rectangular matrix rL×G where memory requirements are tens or hundreds of times larger is significant. In a real parallel execution environment where hundreds of processes compete for memory pages, such optimization has a huge potential of improving the actual execution speed.Additional significant optimization implemented in HIVE-hexagon is the linearization of the final dynamic matrix. The benefit of storing a linear matrix The alignment further benefits from the consideration and implementation of the following:Alignment of unique sequences only. By aligning every redundant sequence only once and maintaining the count of redundancies, HIVE-hexagon already achieves significant improvements in computational speed without additional algorithmic modifications. The speed benefit resultant from non-redundification is above linear due to the decrease in stress to memory pages, caching and swapping.Sorting and implicit cross-similarity. Further lazy optimization is achieved implicitly due to cross-similarity and sorting of the short reads computed during non-redundification of short read sequences.Seed lookup involves reading particular locations from the bloom table, from the hash table, and therefore from the computer’s memory. Modern CPUs optimize memory-reading by double-layer caching of memory pages. Random access to memory is usually slower than sequential access with additional hits to pages already in the cache.In an attempt to align the first sequence, the CPU is forced to load a certain number of pages  into the cache. If the next sequence is very dissimilar to the first, the pages loaded are different for each, thus resulting in cache saturation with potential of dumping memory pages. However, if the sequences are very similar, the seeds hit the same set of positions in memory and the CPU does not need to reload new pages. HIVE-hexagon greatly benefits from the implicit optimization of short read sorting prior to alignment. We see up to 2-fold improvement of the speed solely due to sorting.Explicit cross-similarity. Even deeper optimization can be achieved explicitly by considering cross-similarity among the short reads. If two sequences are similar up to a certain number of characters, the alignments of those to the reference genome are expected to be similar.Let us assume the first sequence has hit the K-mer table in a large number of candidate positions, out of which only a few have passed the extension step filter (described above) and even fewer have resulted in a real alignment for a given score threshold. The following sequence is nearly identical to the first and can therefore skip all candidate positions where the extension attempt for the first failed with a wide margin of error. Since HIVE maintains all self-similarities between consecutive sequences, it is possible to quantitatively predict if the best potential alignment score between a sequence and the candidate position is within the required error threshold. Thus, only a few successful hits or near-successful mis-hit positions are typically considered for real optimal alignment search .The pattern of cross-similarity in non-redundant sequence files is oscillatory, frequently in a zig-zag pattern where the “zigs”  are changes in a base early in the sequence and “zags”  are changes at the end of the sequences. Given the inexact nature of the alignments, each consecutive sequence has to be considered in more places than assumed by the cross-similarity, so the efficiency of zig-zag is not a full 100%.We observe up to 2–4x fold performance boost depending on the parameters defined in the alignment algorithm, assuming the choice of the reference is accurate. For these cases we notice almost no sacrifice to sensitivity (<0.01%), but for cases with reference sequence further from the subject we saw some degradation (1–2%) of sensitivity with strong usage of cross-similarity.This parameter is optional in HIVE-hexagon and is not recommended to be used in its current stage for references distant from the subject, or for references containing multiple repeats and transpositions. We do recommend using this option to benefit from significant improvements of the speed for more accurate references. We expect further development to take place on this subject.In this article, we have discussed the challenges associated with NGS data analysis, with special emphasis on alignment, and provided improvised and novel approaches to overcoming these challenges. Specifically, we have introduced new and significantly improved algorithms developed by HIVE which greatly reduce the memory footprint required by alignment of NGS data and, therefore, decrease the overall time needed for the alignment process.A great quality of these HIVE algorithms is that the decrease in computational cost, memory requirement and time for processing is not accompanied by a sacrifice in the quality of the approach or the results. In fact, being native to the massively parallelized HIVE environment, the overall speed increase afforded by the infrastructure alone allows these algorithms to perform at a higher sensitivity than other industry algorithms of similar functionality while still outperforming in terms of time required for the computation.Experiments have shown HIVE-hexagon is more sensitive and faster than current industry standard alignment algorithms due to scalability, high parallelizability, non-redundification, dynamic matrix linearization and implicit and explicit cross-similarity usage. There is already a great deal of interest surrounding HIVE-hexagon, and HIVE plans to continue developing this and other new tools to further promote the advancement of NGS technologies and the larger field of genomics.Table S1Genomes, Mixes & Conc. Lists the components and accession IDs of all sequences used in the validation and testing section of the paper.(XLSX)Click here for additional data file.Table S2All Run Counts. A detailed spreadsheet containing all counts of alignments  used to summarize the validation and testing section.(XLSX)Click here for additional data file.Table S3generateSeqs. Provides the text of a short script written to generate the random subset of reads used in the validation and testing.(XLSX)Click here for additional data file.Table S4Externalvs.HIVE Bowtie&BWA. Shows the compared alignment counts of external tools when run both inside the HIVE environment and in their native external environments.(XLSX)Click here for additional data file.Table S5Access Data in HIVE. Provides access information and instruction for reviewers and other interested individuals to see and replicate the results presented herein.(XLSX)Click here for additional data file.


In recent years, many studies focused on the description and comparison of large sets of related bacteriophage genomes. Due to the peculiar mosaic structure of these genomes, few informative approaches for comparing whole genomes exist: dot plots diagrams give a mostly qualitative assessment of the similarity/dissimilarity between two or more genomes, and clustering techniques are used to classify genomes. Multiple alignments are conspicuously absent from this scene. Indeed, whole genome aligners interpret lack of similarity between sequences as an indication of rearrangements, insertions, or losses. This behavior makes them ill-prepared to align bacteriophage genomes, where even closely related strains can accomplish the same biological function with highly dissimilar sequences.Staphylococcus aureus and Mycobacterium bacteriophages, involving up to 29 genomes. Using these datasets, we prove that Alpha alignments are at least as good as those computed by standard aligners. Comparison with the progressiveMauve aligner – which implements a partial order strategy, but whose alignments are linearized – shows a greatly improved interactive graphic display, while avoiding misalignments.In this paper, we propose a multiple alignment strategy that exploits functional collinearity shared by related strains of bacteriophages, and uses partial orders to capture mosaicism of sets of genomes. As classical alignments do, the computed alignments can be used to predict that genes have the same biological function, even in the absence of detectable similarity. The Alpha aligner implements these ideas in visual interactive displays, and is used to compute several examples of alignments of Multiple alignments of whole bacteriophage genomes work, and will become an important conceptual and visual tool in comparative genomics of sets of related strains.https://bitbucket.org/thekswenson/alpha).A python implementation of Alpha, along with installation instructions for Ubuntu and OSX, is available on bitbucket (The online version of this article (doi:10.1186/s12859-015-0869-5) contains supplementary material, which is available to authorized users. The most abundant, and probably the most diverse, biological entities are bacteriophages, the viruses that infect bacteria. Helped by recent advances in sequencing, comparative studies –3 use doIn order to explore the relations between bacteriophages in the same cluster, it seems natural to turn to whole genome multiple alignments. One of the main features of whole genome aligners is that they take into account genome rearrangement events that scramble the order of large segments of chromosomes , the first aligner specifically designed for whole bacteriophage genomes. With the help of partial order structures, Alpha captures the unique mosaic structure of bacteriophage genomes, and provides an interactive graphical interface with the generated multiple alignment. We also give a detailed comparison between Alpha and progressiveMauve ,H[u..v]}, where s and u are the start positions of the match in the respective genomes, and t−s=v−u; it asserts the equalities G[s]=H[u],…,G[t]=H[v].A We next formalize the notion of homologous positions, defining what constitutes a ‘column’ of a multiple alignment, along the lines of J. Kececioglu’s original paper .pij denote position j of genome Gi. Two positions pij and pkl are equivalent if there is a match in Gi[j]=Gk[l], or if there is a sequence of matches that links Gi[j] to Gk[l] through a sequence of such assertions. The equivalence class of pij is denoted ⟦pij⟧, and we will refer to it as a column. The support of a column sp⟦pij⟧ is the set of genomes that have a position in the column ⟦pij⟧.Let anchor that is used in WGA, which corresponds to columns whose support is equal to Note that there is no requirement that a column span the complete set column graph is obtained by linking the different columns according to their order in each genome. Formally, it is the directed (multi)graph whose vertices are the columns ⟦pij⟧, and there are edges from ⟦pij⟧ to ⟦pkl⟧ for all genomes Gg that have positions pgs in ⟦pij⟧ and pg(s+1) in ⟦pkl⟧. An example of the construction is given in Fig. The functionally collinear with respect toLet In most WGA systems, collinearity is meant to represent sequences that ‘align well’. Classical collinearity is broken by pairs of dissimilar sequences, and is an indication of gene rearrangements, gains or losses, in most higher organisms. Functional collinearity, on the other hand, excludes rearrangements, but allows dissimilar sequences to be compared. Interestingly, both concepts have the same formal definition, but the use of the column graph is quite different from one application to the other.A necessary condition for a column graph to be functionally collinear is that each column have at most one position in a given genome, since the presence of two or more positions would generate a cycle. We have therefore the following definition:valid if, for each column ⟦pij⟧, both ⟦pij⟧ and sp⟦pij⟧ have the same number of elements.A set The most likely sources of invalid sets of matches are duplicated segments, and tandem repeats with a variable number of repeats, which may cause overlapping matches. Most WGA deal with these invalid matches by eliminating matches that are not unique in a genome, and by trimming overlapping matches that result from tandem repeats. Given the simple data structure that we use for the alignment graph – equivalence classes – we eliminate duplicated segments, and trim overlapping matches by post-processing the columns: any column that has more than one position for a genome is split into singletons.m for matches. In the m is set, and how it can be changed.Allowing the length of matches to be very small may cause misalignments, and may also create cycles in the column graph, due to random small transpositions. It is therefore wise to have a minimal length alignment graph, in which consecutive vertices with the same support are merged, as in Fig. When the column graph has no cycles, we use a condensed version, called the m. The parameter m is normally chosen as the minimum length such that there is no cycle in the graph. It is set by default at 15, but can be changed to any desired value. Large values of m are sometimes useful in initial explorations of a set of bacteriophages and small values can be used to refine alignments.Given a set of genomes omeTools , a suffim, constructs the column graph, and the alignment graph when possible. After initializing the graph, it uses the Union-Find algorithm [Mℓ is the total length of matches, and α is the inverse of the Ackermann function [The main steps of the algorithm underlying Alpha are described in Algorithm 1. It takes as input a set of matches of minimum length lgorithm  to constfunction .n is the number of genomes, yielding a complexity of Nℓ is the total length of genomes. Note that at most Nℓ new classes can be created by the splitting process.The third step visits all classes, determining whether they are valid. For each class, this determination can be made in Nℓ. Assuming the genomes are collinear, consecutive columns with the same support are then merged to give the alignment graph.In the fourth step, edges between consecutive columns are added to the graph, and it is checked for the presence of cycles that would indicate non-collinearity. This can be done in time proportional to Mℓ and nNℓ vary greatly depending on the data.The total complexity is thus m remain unaligned. In order to increase the compactness of whole genome alignments, we contract the vertices further with the following requirement:The vertices of an alignment graph are exact alignments, since all rows are equal. Regions that do not contain exact matches of length at least U,V) is contractible if U precedes V in the partial order, U and V have the same support, the support of every vertex between U and V is included in sp(V), and the lengths, in base pairs, of all segments that span from U to V are the same.The pair of vertices . Myco6 contains bacteriophage genomes {U2, Alvin, DD5, BillKnuckles, Perseus, Dreamboat}, a subset of Myco29 chosen for diversity within cluster A1. Some of the mycobacteriophage genomes were trimmed in order to automatically run the experiments with small values of m; transpositions at the end of the sequences cause Alpha to increase the value of m . Given the overall poor performance of Muscle, we chose the rule of the majority. Finally, for Region 6, there was a tie between the four aligners, and there was no decision.m, the minimal length of exact matches: it does not rely on thresholds, and does not maximize any score. Instead, it relies on the transitive properties of the equality relation to provide reliable anchors, and on the unique constraint imposed on bacteriophages who, before traveling, must pack their whole genome in a small suitcase.As the results of Table In the preceding section, we showed that Alpha alignments are sound, in the sense that they predict biological meaningful similarities. The next question is to evaluate to what extent Alpha captures all meaningful similarities.In order to do this, we compared Alpha with progressiveMauve , since iComparing partial order alignments stemming from two different aligners turned out to be a daunting task: an alignment proposed by one aligner can be broken into several alignments by the other, since alignments may involve different subsets of the input genomes. The most practical approach was to compare only alignments that included all input genomes from both aligners.S. aureus phages {phiETA3, phiNM2, phiNM1, B236}, with default parameters for progressiveMauve, and interactively setting m between 13 and 21 for Alpha. All alignments from both aligners were identified by their phiETA3 start and end positions, and further refined by whether they were identified by Mauve only, Alpha only, or both. This produced 70 blocks, available in the Additional file We used a dataset of four All blocks predicted by both aligners were considered as valid alignments. Furthermore, short blocks (less than 100 bp) that were predicted by only one aligner – mostly by Mauve – were considered as valid: they averaged 24 bp. Three of the remaining large blocks – two predicted only by Mauve, and one only by Alpha – were validated using protein alignments. Figure Seven alignments predicted only by Mauve, totaling 2803 bp, were suspicious. They correspond to the yellow and red rectangles of Fig. Example of the non-homolog case. This is the block labeled ‘x’ in Fig. Example of the homolog case . Mauve aligns phage phiETA, 8704-9129, with phage phiNM2, 8046-8468. The nucleotide alignment has 7 gaps, of lengths 2, 2, 1, 1, 3, 4, and 4. The corresponding blastp 142 aa alignment of annotated proteins YP_001004347:1-142 and ABF73110:1-141 has 58/142(41 %) identities, 92/142(64 %) positives and 1 gap. This is a rather good alignment of two distant homologs, but the Mauve alignment does not reflect the conservation of the two proteins.When one excludes Mauve misalignments – that is, considering the green and blue rectangles of Fig. The high rate of Mauve misalignments on bacteriophage genomes is problematic. More than 20 % of Mauve column alignments on this dataset are either random, or belong to nucleotide alignments whose gaps contradicts the corresponding annotated proteins alignments. It should be noted, however, that the Mauve algorithm uses Muscle to produce alignments between its own anchors, and the way Muscle introduces gaps in nucleotide alignments does not seem to be appropriate for bacteriophage genomes, as we already saw in the preceding section on validating Alpha gapless alignments.Overall, Alpha’s alignment strategy captures the essential features of bacteriophage genomes. Regions that are similar are detected, while more dissimilar regions are not aggressively aligned. Being a conservative aligner, Alpha relies on functional collinearity to predict distant homologs that should be aligned using amino acids translations, such as the variants in columns 2 and 4 of Fig. Due to their peculiar mosaic structure where similar functions do not correspond to similar sequences, bacteriophage genomes are not well-suited to traditional whole genome alignment techniques. On the other hand, they exhibit features that can be leveraged to obtain alignments, most notably functional collinearity, a low duplication rate, and the presence of long shared sequences.In this paper, we presented a mathematical model based on partial order graphs for performing multiple alignment of bacteriophage whole genomes, along with algorithms to operate on the model. Relying exclusively on the equality relation, the model is almost parameter free, greatly reducing the need to calibrate the aligner, yet delivers biologically meaningful results. The model has been implemented in the form of an interactive aligner that can perform multiple alignments of dozens of genomes and present the result in an attractive format.We also showed that Alpha, used on bacteriophage genomes, produces biologically meaningful alignments, while avoiding the high rate of misalignments of complex heuristics such as progressiveMauve.Our model supposes that all genomes under consideration are functionally collinear. This is often the case, but not always. Our program can detect when this condition is not satisfied – indicating the presence of rearrangements – but does not perform the alignment in such a case. A short-term goal is to extend our mathematical model and aligner to deal with rearrangements.Some bacteriophage genomes present in the online databases are well annotated, other are less so. Another goal is to extend the aligner in order to perform automated transfer of annotations using the generated alignments.Finally, while we focussed this study on Siphoviridae, we plan to test Alpha on more general viruse families in which horizontal transfer is widespread, and for which the collinearity property may hold.https://bitbucket.org/thekswenson/alpha).The code, along with installation instructions for Ubuntu and OSX, is available on bitbucket (