Genome sequences and genome annotation data have become available at ever increasing rates in response to the rapid progress in sequencing technologies. As a consequence the demand for methods supporting comparative, evolutionary analysis is also growing. In particular, efficient tools to visualize-omics data simultaneously for multiple species are sorely lacking. A first and crucial step in this direction is the construction of a common coordinate system. Since genomes not only differ by rearrangements but also by large insertions, deletions, and duplications, the use of a single reference genome is insufficient, in particular when the number of species becomes large.Betweenness Problem. It is NP hard in general. As exact solutions are beyond reach for the problem sizes of practical interest, we introduce a collection of heuristic simplifiers to resolve ordering conflicts.The computational problem then becomes to determine an order and orientations of optimal local alignments that are as co-linear as possible with all the genome sequences. We first review the most prominent approaches to model the problem formally and then proceed to showing that it can be phrased as a particular variant of the Benchmarks on real-life data ranging from bacterial to fly genomes demonstrate the feasibility of computing good common coordinate systems.The online version of this article (10.1186/s13015-018-0133-4) contains supplementary material, which is available to authorized users. The past decade has seen rapid progress of sequencing technologies . The draStill, gMSAs are the natural starting point. Several pipelines to construct such alignments have been deployed over the past two decades, most prominently the tba/multiz pipeline , 11 emplCampylobacter jejuni , where n]. We call coordinate of position i of contig c of assembly Now consider an MSA As pointed out in , the exic. Intervals have a natural partial order defined by interval order if and only if one is contained in the other. Note that the interval order allows comparable intervals to overlap. We also consider intervals incomparable that belong to different contigs and/or assemblies.The natural starting point for considering adjacency and betweenness of alignment blocks are their constituent intervals between the two distinct intervals Given three intervals c, we say that adjacent if there is no interval predecessor of successor of Given a collection Let be a supergenome and consider the the collection of intervals on a given Then (i) no two intervals overlap, (ii) the interval orderis a total order on every contig c, (iii) every interval has at most one predecessor and one successor, and hence is adjacent to at most two intervals, and (iv) if is adjacent to both and then is between andc are comparable, i.e., the restriction of c is a total order. Since only intervals on the same contig can be adjacent, (iii) is an immediate consequence of (ii) and the fact that the number intervals is finite. Property (iv) is now a trivial consequence of the fact that by (iii) Property (i) follows directly from the condition. (ii) As a consequence, any two intervals on a fixed contig A key construction in this contribution is the notion of betweenness relations for alignment blocks.Cis betweenAandBwith respect toC is between A and B for some assembly Given three blocks We note that contradicting betweenness relations resulting from different genome assemblies adjacent if there is an assembly Two blocks It is useful to regard supergenome graphA, B) connect an alignment block A to an alignment block B with color The An example how the prejection mentclass2pt{minimmentclass2pt{minimsupergenome graph strongly depends on the evolutionary history of the genomes that it represents. In the absence of genome rearrangements , and deletions) then all genomes remain colinear with their common ancestor. In other words, a single, canonical Minimum FIn this work we interpret SSP as a betweenness (ordering) problem rather than a vertex ordering problem on a directed graph. Instead of (oriented) adjacencies, which are defined on pairs of blocks, one considers the relative order of three blocks:Betweenness Problem [Given a finite setXand a collectionof triples fromX, is there a total order onXsuch thateither Problem , 64: GivThis decision problem is NP-complete , 64. A tBetweenness Problem can be adapted to model the SSP by means of a suitable cost function b designed to penalize violations of the betweenness relation. Consider an order The For Betweenness Problem to colored multigraphs.Since this decision problem is NP-complete , 64, so mentclass2pt{minimmentclass2pt{minimcolored multigraphi, j, k) is part of the collection Given an (undirected) Colored Multigraph Betweenness Decision Problem: given the colored multigraph V such that Colored Multigraph Betweenness Problem: Given a colored multigraph V such that The reformulation as an optimization problem that maximizes the number of edges is straightforward: Minimum Feedback Arc Set problem [This problem can be viewed as an analog of the  problem  for betwThe (decision version of the)Colored Multigraph Betweenness Problem is NP-complete.Colored Multigraph Betweenness Problem if and only if the answer to the NP-complete Betweenness Problem is positive. In Additional file Every set mentclass2pt{minimColored Multigraph Betweenness Problem retains all unordered adjacencies and creates a unique coordinatization (up to orientation) that leaves all alignment blocks ordered as drawn.In the example of Fig. X that satisfies the inequalityd for which an ordering Robinsonian. It is worth noting that Robinsonian dissimilarities are intimately related with pyramidal clustering problems [An alternative framework for solving the SSP by construction of a preferred ordering is seriation. The Robinson seriation problem  starts fentclass1pt{minimaproblems , 67.Colored Multigraph Betweenness Problem or Betweenness Problem we consider a collections X that solves the Betweenness Problem for The seriation problem , 68 consThe relevant optimization task in our context is therefore to minimize the number of ordered triples that violate Eq. . A varieEach of the plausible models for the “Supergenome Sorting Problem” discussed in the previous sections leads to NP-hard computational problems. The size of typical genome-wide alignments by far exceeds the range where exact solutions can be hoped for, except possibly for the smallest and most benign examples such as the ones used as examples in . We therNevertheless it is possible to isolate certain sub-problems that can be solved exactly and independently of the remainder of the input graph. Since “linearized” portions of the vertex set can be contracted to a single vertex set, this leads to a reduction of problem size.If the supergenome graph is a directed acyclic graph then topological sorting of solves theColored Multigraph Betweenness Problem.G and thus presents a perfect solution to the Colored Multigraph Betweenness Problem as well.In this case betweenness is established exactly by the directed paths in the DAG. Hence any topological sorting preserves all betweenness triples of This simple observation suggests to identify subgraphs with DAG structure and to replace them with a representative for each replaced DAG. These can later be replaced by the solution that is created with topological sorting. We note that this does not necessarily preserve optimality. It is conceivable that a local DAG structure has to be broken up into two disjoint subsets that are integrated in larger surrounding structures in a way that requires reversal of the edge directions in one or even both parts. Nevertheless, if the local DAG structures are sufficiently isolated they are likely to be part of the optimal solution as a unit. The motif that describes such a local DAG structure has been introduced as “superbubble” in the context of graph structures arising in sequence assembly problems , 71.s in the supergenome graph with only a single neighbor t are conceptually a special case of superbubbles. These can be sorted together with their unique neighbor t. s and t, i.e., placing the source s immediately before t and sink s immediate after t. An example of such a source and a sink can be seen in Fig. Source and sink vertices Colored Multigraph Betweenness Problem but can make it easier to apply some of the reduction heuristics discussed above. In particular, if the relative orientation of the coordinatizations could be fixed in an optimal manner, the betweenness problem reduces to a much easier topological sorting problem. Finding this optimum, however, is equivalent to the Betweenness Problem, which is a NP-hard. Hence, we again have to resort to local heuristics.In some cases it is helpful to reverse the direction of the coordinate system of a single species. This is in particular the case when a single genome is reversed compared to all others. The inversion of an entire path does not change the solution of the v, w) and  in E is a mini cycle.Let v and w. More precisely, the less supported direction of an edge is dropped. The estimate for support is evaluated in a region around a mini-cycle since adjacent mini-cycles may yield contradictory majority votes.Mini-cycles are naturally removed by removing one of the two edge directions between Two mini-cycles are connected with each other if they share a vertex. A mini-cycle complex The mini-cycle complexes of a supergenome graph form a unique partition of the set of all minicycles. Any two classes of this partition are vertex and edge disjoint.H whose vertices are the mini-cycles, and there are edges between any two mini-cycles that share at least one vertex. Then every mini-cycle complex H. Since the connected components of a graph are uniquely defined, disjoint, and form a cover, they partition the vertex set of H. Every minicycle, furthermore, forms a connected subgraph of Consider the the graph Colored Multigraph Betweenness Problem for a subgraph. This is still a hard problem, so that we again utilize a heuristic approach. In this step we only attempt to remove mini-cycles. Cycles that connect mini-cycle complexes with each other or with other vertices in the graph are therefore left untouched and have to be dealt with in a subsequent step.The mini-cycle complexes therefore can be resolved independently of each other. The target is to remove edges that create cycles in order to obtain a DAG that can then be subjected to topological sorting. However, this topological sorting is a solution of the The local sorting within a complex As part of this procedure it is possible that parts of a directed path from a given genome received contradictory orientations in different regions. If this is the case, the edge crossing the boundary between the differently oriented regions must be removed. Finally, the heuristic may terminate and still leave some edges unoriented. This indicates that the orientations are contradictory and need to be reversed. An example of the mini-cycle resolution process is shown in Fig. Salmonella enterica serovars. This alignment was produced with Cactus [Salmonella enterica Newport genome as reference and comprises 13, 416 blocks, 50, 932 sequence fragments, and 18, 047, 456 nucleotides. The medium-size set, termed Saccharomyces cerevisiae genome as references. It comprises 49, 795 alignment blocks composed of 275, 484 sequences fragments that contains 71, 517, 259 nucleotides. The third, much larger set Drosophila melanogaster genome as references. It comprises 2, 112, 962 blocks composed of 36, 139, 620 sequence fragments hat contains 2, 172, 959, 429 nucleotides. For more detailed information of the data sets refer to Additional file We investigate here three genome-wide data sets. The smallest set, referred to as h Cactus  using thmentclass2pt{minimThe two large genome-wide multiple sequence alignments were produced by the multiz pipeline and were downloaded from the UCSC genome browser . They arB and the number r rows in B, we normalize with Since genome-wide alignments tend to contain also very poorly aligned regions we require a minimum similarity, expressed here in the form of sum-of-pairs blastz scores . Since tThe coordinatization of the supergenome depends on the uniqueness of coordinate projections. There are three major reasons to observe overlaps, i.e., genomic regions that appear in more than one alignment: (i) the sequence is duplicated in some species. Then multiz tends to align the corresponding unduplicated sequence to both duplicates. (ii) Spurious similarities in particular in poorly conserved regions may lead to alignments containing a sequence element twice at the expense of the second copy. (iii) Short overlaps at the end of blocks may appear due to difficulties in determining the exact ends of alignable regions. The first two causes introduce undesirable noise and uncertainties. Therefore, we remove all such overlapping blocks in which sequences from the species overlap. Since there is no easy way to determine which one of two overlapping blocks is likely correct, we opt to remove both copies. The third case, in contrast, does not disturb the relative order of alignment blocks and thus can be ignored. The overlap filter is applied after low quality alignments already have been removed from the data set.We tolerate an overlap of 20 nt at the borders of alignment blocks. This cutoff is designed to remove ambiguous alignments, while avoiding the removal of alignment blocks that overlap by a few nucleotides owing to overlapping extensions of local blastz seeds. In addition we remove sequences that completely overlap other sequences regardless of their size to further reduce the noise introduced by spurious alignments. We opt here for a stringent procedure and remove all alignment blocks that contain sequences tagged for removal. In practice, this step removes only a tiny fraction of the blocks and thus does not significantly influence the coverage of the retained data.The initial data filtering steps removed almost mentclass2pt{minimThe algorithmic ideas and their justifications for the graph reduction steps have already been discussed in "The filtered data is used to create an initial supergenome graph. Then we iterate the three different graph simplifiers until no further reduction steps can be applied: the mini-cycle remover, the source/sink simplifier, and the superbubble simplifier. The individual simplifiers are straightforward implementations of the basic ideas outlined above. The mini-cycle remover first identifies the mini-cycles, aggregates them into non-overlapping complexes, and then proceeds to remove contradictory edges in a greedy manner. The other two simplifiers first check for each vertex in the input graph whether it is a valid sink, source, or starting vertex of a superbubble. Pseudocode of the simplifiers is given in Additional file The mini-cycle remover works more effectively on a single big complex than on many small ones separated by narrow gaps. The other two simplifiers therefore are applied until a fixed point is reached to close some of these gaps. The entire procedure is then iterated until the minicycle remover cannot change the graph any further.Minimum Feedback Arc Set Problem, which is known to be NP-hard [Once a fixed point is reached we attempt to remove directed cycles. This amounts to solving the  NP-hard . Given t NP-hard  because s may have more than a single successor v, provided v is a predecessor of all other successors of s. The position of source s in the DAG is determined by v and thus s can be placed immediately before v. The corresponding arrangements for a sink and its predecessor is treated analogously.The minicycle remover is not used in this second pass because it is not applicable to DAGs by construction. Instead, we use a generalized version of the source/sink simplifier in which a source The running time and the minimization of the data set while this process is applied is shown in Figs. v and w are placed consecutively whenever there is an edge  in the final DAG. To this end we modify Kahn’s algorithm by sorting the successors of a node in the order of evidence for their adjacency in the original data.Finally, the common coordinate system is created by seriation of the DAG. The resulting supergenome, i.e. linear order of the vertices of the graphs corresponds to a linear order of all blocks. In particular, vertices resulting from a simplifier may contain more than one block. Those blocks, however, are already sorted and thus are inserted as a single block. Seriation is naturally divided into two steps. First, topological sorting is used to calculate an initial linear ordering from the DAG. Kahn’s algorithm  is a clai, j, k) for which the Robinson condition, Eq. | is the number of edges from i to k. Since d is a good measure of co-linearity only for short distances, we limit the path length in Eq. l edges. We set O(|V|) as a consequence of the sparsity of the input graph.The order obtained in this manner may not be optimal w.r.t. its agreement with the order of the blocks in the genomes. It provides a good starting point, however, for the final optimization step, which we phrase as minimizing the number entclass1pt{minimaWe use a gradient descent-like optimization algorithm to minimize Since no ground truth is available for this problem and the construction of simulated benchmarks for genome wide multiple sequence alignments would be a research project in its own right, we have to resort to measuring quantities that are informative about the final choice of the coordinate system.A straightforward measure is the distribution of distances in the output coordinate system of alignment blocks that are contiguous in at least one input genome. Since we are not interested in the length of alignment blocks, distance is measured here not in terms of sequence length but in terms of the number of alignment blocks, so that adjacent blocks have distance 0. It is important here to keep track of the reading directions: contiguity with the same reading direction corresponds to preservation of the original genomic coordinates, while a change in reading direction indicates change of the order. Thus we distinguish preserved and inverted reading direction in our quantitative analysis.Open reading frames (ORFs) are among the best-conserved features in the genome due to the strong selection pressures acting to preserve the corresponding proteins. As an immediate consequence we expect that ORFs are almost always preserved. This should be reflected also by the supergenome coordinates, i.e., blocks belonging to the same ORF should have only a small number  of other blocks between them and retain their relative order. For higher eukaryotes, we cannot expect near perfect adjacency of coding blocks, however, because larger introns are subject to local rearrangements. To quantify the proximity of blocks of an ORF, the distances between all adjacent blocks are determined as described above and their absolute values are added up to yield a single characteristic value. In addition we count the number of exons that are “broken up” in the sense that consecutive pieces do not have consecutive coordinates or are placed in reverse order in the supergenome. Coding genes and exons are taken as annotated for the corresponding genomes. We note that in particular for large, intron-rich genomes such as the insect data set We have devised a heuristic algorithm to extract a common coordinate system for a supergenome from a genome-wide multiple sequence alignment. The procedure has been tested on three alignments of very different size and difficulty: an easy instance comprising four closely related bacterial species, an intermediate size problem composed of seven yeast genomes, and the alignment of 27 insect genomes as the most difficult instance.The heuristic algorithm outlined above is composed of several largely independent components. It is of interest, therefore to consider their relative impact on the final results. We find that most edges are removed by the mini-cycle remover, with a small contribution of Algorithm GR. On the other hand, the largest reduction of the vertex set is due to the merges identified by the closed DAG simplifier. More quantitative information is compiled in Figs. Colored Multigraph Betweenness Problem cannot be solved exactly in reasonable time for instances with sizes that are of interest for our application at hand, we cannot measure performance relative to the exact solution. The multigraphs obtained from real-life alignments contain a large number of conflicting edges. In the most difficult data set, Since the The quality of the coordinate systems strongly depends on the quality of the input alignments. A detailed discussion of issues with the input alignments can be found in Additional file In order to check the overall quality of the solution we compute a betweenness graph from the supergenome coordinate systems. This is done by starting with a graph without edges. First, all edges that are supported by the total order of the supergenome are added. This is followed by edges that contradict the total order but do not create contradicting betweenness triples. Note that this graph is not necessary optimal but a good approximation that can easily be computed. The edge set of this graph is compared to the edge set of the initial graph. Good solutions are expected to retain most of the edges. For the three data sets we find that 95.3%, 97.5%, and 99.4% of the edges are retained in data sets The distribution of block-wise distances in the supergenome of alignment blocks that are consecutive in the original genome serves as a simple measure of preserved synteny. The results are summarized in Fig. Saccharomyces cerevisiae. Of these, 5474, i.e., Drosophila melanogaster are 167, 051 exons annotated, and part of the alignment Restricting our attention to coding sequences yields a more stringent quality measure, as shown in Fig.  introns  we expecS. cerevisiae. There, it comprises 20 genes [As a specific example we consider the genes of the yeast TCA cycle  in more 20 genes –79, all Colored Multigraph Betweenness Problem is NP-hard. It belongs to a class of relatively poorly studied betweenness problems for which few efficient heuristics have been developed so far. We introduced here several local simplification rules that can be applied iteratively to reduce the problem. It is important to note these reduction steps are only heuristics and do not guarantee optimal solutions. In conjunction with a simple serialization approach for the residual graph, they nevertheless yield practically useful results with acceptable computational efforts.In this contribution we have shown that the problem of computing a common coordinate system for supergenomes with the The most immediate application of the supergenome sorting problem is the direct comparison of genome annotations for multiple genomes. Hence it constitutes a prerequisite for comparative genome browsers. We have applied our approach to three real-life data sets of different sizes and difficulties. Our results indicate that practically useful coordinatizations can be computed. The computational requirement of the method scales favorably so that in principle even the largest genome-wide multiple sequence alignments could be processed.The present study, however, also highlights the shortcomings of currently available genome-wide multiple sequence alignments , 81. TheSynteny, i.e., the preservation of relative genome order, is in general a good predictor for homology. This fact suggests to use the common coordinate system to identify likely homologous regions that are not included in the initial alignment blocks. These could then be (re)aligned at sequence level and included in a revised multiple sequence alignment. This, in turn, could yield an improved common coordinate system. The systematic improvement of genome-wide alignments, albeit an interesting and extremely useful endeavor, is beyond the scope of this contribution.Possible improvements of the approach taken here are conceivable in at least two directions. First, one may consider a hybrid algorithm that solves subgraphs with a dominant backbone use the method discussed in . As discAdditional file 1. Additional Text covering some proofs, details on the data set used for evaluation, pseudocode of the algorithms described in the main text, and additional benchmark data.


During procedures for conducting multiple sequence alignment, that is so essential to use the substitution score of pairwise alignment. To compute adaptive scores for alignment, researchers usually use Hidden Markov Model or probabilistic consistency methods such as partition function. Recent studies show that optimizing the parameters for hidden Markov model, as well as integrating hidden Markov model with partition function can raise the accuracy of alignment. The combination of partition function and optimized HMM, which could further improve the alignment’s accuracy, however, was ignored by these researches.A novel algorithm for MSA called ProbPFP is presented in this paper. It intergrate optimized HMM by particle swarm with partition function. The algorithm of PSO was applied to optimize HMM’s parameters. After that, the posterior probability obtained by the HMM was combined with the one obtained by partition function, and thus to calculate an integrated substitution score for alignment. In order to evaluate the effectiveness of ProbPFP, we compared it with 13 outstanding or classic MSA methods. The results demonstrate that the alignments obtained by ProbPFP got the maximum mean TC scores and mean SP scores on these two benchmark datasets: SABmark and OXBench, and it got the second highest mean TC scores and mean SP scores on the benchmark dataset BAliBASE. ProbPFP is also compared with 4 other outstanding methods, by reconstructing the phylogenetic trees for six protein families extracted from the database TreeFam, based on the alignments obtained by these 5 methods. The result indicates that the reference trees are closer to the phylogenetic trees reconstructed from the alignments obtained by ProbPFP than the other methods.We propose a new multiple sequence alignment method combining optimized HMM and partition function in this paper. The performance validates this method could make a great improvement of the alignment’s accuracy. In bioinformatics, multiple sequence alignment is a foundermental conception. It aim to align more than two biomolecular sequences and applied for various biological analysis tasks, for example, protein structure prediction and phylogenetic inference . Using MThere are many types of methods for multiple sequence alignment, and most of them are progressive . Using ax and y, also the algorithms apply dynamic program, however the scoring function is not simply based on certain substitution matrix any more, since if residue xi should be aligned with residue yj is not just concerned about sequences x and y but also concerned about others. Numerous algorithms utilize the posterior probability P to compute the substitution scores. P represent the probability that residue on position xi in sequence x and residue on position yj in sequence y are matched in the “true” multiple sequence alignment [For two sequences, the pairwise alignment task simply applies dynamic programming. And the scoring function for dynamic programming is usually based on a substitution matrix, for example, BLOSUM62 and PAM250 for protein sequences. In the multiple sequence alignment problems, when we need to align given sequences lignment .For the sake of calculating the posterior probability, a large number of approaches are practiced by different algorithms. Among those considerable amount of progressive alignment algorithms, most of them apply Hidden Markov Model to calculate the posterior probability, for example, ProbCons . But in Howell et al.  and McCaSome algorithms apply integrated approaches, for instance, MSAProbs  and QuicFor the purpose of optimizing the parameters of HMM in MSA problem, many kinds of optimization algorithms are employed by various algorithms, such as Particle Swarm Optimization –30, EvolWon et al.  use an eNevertheless, combination of the partition function and the optimized HMM was ignored by these studies. So, a novel algorithm for MSA called ProbPFP is presented in this paper. ProbPFP integrates the posterior probabilities yield by particle swarm optimized HMM and those yield by partition function.Ω [We compared ProbPFP with 13 outstanding or classic approaches, that is, Probalign , ProbConΩ , PicXAA Ω , KALIGN2Ω , COBALT Ω , CONTRAlΩ , Align-mΩ , MUSCLE Ω , MAFFT [Ω , T-CoffeΩ , and CluΩ , accordiΩ  and OXBeΩ , along wΩ .Px,y(xi∼yj)=P, then the dynamic programming will be executed according to the following formula.A lot of multiple alignment methods construct alignment with maximum expected accuracy. A dynamic program need to be executed to determine the expected accuracy. The substitution score for the dynamic programming is set as the posterior probability when two corresponding positions in each sequence are aligned. The posterior probability was denoted as x and y, the maximal expected accuracy alignment will be generated when the dynamic programming finished. The alignment will get a corresponding maximum global score GS=A.For two sequences Partition function is a core concept in statistical physics. It is similar to path integral mathematically. By calculating the partition function, the microstates can be related to the macroscopic physical quantity. And all of the thermodynamic functions that characterize the equilibrium thermodynamic properties of the system can be represented by partition function.In equilibrium, the distribution of particles at each energy level follows the Boltzmann distribution, as the formula below:Pi indicates the probability that the particle is at the i-th level, T represents the thermodynamic temperature of the particle system, εi represents the free energy of the i-th level, and k represents the Boltzmann constant.Pi can be calculated by:According to the formula , Pi can The denominator The partition function used in probability theory, information theory and dynamical systems is the generalization of the definition of partition function in statistical mechanics.A(l) of an alignment l is proportional to the log-likelihood ratio of l. So, the probability of an alignment l is proportional to eA(l)/T) represents the score of aligning residue xi with residue yj, in the original scoring matrix.where i-th residue in sequence x and the j-th residue in sequence y is aligned in the "true" alignment of x and y is defined by the formula below:Pair-HMM was used by numerous multiple sequence alignment methods to calculate posterior probability. The posterior probability that the L represents the set of each possible alignment of sequences x and y, l∗ represents the “true” alignment of them, and 1(expr) represents the indicator function which returns 1 if the expr is true or 0 if it is false.while The majority multiple sequence alignment methods on the basis of pair-HMM use the Forward and Backward algorithm to compute the posterior probability, as explained in .Nevertheless, for estimating the model parameters of HMM, there are selected algorithms that use certain other optimization methods instead of utilizing the Forward and Backward algorithm, to prevent being trapped in local optima, for example, particle swarm optimization.Optimization algorithms are derived from computer science. Nowadays, they are extensively applied in various subjects, for example, life science and material science, and so on , 49. OptPSO  is an opPSO algorithms move the particles to “better” positions iteratively, based on the best position that a particle have reached along with the best position that the whole swarm have reached.n particles. It possess a stochastically yielded position vector xi and a stochastically yielded velocity vector vi for each particle i. In the algorithm, the formula  is the score for the two elements rik and rjk at position k. If the two elements are all residues, it is the substitution score for this two types of residue. If one of the elements is gap, it is the penalty of gap open or extend. In this study, the substitution matrix is the commonly used BLOSUM62. The gap open penalty is set as -11, and the gap extend penalty as -1, since the two values for these penalties are extensively used.In which, sequences In order to optimize the SoP score, we did a series of experiments to determine how many particles and how many iterations we need. We finally chose 10 particles for 30 iterations. The experiments are described in “results” section. After that, the final trained parameters are used to construct a hidden Markov model. We apply the model to compute the posterior probability and denote this type of posterior probability as The posterior probability computed by the partition function are denoted as Once the posterior probabilities were generated, they are used as substitution scores in dynamic programming method to align two corresponding sequences. We get a final global score for the two sequences through the dynamic programming. Using all of the scores, we establish a distance matrix from which we establish a guide tree to guide the subsequent alignment.Since in bioinformatics, similarity is an important concept, various approaches are developed to measure similarity on numerous research fields –60. For x and y, so it indicates the similarity of this two sequences. And then, the distance of them can be defined as shown:It is the sum of posterior probabilities for every aligned residue pair on the yielded alignment of sequences The distance matrix of a set of sequences, was constituted by the distances for every pair of sequences.Guide tree is a binary tree, that each node has two children. Each leaf of guide tree stands for a sequence, each internal node stands for an alignment of the sequences that the leaves of the corresponding sub-tree represent, and the root represents the final alignment. It can be built according to the distance matrix by using various clustering methods, for example, UPGMA and Neighbor-Joining. We applied UPGMA, which is a greedy linear heuristic methods, to build the guide tree, in this study.Ni and Nj are united to a node Nk, for any other node Nl, the distance between Nk and Nl is defined as the average distance of each pair of sequences that one from Nk and another from Nl.When the two closest remaining nodes So it can be calculated by:Progressive alignment is the last procedure of ProbPFP. An unaligned sequence or the alignment of some aligned sequences is called profile. Starting from the set of original sequences, the core idea of progressive alignment is choosing the closest pair of profiles in the set and aligning them to generate a new profile to replace them in the set. As mentioned in the previous subsection, we learned that the aligning order is actually determined by the guide tree.Before we apply progressive alignment, we first apply the probabilistic consistency transformation described in MSAProbs . ProbabiX and Y are profiles, i and j are the i-th and j-th columns. P′ is the transformed probabilistic matrix, and wx and wy are the weights which were calculated according to the methods in ClustalW [where ClustalW .We will execute the profile alignment progressively until there will be only one profile. The last profile will be the initial alignment that we seek for the set of sequences.As the last step, we divide the alignment into two random groups and realignment them by profile alignment. After a fixed number of iterations (10 by default), we got the final alignment.The steps for ProbPFP are displayed in Fig. Ω, MUSCLE, KALIGN2, MAFFT, ClustalW, Align-m and DIALIGN. These 13 methods were all run with their default parameters. The particle swarm optimization in ProbPFP utilized 10 particles and iterated for 30 times.We compared ProbPFP with 13 outstanding or classic MSA methods, i.e., Probalign, ProbCons, T-Coffee, PicXAA, CONTRAlign, COBALT, Clustal The numbers of particles and iterations are determined by a series of experiments according to the SoP score on the RV11 and RV12 subsets of BAliBASE3 benchmark. To determine the number of particles and the number of iterations, we applied 5, 10, 15, 20, 25 and 30 particles to the families in RV11 and RV12, and iterated from 1 to 60 times. The mean SoP scores of this families are calculated. The results are described in Fig. From Fig. we applied these 14 algorithms to align the sequence sets in three commonly used protein multiple sequence alignment public benchmarks: SABmark 1.65, OXBench 1.3 and BAliBASE 3. These benchmarks were obtained from a collection which was downloaded from Robert C. Edgar’s personal website that is listed in the “Availability of data and materials” sections. Edgar gathered these benchmark datasets into the collection and converted the format of all these sequences to the convenient standard FASTA. In particular, only the RV11 subsets and the RV12 subsets in BAliBASE 3 and the Twilight Zone subsets and the Superfamily subsets in SABmark 1.65 were used in the comparison. As reported in , these sThe algorithms were compared based on the total column score and sum-of-pairs score. For each benchmark and each algorithm, the mean of the TC scores of alignments for every family is calculated, as same as the mean of the SP scores.Table Table Table Furthermore, we utilized ProbPFP to assist the rebuilding of the phylogenetic tree to assess the practicability of it. On 6 protein families extracted from the database TreeFam . ProbPFPTo assess the quality of the reconstructed phylogenetic trees, we need to calculate the distances between the reference trees with them. Here, we applied the commonly used partition metric (Robinson-Foulds metric). A better inferred tree has a smaller distance, since it is closer to the reference tree. Table ProbPFP was compared with 13 outstanding or classic MSA methods based on TC and SP Scores. It achieved the highest mean TC and SP Scores among these 14 methods on the benchmark Sabre and OXBench. And on dataset BAliBASE, ProbPFP achieved the second highest mean TC and SP Scores and are very close to the highest scores that Probalign obtained.To illustrate the practicability of ProbPFP, We also compared ProbPFP with 4 leading aligners according to phylogenetic tree reconstruction. Among the 6 tests, there are 5 tests in which the trees constructed from alignments yielded by ProbPFP are nearest to those reference trees.It can be seen that combining PSO optimized HMM with partition function could make a great improvement of the alignment quality.The accuracy of sequence alignment could be raised by optimizing the parameters of HMM for multiple sequence alignment. It could also be improved by combining hidden Markov model with partition function. In this paper, we propose a new MSA method, ProbPFP, that integrates the HMM optimized by PSO with the partition function. The performance validates this method could make a great improvement of the alignment’s accuracy.


HH-suite is a widely used open source software suite for sensitive sequence similarity searches and protein fold recognition. It is based on pairwise alignment of profile Hidden Markov models (HMMs), which represent multiple sequence alignments of homologous proteins.https://github.com/soedinglab/hh-suite.We developed a single-instruction multiple-data (SIMD) vectorized implementation of the Viterbi algorithm for profile HMM alignment and introduced various other speed-ups. These accelerated the search methods HHsearch by a factor 4 and HHblits by a factor 2 over the previous version 2.0.16. HHblits3 is ∼10× faster than PSI-BLAST and ∼20× faster than HMMER3. Jobs to perform HHsearch and HHblits searches with many query profile HMMs can be parallelized over cores and over cluster servers using OpenMP and message passing interface (MPI). The free, open-source, GPLv3-licensed software is available at The added functionalities and increased speed of HHsearch and HHblits should facilitate their use in large-scale protein structure and function prediction, e.g. in metagenomics and genomics projects. A sizeable fraction of proteins in genomics and metagenomics projects remain without annotation due to the lack of an identifiable, annotated homologous protein . A high A profile Hidden Markov Model (HMM) extends sequence profiles by augmenting the position-specific amino acid substitution scores with position-specific penalties for insertions and deletions. These can be estimated from the frequencies of insertions and deletions in the MSA. The added information improves the sensitivity of profile HMM-based methods like HHblits or HMMER3 over ones based on sequence profiles, such as PSI-BLAST .Only few search tools represent both the query and the target proteins as sequence profiles built from MSAs of homologous proteins –14. In cIn recent years, various sequence search tools have been developed that are up to four orders of magnitude faster than BLAST –19. ThisGenomics and metagenomics projects could annotate more sequence by adding HHblits searches through the PDB, Pfam and other profile databases to their pipelines . AdditioIn this work, our goal was to accelerate and parallelize various HH-suite algorithms with a focus on the most time-critical tools, HHblits and HHsearch. We applied data level parallelization using Advanced Vector Extension 2 (AVX2) or Streaming SIMD Extension 2 (SSE2) instructions, thread level parallelization using OpenMP, and parallelization across computers using MPI. Most important was the ample use of parallelization through SIMD arithmetic units present in all modern Intel, AMD and IBM CPUs, with which we achieved speed-ups per CPU core of a factor 2 to 4.The software HH-suite contains the search tools HHsearch  and HHblHHsearch aligns a profile HMM against a database of target profile HMMs. The search first aligns the query HMM with each of the target HMMs using the Viterbi dynamic programming algorithm, which finds the alignment with the maximum score. The E-value for the target HMM is calculated from the Viterbi score . Target −3) are added to the query MSA for the next search iteration.HHblits is an accelerated version of HHsearch that is fast enough to perform iterative searches through millions of profile HMMs, e.g. through the Uniclust profile HMM databases, generated by clustering the UniProt database into clusters of globally alignable sequences . AnalogoHHblits has a two-stage prefilter that reduces the number of database HMMs to be aligned with the slow Viterbi HMM-HMM alignment and MAC algorithms. For maximum speed, the target HMMs are represented in the prefilter as discretized sequences over a 219-letter alphabet in which each letter represents one of 219 archetypical profile columns. The two prefilter stages thus perform a profile-to-sequence alignment, first ungapped then gapped, using dynamic programming. Each stage filters away 95 to 99% of target HMMs.Most of the speed-up was achieved by developing efficient SIMD code and removing branches in the pairwise Viterbi HMM alignment algorithm. The new implementation aligns 4 (using SSE2) or 8 (using AVX2) target HMMs in parallel to one query HMM.i,j) to be aligned with each other. These probabilities are needed by the MAC alignment algorithm. We improved the speed of the Forward-Backward and MAC algorithms by removing branches at the innermost loops and optimizing the order of indices, which reduced the frequency of cache misses.We accelerated the Forward-Backward algorithm that computes posterior probabilities for all residue pairs  or 8 (AVX2) target profile HMMs in memory instead of just one. This was done by keeping only the current row of the 5 scoring matrices in memory during the dynamic programming “” sectionO(NL2), where N is the number of MSA sequences and L the number of columns. It can be a runtime bottleneck for large MSAs, for example during iterative searches with HHblits. A more detailed explanation is given in “For maximum sensitivity, HHblits and HHsearch need to reduce the redundancy within the input MSA by removing sequences that have a sequence identity to another sequence in the MSA larger than a specified cutoff (90% by default) . The redO(NL2) because for each column it takes a time ∼O(NL) to compute column-specific sequence weights based on the subalignment containing only the sequences that have no gap in that column.Additionally, the calculation of the amino acid probabilities in the profile HMM columns from an MSA can become time-limiting. Its run time scales as We redesigned these two algorithms to use SIMD instructions and optimized memory access through reordering of nested loops and array indices.Search sensitivity could be slightly improved for remote homologs by modifying the weighting of the secondary structure alignment score with respect to profile column similarity score. In HH-suite3, the secondary structure score can contribute more than 20% of the total score. This increased the sensitivity to detect remote homologs slightly without negative impact on the high-precision.HH-suite3 allows users to search a large number of query sequences by parallelizing HHblits/HHsearch searches over queries using OpenMP and MPI . We removed the limit on the maximum number of sequences in the MSAs (parameter -maxseqs < max>). We ported scripts in HH-suite from Perl to Python and added support for the new PDB format mmCIF, which we use to provide precomputed profile HMM and MSA databases for the protein data bank (PDB) , Pfam 2, SCOP 2, and cluWe adopted a new format for HHblits databases in which the column state sequences used for prefiltering (former *.cs219 files) are stored in the FFindex format. The FFindex format was already used in version 2.0.16 for the a3m MSA files and the hhm profile HMM files. This resulted in a ∼4 s saving for reading the prefilter database and improved scaling of HHblits with the number of cores. We also integrated our discriminative, sequence context-sensitive method to calculate pseudocounts for the profile HMMs, which slightly improves sensitivities for fold-level homologies .https://github.com/soedinglab/hh-suite). We fixed various bugs such as memory leaks and segmentation faults occurring with newer compilers.To keep HH-suite sustainable and expandable in the longer term, we extensively refactored code by improving code reuse with the help of new classes with inheritance, replacing POSIX threads (pthreads) with OpenMP parallelization, removing global variables, moving from make to cmake, and moving the HH-suite project to GitHub . PowerPC CPUs with AltiVec vector extensions are also supported.Because we were unable to obtain funding for continued support of HH-suite, user support is unfortunately limited to bug fixes for the time being.All modern CPUs possess SIMD units, usually one per core, for performing arithmetic, logical and other operations on several data elements in parallel. In SSE2, four floating point operations are processed in a single clock cycle in dedicated 128-bit wide registers. Since 2012, the AVX standard allows to process eight floating point operations per clock cycle in parallel, held in 256 bit AVX registers. With the AVX2 extension came support for byte-, word- and integer-level operations, e.g. 32 single-byte numbers can be added or multiplied in parallel (32×1 byte=256 bits). Intel has supported AVX2 since 2013, AMD since 2015.HHblits 2.0.16 already used SSE2 in its prefilter for gapless and gapped profile-to-sequence alignment processing 16 dynamic programming cells in parallel, but it did not support HMM-HMM alignment using vectorized code.Intrinsic functions allow to write SIMD parallelized algorithms without using assembly instructions. However, they are tied to one specific variant of SIMD instruction set (such as AVX2), which makes them neither downwards compatible nor future-proof. To be able to compile our algorithms with different SIMD instruction set variants, we implemented an abstraction layer, simd.h. In this layer, the intrinsic functions are wrapped by preprocessor macros. Porting our code to a new SIMD standard therefore merely requires us to extend the abstraction layer to that new standard, whereas the algorithm remains unchanged.The simd.h header supports SSE2, AVX2 and AVX-512 instruction sets. David Miller has graciously extended the simd.h abstraction layer to support the AltiVec vector extension of PowerPC CPUs. Algorithm 1 shows a function that computes the scalar product of two vectors.The Viterbi algorithm, when applied to profile HMMs, is formally equivalent to global sequence alignment with position-specific gap penalties . We had % gaps  by match states and all other columns as insertion states. By traversing through the states of a profile HMM, the HMM can “emit” sequences. A match state (M) emits amino acids according to the 20 probabilities of amino acids estimated from their fraction in the MSA column, plus some pseudocounts. Insert states (I) emit amino acids according to a standard amino acid background distribution, while delete states (D) do not emit any amino acids.HH-suite models MSA columns with <50The alignment score between two HMMs in HH-suite is the sum over all co-emitted sequences of the log odds scores for the probability for the two aligned HMMs to co-emit this sequence divided by the probability of the sequence under the background model. Since M and I states emit amino acids and D states do not, M and I in one HMM can only be aligned with M or I states in the other HMM. Conversely, a D state can only be aligned with a D state or with a Gap G Fig. . The co-q emits a residue from its M state and HMM p emits a residue from the I state. The pair state for this alignment column is MI. In column six of the alignment HMM q does not emit anything since it passes through the D state. HMM p does not emit anything either since it has a gap in the alignment. The corresponding pair state is DG. To speed up the alignment, we exclude pair states II and DD, and we only allow transitions between a pair state and itself and between pair state MM and pair states MI, IM, DG, or GD.We denote the alignment pair states as MM, MI, IM, II, DD, DG, and GD. Figure SXY, one for each pair state XY ∈{MM, MI, IM, DG, GD }. They contain the score of the best partial alignment which ends in column i of q and column j of p in pair state XY. These five matrices are calculated recursively. To calculate the local alignment score, we need five dynamic programming matrices q at position i, t at j, and fa denotes the background frequency of amino acid a. The score Saa measures the similarity of amino acid distributions in the two columns i and j. Sss can optionally be added to Saa. It measures the similarity of the secondary structure states of query and target HMM at i and j [j] in the scalar version of the Viterbi algorithm. The first if-statement in Algorithm 2 ensures that these cells obtain a score of −∞.In order to calculate suboptimal, alternative alignments, we forbid the suboptimal alignment to pass through any cell .To reduce memory requirements in the vectorized version, the cell-off flag is stored in the most significant bit of the backtracing matrix Fig.  see “Me” sectionA small improvement in runtime was achieved by compiling both versions of the Viterbi method, one with and one without cell-off logic. For the first, optimal alignment, we call the version compiled without the cell off logic and for the alternative alignments the version with cell-off logic enabled. In C/C++, this can be done with preprocessor macros.Shorter profile HMMs are padded with probabilities of zero up to the length of the longest profile HMM in the batch Fig. . TherefoSaa in the first line in Algorithm 4 is is computed as the scalar product between the precomputed 20-dimensional vector The sum in the profile column similarity score Most of the memory in Algorithm 2 is needed for the five score matrices for pair states MM, MI, IM, GD and DG. For a protein of 15 000 residues, the five matrices need 15 000×15 000×4byte×5 matrices=4.5GB of memory per thread.In a naive implementation, the vectorized algorithm would need a factor of 4 or 8 more memory than that, since it would need to store the scores of 4 or 8 target profile HMMs in the score matrices. This would require 36GB of memory per thread, or 576GB for commonly used 16 core servers.ibest,jbest) of the highest scoring cell to reconstruct the alignment.However, we do not require the entire scoring matrices to reside in memory. We only need the backtracing matrices and the position  are the positions of the cell whose scores are to be computed, and the other vector holds the scores of the previous row i−1. After all the scores of a row i have been calculated, the pointers to the vectors are swapped and the former row becomes the current one.We implemented two approaches. The first uses two vectors per pair state Fig.  top. Onej−1 hold the scores of the current row that have already been computed. Its elements from j to the last position Lt hold the scores from the previous row i−1.The second approach uses only a single vector Fig.  bottom. The second variant turned out to be faster, even though it executes more instructions in each iteration. However, profiling showed that this is more than compensated by fewer cache misses, probably owed to the factor two lower memory required.O(Lt). However, we still need to keep the backtracing matrix (see next subsection), of quadratic size O(LqLt) in memory. Therefore the memory complexity remains unaffected.We save a lot of memory by storing the currently needed scores of the target in a linear ring buffer of size ibest,jbest) with maximum score, we need to store for each cell  and every pair state  the previous cell and pair state the alignment would pass through, that is, which cell contributed the maximum score in . For that purpose it obviously suffices to only store the previous pair state.To compute an alignment by backtracing from the cell . The longest known protein Titin has about 33 000 amino acids. To keep a 33 000×33 000×6But we would still need about 1.35GB to hold the backtrace and cell-off matrices. A naive SSE2 implementation would therefore need 5.4GB, and 10.8GB with AVX2. Because every thread needs its own backtracing and cell-off matrices, this can be a severe restriction.i,j). The preceding state for the IM, MI, GD, DG states can be held as single bit, with a 1 signifying that the preceding pair state was the same as the current one and 0 signifying it was MM. The preceding state for MM can be any of STOP, MM, IM, MI, GD, and DG. STOP represents the start of the alignment, which corresponds to the 0 in  over the last 200 processed Viterbi alignments and skipped all further database HMMs when this average dropped below 0.01, indicating that the last 200 target HMMs produced very few Viterbi E-values below 1.This criterion requires the targets to be processed by decreasing prefilter score, while our vectorized version of the Viterbi algorithm requires the database profile HMMs to be ordered by decreasing length. We solved this dilemma by sorting the list of target HMMs by decreasing prefilter score, splitting it into equal chunks (default size 2 000) with decreasing scores, and sorting target HMMs within each chunk by their lengths. After each chunk has been processed by the Viterbi algorithm, we compute the average of 1/ for the chunk and terminate early when this number drops below 0.01.x and y have a sequence identity above seqid_min and 0 otherwise. The SIMD version (Algorithm 6) has no branches and processes the amino acids in chunks of 16 (SSE2) or 32 (AVX2). It is about ∼11 times faster than the scalar version.To build a profile HMM from an MSA, HH-suite reduces the redundancy by filtering out sequences that have more than a fraction seqid_max of identical residues with another sequence in the MSA. The scalar version of the function (Algorithm 5) returns 1 if two sequences Typically more than 90% of the run time of HHsearch is spent in the Viterbi algorithm, while only a fraction of the time is spent in the maximum accuracy alignment. Only a small number of alignments reach an E-value low enough in the Viterbi algorithm to be processed further. HHsearch therefore profits considerably from the SIMD vectorization of the Viterbi algorithm.To compare the speed of the HHsearch versions, we randomly selected 1 644 sequences from Uniprot (release 2015_06), built profile HMMs, and measured the total run time for searching with the 1644 query HMMs through the PDB70 database (version 05Sep15). The PDB70 contains profile HMMs for a representative set of sequences from the PDB , filtereHHsearch with SSE2 is 3.2 times faster and HHsearch with AVX2 vectorization is 4.2 times faster than HHsearch 2.0.16, averaged over all 1644 searches  and HMMER3 (v3.1b2) with three iterations, using the 6616 sequences in the SCOP20 set as queries, against a database made up of the UniProt plus the SCOP20 sequence set. We searched with HHblits versions 2.0.16 and 3 with three iterations through a database consisting of the uniprot20 HMMs plus the 6616 UniProt profile HMMs annotated by SCOP domains.β-propellers (b.66-b.70), because they are probably true homologs [We defined a sequence match as true positive if query and matched sequence were from the same SCOP superfamily and as false positive if they were from different SCOP folds and ignore all others. We excluded the self-matches as well as matches between Rossman-like folds  and between the four- to eight-bladed We ran HHblits using hhblits -min_prefilter_hits 100 -n 1 -cpu $NCORES -ssm 0 -v 0 -wg and wrote checkpoint files after each iteration to restart the next iteration. We ran HMMER3 (v3.1b2) using hmmsearch –chkhmm -E 100000 and PSI-BLAST (2.2.31) using -evalue 10000 -num_descriptions 250000.The cumulative distribution over the 6616 queries of the sensitivity at the first false positive (AUC1) in Fig. We also compared the sensitivity of HHsearch 3 with and without scoring secondary structure similarity, because we slightly changed the weighting of the secondary structure score (Methods). We generated a profile HMM for each SCOP20 sequence using three search iterations with HHblits searches against the uniprot20 database of HMMs. We created the query set of profile HMMs by adding PSIPRED-based secondary structure predictions using the HH-suite script addss.pl, and we added structurally defined secondary structure states from DSSP  using adFigure We have accelerated the algorithms most critical for runtime used in the HH-suite, most importantly the Viterbi algorithm for local and global alignments, using SIMD vector instructions. We have also added thread parallelization with OpenMP and parallelization across servers with Message Passing Interface (MPI). These extensions make the HH-suite well suited for large-scale deep protein annotation of metagenomics and genomics datasets.Project name: HH-suitehttps://github.com/soedinglab/hh-suiteProject page: Operating systems: Linux, macOSProgramming languages: C++, Python utilitiesOther requirements: support for SSE2 or higherLicense: GPLv3


Bioinformatics methods are increasingly needed and used to analyze and interpret extensive datasets many of which are produced by diverse high-throughput technologies. Unfortunately, it is quite common that published articles do not contain sufficient information to allow the reader to fully comprehend and repeat computational and other studies. Guidelines were developed for reporting studies and results from sequence alignment. Brief and concise checklist of required data items was compiled making it easy to provide necessary details. Implementation of the guidelines requires similar meticulous attitude toward details as other parts of publications. If the journal does not allow reporting full details in the main article, it can be provided in  In many fields, experimental methods are used to produce huge amounts of data. Nucleic acid sequencing is a prime example—it is widely used throughout life science disciplines. To handle, store, share, and analyze this deluge of data numerous bioinformatics tools are required. The large body of recent medical and biological literature relies at least partly on computational analyses. It is apparent that all authors of these articles are not fully aware how to describe analyses and experiments performed on computers. This seems to apply to articles written both by bioinformaticians and others. The common rules for scientific literature apply also to these methods. However, it is quite common that the computational studies and experiments are not described in sufficient detail. There are several reasons for this, including space limitations in many journals, practices of replacing details by statements like “as previously described,” ignorance of the best practices and most importantly, lack of awareness of what is relevant.https://www.force11.org/group/fairgroup/fairprinciples) and further global and open . As scientists and clinicians, we should not “buy a pig in a poke,” i.e. demand all necessary details also when analyses are performed at commercial laboratories [Reporting of methods and results and their discussion has a number of functions in scientific literature. First, novel observations and interpretations are presented. Second, studies should contain detailed enough descriptions so that others could repeat them. Although this is the basic requirement for all kinds of reports, it is quite often neglected, at least partly. Problems with reproducibility of science have been raised in several fields. Results even in many prominent journals been irreproducible , 2. Thirratories .Problems with reproducibility in computational studies have been discussed , 6 alonghttps://fairsharing.org/). Some of them are widely used, especially when demanded by journals, as in the case of Minimum Information About a Microarray Experiment (https://fairsharing.org/FAIRsharing.32b10v) [https://fairsharing.org/FAIRsharing.28yec8) [To facilitate reproducibility, minimum information standards and criteria have been developed for reporting data from several types of experiments and distributed mainly in Fairsharing  (see htt.28yec8)  providesMethods and results of bioinformatics studies are often inadequately described and documented in publications leaving readers wondering about important details and not being able to capture the message and reasoning of the authors. Since systematic guidelines have been missing for reporting sequence alignment studies, brief and concise checklist of required data items was produced. These rules are simple to follow and apply. It just requires the same attention to details as any other method used in research . If the The guidelines and the relations of the items are depicted in ), or protein sequences to other protein sequences. Additional combinations include ribonucleic acid and DNA sequences.Sequence alignment is a very widely used research method, since many different types of information can be obtained e.g. for interpretation of experimental results, about conserved and co-evolutionary sites, regions, motifs and domains and to help in diverse prediction tasks such as detection of homologs, protein secondary structural elements, functional characterization, variant interpretation including pathogenicity, etc. Alignment methods are instrumental also for evolutionary studies and protein homology modeling. The purpose of the alignment has to be mentioned as the analysis protocol may differ for different applications, e.g. whether one compares deoxyribonucleic acid (DNA) sequences to DNA sequences or against protein sequences  have to be provided. Further necessary details contain whether the alignment is for two or multiple sequences.The choice of the sequences has to be carefully justified. Why were the included sequences chosen and why others were left out? These choices may have a significant impact on the obtained results. The data are important also if someone wants to repeat the analysis when new sequences become available to be able to apply the same criteria.The used sequences have to be properly documented, and unless Locus Reference Genomic (LRG) reference sequences  are usedThe program used for the alignment and its version has to be provided. Published methods have to be cited with proper reference and unpublished ones shared. In addition, mention the source (e.g. Uniform Resource Locator) of the software. If any changes are made to algorithms, scripts have to be published and shared, preferably in public repositories like GitHub.A substitution matrix is the central component for all sequence alignment programs and can affect the obtained results, thus details are needed. If any modifications have been made to published matrix, those have to be described. Provide a reference to the used matrix.It is mandatory to list all parameters and values used. Otherwise, the study is not reproducible. Justify the choice of the parameter values. Mentioning the default parameters is not sufficient, since they may vary between program versions and implementations.Sometimes it is necessary to make deviations and manual changes from standard procedures. When utilized, the changes have to be described in detail. Furthermore, these modifications have to be justified.In general, manual interventions should be avoided since they are error-prone and difficult or impossible to reproduce e.g. with new data.Quality indicators of the alignment have to be provided with adequate measures based on statistical analysis. Details depend on the used algorithm and on what it provides. In addition to similarity and/or identity score(s), an important aspect of the quality is the length of the alignment.The quality measures will allow readers to evaluate the reliability of conclusions and claims made in the paper along with the actual alignment.A consensus sequence is an essential information for some alignment applications. It can be included to the alignment figure, usually on top or bottom of the aligned entries. Notation of the used symbols and e.g. the threshold for similarity has to be provided.The alignment should be made available either in the article or in its Bioinformatics methods are increasingly needed and used to analyze and interpret extensive datasets, many of which are produced by diverse high-throughput technologies. Sequence alignments are popular and can reveal many details. Unfortunately, it is quite common that publications do not contain sufficient information. Guidelines were developed for reporting studies and results from sequence alignments. When reporting and interpreting alignments, authors have to consider the limitations also of their tools. Thus, authors have to know the quality of the data as computational predictions will be useless if the starting point is wrong or severely biased. Therefore, the choice of aligned sequences is important. They should be of high quality, preferably established reference sequences. Misinterpretations of bioinformatics results are common, the most common problem being too far-reaching conclusions based on data with weak support. Proper reporting of the studies will allow readers to pick such cases if peer review has failed in detecting the deficiencies.Another frequent problem is that alignment results are often reported with the wrong terminology. For example, sequences are often erroneously claimed to be homologous. Sequence similarities mean homology only when the sequences have an evolutionary ancestor. For systematic homology-related terminology, there is ontology . By usinbpaa001_Supplementary_DataClick here for additional data file.


Porcine reproductive and respiratory syndrome (PRRS) is a major threat to the swine industry. It is caused by the PRRS virus (PRRSV). Determination and comparison of the nucleotide sequences of PRRSV strains provides useful information in support of control initiatives or epidemiological studies on transmission patterns. The alignment of sequences is the first step in analyzing sequence data, with multiple algorithms being available, but little is known on the impact of this methodological choice. Here, a study was conducted to evaluate the impact of different alignment algorithms on the resulting aligned sequence dataset and on practical issues when applied to a large field database of PRRSV open reading frame (ORF) 5 sequences collected in Quebec, Canada, from 2010 to 2014. Five multiple sequence alignment programs were compared: Clustal W, Clustal Omega, Muscle, T-Coffee and MAFFT.The resulting alignments showed very similar results in terms of average pairwise genetic similarity, proportion of pairwise comparisons having ≥97.5% genetic similarity and sum of pairs (SP) score, except for T-Coffee where increased length of aligned datasets as well as limitation to handle large datasets were observed.Based on efficiency at minimizing the number of gaps in different dataset sizes with default open gap values as well as the capability to handle a large number of sequences in a timely manner, the use of Clustal Omega might be recommended for the management of PRRSV extensive database for both research and surveillance purposes. Porcine reproductive and respiratory syndrome virus (PRRSV) infection has a major economic impact on the swine production with annual cost estimated at $664 M for the US industry . The virThe alignment of sequences is a prerequisite for the estimation of genetic distances between pairs of sequences. Several algorithms to align sequences are available but they differ in terms of computing approaches. Dynamic programming is an exact method evaluating each possible alignment to determine the best solution. Unfortunately, it is too cumbersome to be run for more than a few sequences. Thus, heuristic methods, progressive or iterative, are preferably used to manage large sequence databases; they progressively incorporate pairwise alignments into multiple alignment which considerably decrease computing time . Also, gFor most algorithms, the alignment process generally arranges gene sequences one over the other to maximize identical matches of nucleotides between sequences . GeneralEven if preliminary evaluation of several alignment algorithms or gap penalty settings on biological datasets is often suggested, this is rarely done, and studies on PRRSV are not an exception –15. In fThis study was conducted to evaluate the impact of the alignment algorithm on the resulting aligned sequence dataset as well as on practical issues such as the capability to handle large dataset in a timely manner when applied to a large database of PRRSV ORF5 sequences used for molecular-based epidemiological studies and surveillance program.n = 2383), with the exception of one 606 base pair (bp) sequence, were used for the evaluation of alignment algorithms. This latter sequence was removed to ensure a balance of sequence length  in further replicates.The PRRSV ORF5 sequence database of the Laboratoire d’épidémiologie et de médecine porcine (LEMP) of the Université de Montréal was used for the study. This database comprises sequences from field samples submitted by veterinarians to different laboratories on a voluntary basis as part of their herd surveillance or control programs. Since January 2010, a sharing agreement with 97% of all Quebec swine veterinarians have ensured that all PRRSV ORF5 sequences obtained from their field submissions to the veterinary diagnostic laboratory of the Université de Montréal or to two other private laboratories were automatically transferred to the LEMP. All sequences gathered between January 1st 2010 and December 31st 2014 inclusively  with different extraction kits according to manufacturer’s instructions. RT-PCR was performed using Qiagen OneStep RT-PCR Kit using various primers. Prior to ORF5 sequencing, purification of PCR products was done using EZNA Cycle Pure Kit . Afterwards, both strands of PCR amplicons were sequenced using the same RT-PCR primers with BigDye terminator on ABI Genetic analyzer . The remaining sequences were obtained from private diagnostic laboratories which have used their routine protocols.p-value using a Bonferroni correction for multiple testing were considered as significant recombinants.Detection of recombinant sequences was carried out by doing an exploratory scan for mosaic signals using default detection methods implemented into Recombination Detection Program (RDP) version 4.76 . PrimaryConsidering that a high level of similarity was expected over the entire ORF5 gene and that the overall objective was to manage a large PRRSV sequence database, only global multiple sequence alignment methods available in freeware were considered for selection. Five algorithms were selected considering their accuracy and popularity: Clustal W v.2.1 , Clustalhttps://mafft.cbrc.jp/alignment/software/manual/manual.html). Needleman-Wunsch algorithm computed pairwise alignments  in combination with a maximum of 1000 cycles of iterative refinement or convergence of scoring alignment (option maxiterate = 1000). Default values were attributed to other parameters except for the open gap penalty value.When possible, options were set to obtain the maximal accuracy reachable by the algorithms according to the user manual provided by their authors. For Clustal W, sequences were aligned in pairs using dynamic programming to generate a DNA weight matrix using International Union of Biochemistry (IUB) scoring matrix (used in BESTFIT). Scores were then converted into distances and used to build a neighbor-joining guide tree (option Clustering = NJ). Iteration refinements were performed throughout the progressive approach (option Iteration = Tree). Default settings were used for Clustal Omega except for the use of full distance matrix in guide-tree calculation and iteration. Default settings were used in Muscle and T-Coffee. For MAFFT, G-INS-I was chosen based on highest accuracy and suitability for the study of sequences having similar lengths  were randomly selected without replacement to form replicates of different sizes: ten replicates of 238 sequences, five replicates of 476, two replicates of 1191 and one including all 2383 sequences. For each algorithm and replicate, alignment was attempted for 11 different open gap penalty values i.e. from baseline to upper limit by equal increment. The open gap penalty values were the following: Clustal W (0 to 100 by 10), MAFFT (0 to 10 by 1), Muscle (0 to − 1000 by − 100) and T-Coffee (0 to − 1000 by − 100). The impact of gap penalty value was evaluated according to three criteria: average pairwise genetic similarity, proportion of pairwise comparisons having ≥97.5% genetic similarity  on a Dell Precision T7610 workstation with 10 Intel Xeon Processor E5–2670 @ 2.5 GHz, 128 GB of RAM (DDR3) and a 2 TB HD. All computer resources were solely attributed to the alignment process.To compare performances of the five algorithms, two replicates of 1191 sequences were created from the dataset. A stratified random selection was used for sequence allocation to each replicate to ensure a similar proportion of sequences with 600 and 603 bp as well as recombinant sequences in each replicate.The average pairwise genetic similarity, the proportion of pairwise comparisons having ≥97.5% genetic similarity and the length of final aligned dataset were computed for the two replicates for each algorithm using either SAS version 9.3 software  or scripts written in Python. Characteristics of gap insertions, i.e. if they were introduced in singleton or triplets, were noted for each aligned dataset.Two additional criteria were evaluated: the sum of pairs (SP) score and the percentage of congruent cells having ≥97.5% similarity. SP-score is a measure of accuracy defined as the proportion of shared homologies by estimated and reference alignments over the total number of homologies in the reference alignment [22]. Since the reference alignment was unknown in the current study, alignment from each algorithm was by turns considered as the reference, and the SP-score was used as a measure of agreement between algorithms. SP-score was computed using FastSP, an open-source executable written in Java available online . The perFour technical criteria were also used to compare performance of algorithms, i.e. handling capability of large dataset, rapidity, multi-platform availability and management of IUB ambiguity symbol characters . The first two criteria were evaluated for 10 replicates of 238 sequences, 5 of 476, 2 of 1191 and 1 of 2383. Results were averaged over replicates. Data were analyzed in SAS.n = 1183).All analyses described for the analytical criteria assessment were reconducted to evaluate the impact of recombinant sequences using the same two replicates of 1191 sequences, but without detected recombinants  in each replicate (n = 1191) formed to investigate analytical criteria, one 603 bp recombinant sequence was excluded. The evaluation of the analytical criteria revealed a high and very similar average pairwise genetic similarity across all algorithms and replicates, ranging from 88.28 to 88.84% (Table n = 3) on 600 bp sequences to integrate them with the 603 bp sequences in the final alignment, MAFFT introduced 3 to 6 gaps and T-Coffee, 7 to 9 gaps depending on replicates. For Clustal W, Clustal Omega, MAFFT and Muscle algorithms, all gaps were introduced as triplets, representing the code frame shift. Most gaps (> 98%) introduced by T-Coffee were singletons. Based on the SP-score, more than 99.7% of all pair homologies were shared between each combination of two algorithms, with T-Coffee showing a slightly higher disagreement with all other algorithms. A similar finding was observed for the proportion of congruent cells (≥99.86%).A total of 17 recombinant sequences were identified within 12 distinct recombination events. In order to allow even number of recombinants  and sequence length  reflecting viral population field studies as opposed to benchmark datasets such as BAliBASE , 18. A pn = 238 or 476) had a negligible effect for Clustal W and Muscle, and practically no effect for MAFFT and T-Coffee.The sensitivity analysis on open gap values revealed differences in gap management for the algorithms evaluated. In the study, the gap value parameter was optimized to minimize the number of introduced gaps. This decision seemed biologically sound since the aligned sequences were from one gene with no non-coding DNA, and that fewer gap insertions usually gives better alignment accuracy . GloballFor PRRSV field investigations and molecular epidemiology studies, a pairwise genetic similarity threshold e.g. ≥97.5%) is often used to determine whether two herds have similar strains % is ofte. ResultsPRRSV usually evolves through punctual mutations, but recombination events are also a part of the virus evolution –34. The Finally, technical aspects showed major differences in speed and capability of handling large datasets. Since runtimes vary according to genetic diversity observed in datasets, number and length of sequences, as well as processor and memory allowed for computing alignments, results obtained from different studies are not directly comparable. Considering the current datasets, algorithm settings and computational resources, the ability to timely align large sequence datasets (2383 sequences) by Clustal Omega, MAFFT and Muscle is a significant advantage.The different algorithms compared for the analysis of a PRRSV ORF5 sequence dataset provided very similar alignments, but differed in their ability to handle large datasets. Results from most algorithms were not affected by the presence of recombinants detected in our field database. Our study also revealed that prior investigations to set open gap parameter are advisable, especially when used on more than 1000 sequences. Muscle and Clustal W inserted many gaps when the open gap parameter was left at default or near zero values. Based on the efficiency at minimizing the number of gaps on different dataset sizes with default open gap value, the congruency of several analytical criteria with other algorithms as well as the capability to handle a large number of sequences in a timely manner, Clustal Omega might be warranted to manage large PRRSV database for both research and ongoing disease surveillance purposes.