A fundamental assumption of all widely-used multiple sequence alignment techniques is that the left- and right-most positions of the input sequences are relevant to the alignment. However, the position where a sequence starts or ends can be totally arbitrary due to a number of reasons: arbitrariness in the linearisation (sequencing) of a circular molecular structure; or inconsistencies introduced into sequence databases due to different linearisation standards. These scenarios are relevant, for instance, in the process of multiple sequence alignment of mitochondrial DNA, viroid, viral or other genomes, which have a circular molecular structure. A solution for these inconsistencies would be to identify a suitable rotation (cyclic shift) for each sequence; these refined sequences may in turn lead to improved multiple sequence alignments using the preferred multiple sequence alignment program.We present MARS, a new heuristic method for improving Multiple circular sequence Alignment using Refined Sequences. MARS was implemented in the C++ programming language as a program to compute the rotations (cyclic shifts) required to best align a set of input sequences. Experimental results, using real and synthetic data, show that MARS improves the alignments, with respect to standard genetic measures and the inferred maximum-likelihood-based phylogenies, and outperforms state-of-the-art methods both in terms of accuracy and efficiency. Our results show, among others, that the average pairwise distance in the multiple sequence alignment of a dataset of widely-studied mitochondrial DNA sequences is reduced by around 5% when MARS is applied before a multiple sequence alignment is performed.any multiple sequence alignment program, to address this problem effectively and efficiently.Analysing multiple sequences simultaneously is fundamental in biological research and multiple sequence alignment has been found to be a popular method for this task. Conventional alignment techniques cannot be used effectively when the position where sequences start is arbitrary. We present here a method, which can be used in conjunction with  Agglomerative hierarchical clustering is then used on all values M.e, to find sufficiently good rotations for each sequence cluster. The second method presented is suitable for more divergent sequences. An algorithm for fixed-length approximate string matching is applied to every pair of sequences to find most similar factors of fixed length. These factors can then determine suitable rotations for all input sequences via the same method of agglomerative hierarchical clustering.BEAR  is anothOur contributions. We design and implement MARS, a new heuristic method for improving Multiple circular sequence Alignment using Refined Sequences. MARS is based on a non-trivial coupling of a state-of-the-art pairwise circular sequence comparison algorithm [lgorithm  with thelgorithm . Experimstring (or sequence) x of lengthm as an array x[0.. m−1] where every x[i], 0≤i<m, is a letter drawn from some fixed alphabetΣ of size |Σ|=O(1). String ε denotes the empty string which has length 0. Given string y, a string x is considered a factor of y if there exist two strings u and v, such that y=uxv. Consider the strings x,y,u, and v, such that y=uxv. We call x a prefix of y if u=ε; we call x a suffix of y if v=ε. When x is a factor of y, we say that xoccurs in y. Each occurrence of x can be denoted by a position in y. We say that x occurs at the starting positioni in y when y[ i.. i+m−1]=x; alternatively we may refer to the ending positioni+m−1 of x in y.We begin with a few definitions, following , to allom may be informally defined as a standard linear string where the first- and last-occurring letters are wrapped around and positioned next to each other. Considering this definition, the same circular string can be seen as m different linear strings, which would all be considered equivalent. Given a string x of length m, we denote by xi=x[i.. m−1]x[0.. i−1], 0<i<m, the ith rotation of x and x0=x. By looking at the string x=x0=baababac; this string has the following rotations: x1=aababacb, x2=ababacba, x3=babacbaa, etc.A circular string of length x of length m and a string y of length n, the edit distance  denotes the total number of occurrences of q-gram v∈Σq in x.A x of length m and y of length n≥m and an integer q>0, the q-gram distanceDq is defined as: Given strings β≥1, a generalisation of the q-gram distance can be defined by partitioning x and y in βblocks as evenly as possible, and computing the q-gram distance between each pair of blocks, one from x and one from y. The rationale is to enforce locality in the resulting overall distance , for all 0≤i<d, denotes the set of rotated sequences, which are then input into the preferred MSA algorithm to obtain an improved alignment. MARS is based on a three-stage heuristic approach: d×d matrix M holding two values e and r per cell, is computed; where M.e holds the edit distance between sequences sj. Intuitively, we try to compute the value r that minimises e, that is, the cyclic edit distance.Initially a guide tree.The neighbour-joining clustering method is carried out on the computed distances to produce a Finally, progressive sequence alignment using refined sequences is carried out using the sequence ordering in the guide tree.We present MARS; a heuristic algorithm for improving MCSA using refined sequences. For a set of β-blockwise q-gram distance between two circular sequences x and y is computed. Specifically, the algorithm finds the rotation r of x such that the β-blockwise q-gram distance between xr and y is minimal.In this stage, we make use of a heuristic method for computing the cyclic edit distance between two strings. This method is based on Grossi et al’s alignment-free algorithm  for circr. An input parameter xr and y, where m is the length of xr. The first refined sequence is P out of β blocks) of string xr; $∉Σ; and P out of β blocks) of string xr. The same is done for string y, resulting in a refined sequence of the same form y0y1y2. Note that large values for P would result in long sequences, improving the refinement of the rotation, but slowing down the computation. A score is calculated for all rotations of these two smaller sequences using Needleman-Wunsch :=M.r and R[j]:=0, as the second sequence is left unrotated.For Case 1, where only two sequences are to be aligned, note that rotation M provides a reference as to which rotation r is required. In the case of a sequence and a profile (Case 2), this may also indirectly be used as we explain below.The remaining two cases of alignments are a generalisation of the pairwise circular sequence alignment to profiles. In the alignment of a pair of sequences, matrix si and sj are aligned, one sequence sj remains unrotated. This pair then becomes a profile which we will call profile A. Given the same occurs for another pair of sequences, profile B is created also with one unrotated sequence, profile A is aligned with profile B, another profile, profile C is created. In this case, only the sequences in profile B are rotated to be aligned with profile A. This results in sj to be left unrotated in profile C where sj previously occurred in profile A. Given a sequence sk to be aligned with profile C, this sequence has a current rotation of 0 as has not yet been aligned with another sequence or a profile. We can identify which rotation is needed to rotate sequence sk to be aligned with profile C, by using the single rotation M.r.As previously seen, when two sequences profile B will need to be rotated to be aligned with profile A. However, once a single sequence sj in profile A as well as a single sequence profile B with r=0 have been identified, in this case M.r will no longer be an accurate rotation. By counting the total number g of individual gaps inserted in M.r of profile B would be M.r+g.The same condition applies when aligning two profiles (Case 3). All sequences in Consider the following sequences:s0: TAGTAGCTs1: AAGTAAGCTAs2: AAGCCTTTAGTs3: AAGTAAGCTs4: TTAATATAGCCprofile A be:Let s0: A-G-C--TTA-GTs1: AAG-C--TAAAGTs2: AAGCC-TTTA-GTprofile B be:Let s3: A---AGTAAG-C--Ts4: A-ATA-TA-GCC-TTProfile C:s0: A-G-C--TT-A--GTs1: AAG-C--TA-A-AGTs2: AAGCC-TTT-A--GTs3: AAG-C--TA---AGTs4: A-GCC-TTA-ATA-Ts2 in profile A and s3 in profile B have a rotation of 0. The other sequences have been rotated and aligned with the remaining sequences in their profile. It is also clear from the original sequences that M.r=4. When aligning profile B with profile A, the rotation of r=4 is no longer accurate due to gaps inserted in s3. As g=3 gaps have been inserted between positions 0 and r of sequence s3, the final accurate rotation for profile B is M.r+g=4+3=7 (see profile C). □By looking at the original set of sequences, it is clear Profile A will always hold the largest number of sequences, allowing profile B with fewer sequences to be rotated.In the instance when a sequence is to be aligned with a profile or two profiles are to be aligned, a generalisation of the Needleman-Wunsch algorithm is used, similar to that by , to compF is stored, which holds the frequency of the occurrence of each letter in each column in profile A. Equation S holds the alignment score for column i in profile A and column j in profile B. gA is the cost of inserting a gap into profile A and gB likewise for profile B. Matrix S is initialised in the same way as in the Needleman-Wunsch algorithm; and sim denotes the similarity score between letter c∈Σ′ and the letter at column j of row k (representing sequence sk) in profile B. A frequency matrix profile A and every rotation of profile B to find the maximum score, equating to the best-aligned rotation. However, as information about rotations has already been computed in Stage 1, we may use only some part of profile B to further refine these rotations. This refinement is required due to the heuristic computation of all pairwise cyclic edit distances in Stage 1 of the algorithm. To this end, we generalise the second step of Stage 1 to profiles. This step of Stage 1 involves a refinement of the rotation for a pair of sequences via considering only the two ends of each sequence, to create two refined sequences. Similarly here we generalise this idea to refine the rotation for a pair of profiles via considering only the two ends of each profile, to recreate the profiles into profiles with refined sequences. The rotation r with the maximum score according to the aforementioned scoring scheme is identified as the best-aligned rotation and array R is updated by adding r to the current rotation in R[i], for all si in profile B.This scoring scheme can be applied naïvely for d sequences in multiFASTA format, the length ℓ of the β blocks to be used, the length q of the q-grams, and a real number P for the refinement, MARS computes an array R according to the algorithm described in the “d refined sequences, produced using the rotations computed in R. The output of MARS can then be used as input to the preferred MSA program, such as ClustalΩ, MUSCLE, or T-Coffee.MARS was implemented in the C++ programming language as a program to compute the rotations (cyclic shifts) required to best align a set of input sequences. Given a set of http://github.com/lorrainea/mars. Experimental results were also produced for Cyclope and BEAR to compare their performance against MARS. The experiments were conducted on a computer using an Intel Core i5-4690 CPU at 3.50 GHz under GNU/Linux. All programs were compiled with g++ version 4.8.5 at optimisation level 3 (O3).The implementation is distributed under the GNU General Public License (GPL), and it is available freely at DNA datasets were simulated using INDELible , which pNine datasets were simulated to evaluate the accuracy of the proposed method. Each dataset consists of a file with a varying number of sequences, all with an average length of 2500 base pairs (bp). The files in Datasets 1−3 each contain 12 sequences. Those in Datasets 4−6 each contain 25 sequences; and Datasets 7−9 contain 50 sequences. All input datasets referred to in this section are publicly maintained at the MARS website.q=5, ℓ=50, and P=1.0. Table Ω. All sequences in these datasets were then randomly rotated, denoted in Table Ω. The third and fourth columns show likewise using MUSCLE to align the sequences. Tables For all datasets, we made use of the following values for the mandatory parameters of MARS: To evaluate the accuracy of MARS seven standard genetic measures were used: the length of the MSA; the number of polymorphic sites (PM sites); the number of transitions and transversions; substitutions, insertions, and deletions were also counted; as well as the average distance between each pair of sequences in the dataset (AVPD).same MSA program.The use of standard genetic measures to test the accuracy of MARS with synthetic data is sufficient. This is due to the fact that the main purpose of this test is not to check whether we obtain an MSA that is biologically relevant. The ultimate task here was to show that when MARS is applied on the A.B.C.rot datasets before MSA is performed we obtain MSAs whose standard genetic measures are similar or even identical to the MSAs of the A.B.C datasets (and this cannot occur by chance) when using the identical or less average pairwise distance in 8 out of 9 cases between the original and the refined datasets produced by using MARS, despite the fact that we had first randomly rotated all sequences (compare the A.B.C to the A.B.C.rot columns).The results show indeed that MARS performs extremely well for all datasets. This can be seen through the high similarity between the measurements for the original and the refined datasets. Notice that, in particular with MUSCLE, we obtain an q=5, ℓ=50, and P=1.0. The fixed-length approximate string matching method with parameter values w=40 and k=25 under the edit distance model, were used for BEAR, where w is the factor length used and k is the maximum distance allowed. Parameter v was used for Cyclope to compute, similar to MARS, a tree-guided alignment.RAxML , a maximrelative RF distance between the original datasets and those refined with MARS is 0 in all cases, showing that MARS has been able to identify the best-aligned rotations, with respect to the inferred trees, for all nine datasets, outperforming BEAR and Cyclope, for which we obtain non-zero values in some cases.Table In this section we present the results for three datasets used to evaluate the effectiveness of MARS with real data. The first dataset  includes 12 mtDNA sequences of mammals, the second dataset (Primates) includes 16 mtDNA sequences of primates, and the last one (Viroids) includes 18 viroid RNA sequences. All input datasets referred to in this section are publicly maintained at the MARS website. The average sequence length for Mammals is 16,777 bp, for Primates is 16,581 bp, and for Viroids is 363 bp.Table h=100 and k=60 were used to measure accuracy for the Mammals and Primates datasets for BEAR; w=40 and k=25 were used for the Viroids dataset. Parameter v was used for Cyclope to compute a tree-guided alignment. The following parameter values were used to test the Mammals and Primates datasets for MARS: q=5, ℓ=100, and P=2.0; q=4, ℓ=25, and P=1.0 were used to test the Viroids dataset.Since time-accuracy is a standard trade-off of heuristic methods, in order to evaluate the time performance of the programs, we compared the resulting MSA along with the time taken to produce it using BEAR, Cyclope, and MARS with MUSCLE. Parameter values Table Ω to align the output sequences, with a TCS of 249 for the unrotated dataset. The following scores were computed for the rotated dataset in the respective order: 233, 244, and 269. These results show that when using two different MSA programs, MARS obtains a higher TCS than the unrotated dataset in both cases, outperforming BEAR and Cyclope, which do not always obtain a higher TCS compared to that of the unrotated dataset.A common reliability measure of MSAs is the computation of the transitive consistency score (TCS) . The TCSA fundamental assumption of all widely-used MSA techniques is that the left- and right-most positions of the input sequences are relevant to the alignment. This is not always the case in the process of MSA of mtDNA, viroid, viral or other genomes, which have a circular molecular structure.We presented MARS, a new heuristic method for improving Multiple circular sequence Alignment using Refined Sequences. Experimental results, using real and synthetic data, show that MARS improves the alignments, with respect to standard genetic measures and the inferred maximum-likelihood-based phylogenies, and outperforms state-of-the-art methods both in terms of accuracy and efficiency. We anticipate that further development of MARS would be desirable upon dissemination. Our immediate target is to employ low-level code optimisation and thread-level parallelism to further enhance the performance of MARS. A web-service for improving multiple circular sequence alignment based on MARS is already under way.Project name:MARSProject home page:https://github.com/lorrainea/marsOperating system: GNU/Linux Programming language:C++Other requirements: N/A License: GNU GPL


The read length of single-molecule DNA sequencers is reaching 1 Mb. Popular alignment software tools widely used for analyzing such long reads often take advantage of single-instruction multiple-data (SIMD) operations to accelerate calculation of dynamic programming (DP) matrices in the Smith–Waterman–Gotoh (SWG) algorithm with a fixed alignment start position at the origin. Nonetheless, 16-bit or 32-bit integers are necessary for storing the values in a DP matrix when sequences to be aligned are long; this situation hampers the use of the full SIMD width of modern processors.We proposed a faster semi-global alignment algorithm, “difference recurrence relations,” that runs more rapidly than the state-of-the-art algorithm by a factor of 2.1. Instead of calculating and storing all the values in a DP matrix directly, our algorithm computes and stores mainly the differences between the values of adjacent cells in the matrix. Although the SWG algorithm and our algorithm can output exactly the same result, our algorithm mainly involves 8-bit integer operations, enabling us to exploit the full width of SIMD operations  on modern processors. We also developed a library, libgaba, so that developers can easily integrate our algorithm into alignment programs.https://github.com/ocxtal/libgaba.Our novel algorithm and optimized library implementation will facilitate accelerating nucleotide long-read analysis algorithms that use pairwise alignment stages. The library is implemented in the C programming language and available at The online version of this article (10.1186/s12859-018-2014-8) contains supplementary material, which is available to authorized users. Then, the recurrences can be expressed as in Eq. i≥1 and j≥1). Note that the right-hand sides of the recurrences keep symmetry with respect to the two coordinates, i and j, as those in the original SWG algorithm do. The complete process of derivation of the difference recurrences is described in Additional file With these four difference matrices, the recurrences for the original semi-global alignment can be transformed into those in difference form. To simplify the recurrences, we introduce intermediate variable i,j]−S i−,j−1. Thei=0 and the row j=0) will be shown shortly. The differences from − inf are clipped to ΔE and ΔF, respectively, without a loss of generality. This clipping makes it easier to compute the values of cells using a small integer type such as 8-bit integer, while this clipping does not cause a gap-penalization error at the edges as pointed out by Rognes  in this paper is equivalent to Vj[ i] in the bit-parallel LCS algorithm authored by Hyyrö  from every cell in the block. L[ k] is a single 64-bit integer stored in memory. After subtraction, the values in the DP matrices can be represented as signed 16-bit integers. We then noticed that the values in the same lane of a block tend to be more similar than values in distant lanes  because the values of cells tend to be somewhat greater toward the center of the vectors. To further reduce the number of bits required for storing values of cells, we subtracted the D[ q] constant (as well as L[ k]) from the cells in the qth lane.Figure 3L[ k]), a constant 16-bit signed integer we call a middle delta (D[ q]), and an 8-bit signed integer that we call a small delta . The absolute value of a cell is the sum of the three values. The small delta values are calculated on every vector update . The maximum values for the small deltas in all the lanes of a block are updated using a SIMD operation. The vector of small deltas represented as a vector of 8-bit integers may overflow with a certain substitution matrix containing large values, but it will not overflow when M is relatively small, which is the assumption. We cannot explicitly show how small M should be because the algorithm is too complex for rigorous analysis, but we did not see any problems with the combination of parameters typical for the existing long-read aligners.In all, we decompose a value of a cell into three values: a 64-bit integer that represents a potentially large offset  as shown below. Term |q−W/2| represents the distance from the center of the band. Coefficient q−W/2|∗128/W into the middle delta to decrease overflow errors, which are often caused by a reduced gradient due to a low-identity region. The initial conditions for the three variables are defined across the d and dmax; we compared the difference of the two values (the amount of the drop) with threshold X. The large offset is calculated immediately after the last vector of each block becomes available, after which the values in the small-delta vector are shifted accordingly. In the current implementation, the large offset is the average of W/4th and 3W/4th values in the last vector of a previous block. The large offset, the last small-delta vector, and the maximal small-delta vector are stored for later use in the traceback. All the other small-delta vectors are recalculated on demand in the traceback phase to reduce memory use.A variant of the X-drop algorithm is implemented using two variables, S in Eq. A bonus for combining the difference recurrence relations with the adaptive band algorithm is that this approach eliminates the dependence on the second previous vector  to the corresponding cell. MH is set iff a horizontal transition is possible from S to E, and ME is set iff a horizontal transition is possible from E to E. The other two vectors for vertical transitions are defined similarly. The four sets of vectors, MH, MV, ME, and MF, are calculated simultaneously as the DP matrices are being filled. For reasons we will describe shortly, we decided to prefer vertical transitions over horizontal transitions when both transitions are possible. In addition, the diagonal transition is chosen only when both the vertical and horizontal transitions are impossible. Figure 3The final part necessary for finishing the complete pairwise alignment is to generate an alignment path string (a.k.a. an edit path). We introduce another data structure, traceback flags, which are sets of four 32-bit-wide bit vectors that we denote by We encoded the alignment path in a series of bits. A single bit of “1” represents the vertical transition, “0” the horizontal transition, and “10” the diagonal transition. The final alignment path string is a concatenation of the encoded transitions. You might think that it is impossible to tell “10” from “1” followed by “0”; however, the transition priority we mentioned above enabled us to uniquely determine which interpretation is correct when we read the final alignment path string either from left to right or from right to left. This path string encoding ensures high memory efficiency while retaining several preferable properties: (1) the alignment path string is obtained by concatenating the bit-encoded strings, and (2) the length of any part of the alignment path string of an alignment is the sum of the lengths of the aligned part of one of the aligned sequences and that for the other sequence. That is, the length of the alignment path is calculated from the lengths of the two sequences to be aligned. These properties enable more efficient implementations of several higher-layer algorithms such as breakpoint correction in a split-read alignment. A bonus of this approach is that the traceback implementation can be performed by means of logical operations so that it can reduce the number of branches as compared to a naïve implementation of the SWG algorithm or semi-global alignment algorithm  bit in a register, which is called “trailing (leading) zero count.” The trailing zero count instruction calculates the length of the deletion block in a single instruction. Determining the length of a region of diagonal transitions only is also possible for the trailing zero count instruction with some trick; taking bitwise XOR with repeated “10” bits, or 0xAAAA...AA, reduces the problem to simple bit counting.Retrieval of scores from the substitution matrix, or calculation of the score profile vector, can be performed in parallel using the 16-element vector shuffle operation as described by Suzuki and Kasahara , but we 2We describe miscellaneous implementation techniques that exploit common features of modern CPUs. We believe the techniques are applicable to the processors, though, we mainly adopt the x86_64 architectures in the explanation because we only provided implementations for them . Further portability issues that come with the techniques are not discussed here, but discussed in Additional file The fill-in and traceback algorithms have small loops that are executed a huge number of times. Therefore, optimization of the register use in the intensive loops is expected to improve the overall calculation performance. Here, we carefully tuned the implementation to make the number of register spill-reload pairs as small as possible and the number of concurrently executable instructions as large as possible (the latter can be accomplished by relaxing a chain of result-to-source register dependences).ΔHG instead of ΔHG using the commutativity of addition, i.e., AG+(−ΔHG) is calculated instead of AG−ΔHG; this approach reduces computation time slightly.The matrix calculation loop of a 32-cell-wide band requires four 32-byte vectors for the four difference variables and a pair of 32-byte vectors for the small delta and maximal small delta variables. These vectors are mapped to a set of twelve 128-bit-wide or six 256-bit-wide SIMD registers. Given that the SSE instruction sets of x86_64 processors give us only sixteen 128-bit-wide registers, we had to implement the fill-in loop carefully to make sure that the number of temporary registers required at the same time does not exceed 4. For this reason, the query sequence buffers were allocated in memory, and the unaligned load operation was adopted to imitate elementwise shift operations on the vectors. The order of several operations from the naïve implementation was reassigned  were moved from the general-purpose registers to SIMD registers. This modification eliminated the register spill/reload pairs almost completely from the innermost loop.Modern processors have speculative branch selection and instruction execution mechanisms, called branch prediction. A failure in the branch prediction causes a fairly large execution path recovery penalty . ConseqWith regards to the fill-in loop, we noticed as a result of observation that the two advancing directions, rightward and downward, repeat alternately in most cases, especially during alignment of high-identity sequence pairs. We unrolled the matrix fill-in loop into 4 blocks, assigning downward direction to the odd ones and rightward to the even ones. This composition eliminates internal branching execution paths for each block and enables efficient streaming instruction execution without control transfer to distant addresses. Rare patterns—two or more contiguous right (or down) advances—are handled by skipping the middle downward-advancing (or rightward-advancing) blocks. Because the longer contiguous identical directions occur more rarely, the 4-fold unrolled loop successfully avoids the pollution of the prediction states due to double or triple contiguous identical directions that sometimes occur between normal zigzag patterns.The traceback loop was unrolled into three blocks in accordance with the traceback directions—diagonal, vertical, and horizontal—to assign a dedicated prediction state to each inter- and intrablock transition. It was effective at keeping branch prediction states clean, especially for the transitions into the diagonal block  because they have much higher probabilities than the others. The direction-based unrolling was also effective in eliminating unnecessary memory accesses.O(n2) in contrast to O(n) for adaptive banded DP algorithms, where n is the length of input sequences. To compare our algorithm with the fastest alignment algorithm for a unit score matrix, we also implemented an alignment algorithm based on Myers’ bit-parallel edit distance algorithm (editdist) with an adaptive band, which is a slightly modified version of the algorithm authored by Kimura [W) was set to 32 in the three affine gap penalty implementations because it is the width of SIMD registers in AVX2 and therefore we can expect the highest efficiency. We set W to 64 in the adaptive edit distance algorithm because it is the width of general-purpose registers. Note that the band for editdist is twice as wide as that for the other three algorithms. Bit widths for the DP variables were set to 8 in the two difference algorithms, to 16 in non-diff, and to 1 in editdist. Every algorithm was composed of three stages: matrix fill-in, traceback, and path-to-CIGAR conversion. The benchmark programs were compiled by gcc-5.4.1 with the O3-level optimization with the SIMD instruction enabled (-march=native) and were then executed on an Intel Core i5 6260U processor  with 32 GB RAM  running Ubuntu Linux 16.10.We implemented the proposed affine gap penalty algorithm Eq.  for x86_y Kimura . The ediAs input data, query sequence pairs were generated from three runs of Oxford Nanopore MinION reads from the whole-genome sequencing experiments of a human sample, NA12878  when x=y), the mismatch score  when x≠y), the gap-open penalties  and the prefetch and conversion of query sequences (∼ 3 cycles). It should also be noted that libgaba makes the maximal use of the available execution units  in the innermost loop. We observed that libgaba stalls rarely, presumably because all the computation context is kept only on registers; the DP vectors are on the SIMD registers and the others on the general-purpose registers. On the other hand, the editdist implementation generated several register spill/reload pairs that resulted in execution pipeline stalls, which led to a performance loss. The performance of libgaba and editdist on the traceback was significantly faster than that of non-diff and diff-raw. The reason why the performance on the traceback is clustered into two groups may be that the traceback algorithms for both methods are similar in that logical operations are utilized. The speed for the path-to-CIGAR conversion was also improved by a factor of ∼ 2.5 with the proposed bit-counting-based conversion algorithm when compared with the naïve one. We also conducted the same experiment on other machines with different SIMD instruction sets and compilers. The results were generally consistent among all the tested settings, the editdist being the fastest and the libgaba being the second fastest. The machine specifications and complete results are shown in Table S1 and S2, respectively, in Additional file l varied between 1 and 25,000 bp except that we cut off the tail longer than 25 kbp in the input sequences. The maximal edit distance was set to k=0.6·l for editdist. The results were largely consistent with the results in Table Next, we measured scalability with respect to the length of input sequences. Figure 4We tried to compare our algorithms with previous alignment algorithms used in popular nucleotide sequence aligners, but it was not straightforward as we expected. We found that alignment routines in existing stand-alone long-read aligners or general-purpose alignment libraries cannot be directly compared to our algorithm in a fair manner. Here are some examples: (1) the Farrar’s algorithm  is not sConsidering those situations, instead of showing a rigid comparison between the existing methods, the baseline algorithm (non-diff), and our algorithm (libgaba), we will show an indirect evidence that the baseline algorithm (non-diff) we used is already well optimized. Other less-optimized SWG algorithms and stand-alone aligners should be easier to optimize, so that they will eventually benefit from our algorithm.Because our primary contribution is that we doubled (or quadrupled in some cases) the width of SIMD vectorization and that our algorithm still allows tracing back, we decided to evaluate the performance of existing algorithms and ours by measuring the billion cell updates per second (GCUPS), which is how many DP cells are updated per second in the extension alignment.To that end, we compared the DP matrix calculation performance of our implementation, libgaba and non-diff, the baseline algorithm, with several existing DP matrix calculation routines. We selected five implementations, each of which represents a certain category of existing algorithms: (1) an implementation of the Farrar’s algorithm in the Parasail library , (2) thThe Parasail implementation we used was a semi-global variant of the full-sized (non-banded) SWG algorithm proposed by Farrar . The impThe global alignment algorithm in BWA-MEM is a static banded SWG implementation with vertical matrix slicing without SIMD vectorization. Out of the two DP-based alignment implementations  in BWA-MEM, we chose the global alignment implementation for the following two reasons: (1) The number of the updated cells is easier to calculate for the global alignment implementation; the semi-global alignment routine may stop evaluating cells in the DP-matrix due to the X-drop-like heuristic algorithm ; (2) The semi-global alignment algorithm used in BWA-MEM does not store the whole DP matrix nor the whole traceback information; it only stores the position of the cell where the maximum score is given. This hinders direct comparison with other implementations. The global alignment routine, “ksw_global2” found in ksw.c, calculates the SWG DP matrices with 32-bit-wide variables and stores 8-bit-wide traceback direction flags. We set the bandwidth to the default of the BWA-MEM algorithm, three plus the antidiagonal distance of the two end positions of the alignment for each query-reference pair. This is because the global alignment routine in BWA-MEM is invoked after semi-global alignment finds an approximate region in the DP matrices where an optimal path travels through.X=70, which is the default value of the blastn program.The BLAST X-drop DP is a SWG-based semi-global alignment extension algorithm adopted in the BLAST package. Since the current implementation of the algorithm in the NCBI BLAST+ package was highly complicated in terms of the input and output data structures and the control flows, we used a modified version used in our adaptive banded DP paper . Brieflyk=10,000 for the algorithm to capture the full length alignments from the dataset.The Myers’ edit-distance algorithm utilizes 64-bit general purpose registers to handle 64 DP cells simultaneously. The Myers’ edit-distance algorithm only takes the unit score matrix; it is a special case of the general SWG algorithm. The SeqAn edit-distance implementation calculates a full-sized DP matrix without any heuristic, but again it only takes the unit score matrix. The edlib library adopts a space-reduction technique similar to the BLAST X-drop algorithm for efficiently detecting alignment paths around the diagonal line of the DP matrices. We estimated the number of updated cells by counting the number of calls to “calculateBlock” function, which updates a set of four 64-bit-wide difference vectors of the Myers’ algorithm that consists of a set of information for 64 cells. The number of updated cells were counted using a separate implementation such that the counting does not affect the computation speed measurement. The maximal edit distance parameter was set to We used the same experiment setting as the previous experiment. The 1000 subsequence pairs of the Nanopore dataset of 25 kbp and its corresponding GRCh38 reference subsequence, were input to the five implementations. These implementations were compiled and linked into a single binary. As for the billion cell updates per seconds (GCUPS) metrics, the fastest implementation was the edlib  to the BLAST X-drop DP alignment algorithm is roughly 0.18×8=1.44, which is far below the GCUPS of libgaba, we conclude that libgaba is the fastest extension alignment algorithm in practice for long reads.The difference recurrence relations utilize the full width of SIMD instructions available on modern processors using 8-bit integers in most operations during computation of a semi-global alignment. The difference recurrence relations can be easily extended to the global alignment. In addition, we released the implementation of our algorithm as a pure C library so that tool developers can immediately benefit from the difference recurrence relations. Because libgaba is, to the best of our knowledge, the fastest affine gap penalty alignment library suitable for aligning long nucleotide sequences from single-molecule sequencers, we hope that libgaba is incorporated into many existing alignment tools and other tools in the near future.In addition, our benchmark indicates that the combination of difference recurrence relations and the adaptive banded DP algorithm is highly effective at aligning real reads generated by single-molecule sequencers. Our benchmark also revealed a limitation of the adaptive banded algorithm: large indels (> 20 bp), homopolymers, and tandem repeats must be handled with care in order to calculate more accurate alignments. This may be done by an algorithm in a higher layer. One possible design for the seed-and-extend–based alignment algorithm may be to combine the seed-chaining algorithm with a special extension step. The seed-chaining step enumerates seeds, and then the seeds are chained to estimate the approximate region through which the optimal alignment path should go. The extension step can benefit directly from adaptive banded DP, but a researcher may want to add an extra step that iterates the extension until the alignment covers the full chain when the input sequence contains problematic sequences that cause premature termination of the alignment. Another design may use a nonadaptive (static) banded DP algorithm to overcome problems with tandem-repeat or homopolymer regions by means of static banded DP with a wider band. Be that as it may, we believe that libgaba is already useful for most applications. Indeed, Minimap2  already Alignment of long protein sequences might be also accelerated by the proposed difference recurrence relations. Nevertheless, how to do it efficiently is an open question; our algorithm assumes that the score matrix fits in a single SIMD register , but a nFinally, we would like to mention that it is easy to port our algorithm to other flavors of processors such as graphical processing units or manycore processors, where a per-core memory quota or the local memory size is relatively small as compared to the ones in normal CPUs. Our algorithm is also likely to run efficiently on field-programmable gate arrays or application-specific integrated circuits because it can lead to a smaller circuit size of arithmetic units  and to better timing requirements because of the shorter critical-path length.We proposed a novel algorithm “difference recurrence relations” that computes a semi-global Smith-Waterman-Gotoh alignment in a SIMD-friendly manner, as a generalization of existing bit-parallel string comparing algorithms , 27. We Additional file 1Section S1), library design and portability issues (Section S2), and benchmark results on different machines (Section S3). (PDF 231 kb)This file contains supplementary sections describing the derivation processes of the difference recurrence relations and the proofs of the bounding formulae


TurboFold II augments the structure prediction capabilities of TurboFold by additionally providing multiple sequence alignments. Probabilities for alignment of nucleotide positions between all pairs of input sequences are iteratively estimated in TurboFold II by incorporating information from both the sequence identity and secondary structures. A multiple sequence alignment is obtained from these probabilities by using a probabilistic consistency transformation and a hierarchically computed guide tree. To assess TurboFold II, its sequence alignment and structure predictions were compared with leading tools, including methods that focus on alignment alone and methods that provide both alignment and structure prediction. TurboFold II has comparable alignment accuracy with MAFFT and higher accuracy than other tools. TurboFold II also has comparable structure prediction accuracy as the original TurboFold algorithm, which is one of the most accurate methods. TurboFold II is part of the RNAstructure software package, which is freely available for download at  RNA is critical in cellular function. In addition to being the template for translation, RNA has been shown to be catalytic –3. AdditIn protein alignment, homologous amino acids often conserve physical properties, such as polarity or hydrophobicity, even if the amino acid identity changes . DetectiO(N3H) time and O(N2H) memory, given H sequences with the average length N. A number of approaches have been used to accelerate these calculations, including restriction of the alignment  in time, given H sequences with the average length N).Another approach for improving multiple sequence alignments is to take the advantage of the homology across multiple sequences by using consistency among pairwise alignments ,37. Probintrinsic information, which is derived from the thermodynamic nearest neighbor model  in time, where H is the number of sequences and N is the length of each sequence.A match score for alignment based on base pairing probabilities was proposed in PMcomp , and thiMaximization of the alignment match score in Equation  encouraget al.   3) is thentclass1pt{minimaOnce the forward and backward variables have been recursively computed, the posterior co-incidence probability can be obtained from these as (4)\docuAlignment posterior probabilities required for the probabilistic consistency transformation in Step  are alson is computed asn, ‘The extrinsic information calculation begins with computing base pairing proclivity for each sequence, inferred from every other sequence. For each sequence, a lower triangular matrix is calculated. Specifically, the proclivity m is then obtained as the normalized sum of the proclivities for the sequence m inferred from all other sequences, where the proclivities are inversely weighted by the pairwise sequence identity. That is,et al.  is re-computed as in step , using uet al. , was aggregated from available online databases of RNA structure and alignment. Compared with the pre-existing BRAliBase dataset , separate benchmarks were run using Clustal Omega (1.2.1),  or ClustFor benchmarking, groups of sequence homologs were randomly selected from families distinct from those used for estimation of the parameters. Specifically, 200 groups of 5, 10 or 20 sequence homologs were selected from the small subunit ribosomal RNA (Alphaproteobacteria subfamily), SRP RNA (Protozoan subfamily), RNase P RNA  and telomerase RNA. For SRP RNA, sequences shorter than 200 nucleotides were excluded because their structures are not consistent with those of longer sequences. All methods were benchmarked on the same groups of sequences, except for the single-sequence predictions, which were obtained by running MaxExpect from RNAstructure 5.7 ,63 on eaTo allow for comparison against previous evaluations, benchmarks for the commonly used BRAliBase dataset , which pLike TurboFold II, the MAFFT  and R-CoFor MAFFT, the X-INS-i option provides the capability for incorporating structural information in a multiple sequence alignment (MSA); hence forth, MAFFT refers to the program used with this option. To obtain a multiple sequence alignment, MAFFT first calculates pairwise structural alignments using either the SCARNA  or LaRA While both MAFFT and TurboFold II iteratively incorporate structural information in computing an MSA, the approaches differ fundamentally. The TurboFold II iterations alternate between structural predictions (updating base pairing probabilities) and alignment predictions . Both the structural and alignment prediction steps utilize probabilistic models and exchange information as prior probabilities. TurboFold II also refines the pairwise sequence alignments using structural information, in contrast to MAFFT using structural information at the MSA refinement.R-Coffee is a variant of T-Coffee . It starIn R-Coffee, the MSA is assembled from library of nucleotide alignments in a way that favors a 4-way-consistency, i.e. nucleotides are more likely to align if they align to common nucleotide in a third sequence and if they have high probability of base pairing with nucleotides that are also aligned in the library. Sequences are aligned pairwise  with a sA major difference between TurboFold II and both MAFFT and R-Coffee is that the match score in TurboFold II reflects the general similarity of base pairing conditions  rather than restraints as being paired with particular nucleotides. The advantage of the match score is not to limit the potential alignment partners in too narrow a range. By combining with sequence identity in the HMM calculation, it can be useful to improve the overall alignments based on imperfect structure prediction, particularly at the beginning of the iterations.For both predicted alignments and structures, sensitivity and positive predictive value (PPV) were calculated. For the alignment benchmark, sensitivity is the fraction of aligned nucleotide pairs in the database that are correctly predicted by the methods. PPV is the fraction of predicted aligned nucleotide pairs that also occur in the accepted alignment ,73,74. Fanalysis  and alsoanalysis –79. The http://www.R-project.org/)   between ct.org/) . Alpha, Fundamentally, TurboFold II is an extension of TurboFold , which tThe accuracy of TurboFold II was compared to those of seven leading multiple alignment methods: Clustal Omega 1.2.1) , a metho.1 , a meWith the exception of the small subunit rRNA family, TurboFold II had the highest sensitivity and PPV among the programs benchmarked. The pairwise sequence identities for the families used in the benchmarking are tabulated in the The secondary structure prediction results from TurboFold II over the test datasets were compared against leading secondary structure prediction methods: LocARNA (1.8.7) ; RNAalifFor each family, TurboFold II had a sensitivity and PPV comparable to TurboFold and performed well in comparison with other methods Figure . Except TurboFold offered a breakthrough by predicting conserved RNA secondary structures using probabilistic alignment information rather than fixed input alignments. It lacked, however, a mechanism for estimating the alignments using structural information. TurboFold II fills this lacuna by incorporating iterative refinement of the alignment probabilities in addition to that of the base pairing probabilities. This additional functionality is introduced in TurboFold II by using a match score function that represents the secondary structural similarity between two nucleotides (in two sequences) based on estimated base pairing probabilities. Thus, the computation of extrinsic information for structures also uses updated posterior co-incidence probabilities to re-estimate base pairing probabilities for each sequence. The final predicted alignment additionally benefits from the consistency transformation introduced by ProbCons . The paiStructural alignment methods, like TurboFold II, take advantage of predicted structural information to inform sequence alignments. In contrast, sequence alignment methods rely solely on nucleotide identity, which is problematic because of the relatively poor sequence conservation compared to structure conservation in RNA.Nocardioides albus, Propioniferax innocua, Salt Marsh A26, Mycobacterium tuberculosis and Lake Griffy A #8 in Nocardioides albus in Propioniferax innocua in Salt Marsh A26 in Propioniferax innocua and Salt Marsh A26 contain a bulge loop in the corresponding position. Therefore, an inserted hairpin structure in Nocardioides albus makes the secondary structure different from those for Propioniferax innocua and Salt Marsh A26.As with other structural alignment tools, a limitation of TurboFold II is that its alignment accuracy heavily relies on the accuracy of secondary structure prediction. When a sequence has variable structure elements that are absent in the other input sequences, the extrinsic information computed from other sequences for the corresponding regions is not as useful as when there are similar structural elements in at least one other input sequence. These structural inserts are common in several RNA families, such as RNase P RNA and SRP RNA . A detaiNocardioides albus, Propioniferax innocua and Salt Marsh A26 as predicted by TurboFold II. The multibranch loop and bulge loops are correctly predicted. Figure Nocardioides albus, Propioniferax innocua and Salt Marsh A26. The nucleotides of the aligned helices alignments are colored according to their secondary structures. Figure Nocardioides albus is correctly predicted as an insertion by TurboFold II, by two other structural alignment methods, LocARNA and MXSCARNA, and by the purely sequence-based method, Clustal Omega. Without the benefit of structural information, this helical region is aligned incorrectly with nucleotides in 5′-end of another helix in the ProbCons prediction and with nucleotides in 3′-end of another helix in the ClustalW prediction. TurboFold II inherits the beneficial capability of TurboFold that allows variable structural elements within individual structures. For these RNase P sequences, the flexibility of the model of structural conservation is clear. Figure Halorubrum lacusprofundi  and Streptococcus pneumoniae TIGR4 , respectively. Figure TurboFold II uses a relatively simple match score scheme to incorporate structural information into HMM alignments so that the computational demands remain comparable to TurboFold. Although the match score does not distinguish between nucleotides in same structure components , by combining with pairwise HMM alignments and probabilistic constraints, the nucleotides with relatively high posterior co-incidence probabilities are aligned and incorrect alignments at the border of stem and loop regions are excluded. An example of such a case in tRNA is shown in Figure O(2N2 + HN3H) for H sequences of average length N. The time performance on select sequence families is provided in the Supplementary Materials in TurboFold II now iteratively refines multiple sequence alignments and estimated secondary structures, estimating both nucleotide alignment probabilities for sequence pairs and base pairing probabilities for base pairs. Dynamic programing algorithms accomplish both steps, but the simultaneous folding and alignment problem is avoided, and thus TurboFold II accomplishes sequence alignment and structure prediction with much better overall scaling, http://rna.urmc.rochester.edu. Source code and binaries are available. Additionally, a C++ class is available for incorporating TurboFold II into other software packages.TurboFold II is a component of the RNAstructure software package and is available for download from Supplementary DataClick here for additional data file.


De novo assembly or hybrid methods can recover genomic variation, but the cost of computation is often much higher. We developed a novel k-mer algorithm and software implementation, Kestrel, capable of characterizing densely packed SNPs and large indels without mapping, assembly or de Bruijn graphs.The standard protocol for detecting variation in DNA is to map millions of short sequence reads to a known reference and find loci that differ. While this approach works well, it cannot be applied where the sample contains dense variants or is too distant from known references. Streptococcus pneumoniae, we found near perfect concordance with assembled contigs at a fraction of the CPU time. Multilocus sequence typing (MLST) with this approach was able to bypass de novo assemblies. Kestrel has a very low false-positive rate when applied to the whole genome, and while Kestrel identified many variants missed by other methods, limitations of a purely k-mer based approach affect overall sensitivity.When applied to mosaic penicillin binding protein (PBP) genes in https://github.com/paudano/kestrel. All test code for this publication is located at https://github.com/paudano/kescases.Source code and documentation for a Java implementation of Kestrel can be found at Bioinformatics online. Although modern alignment tools are designed to handle errors and variation, a sequence read that differs significantly from the reference cannot be confidently assigned to the correct location. When these reads are mapped, the low alignment confidence leads to low variant call confidence, and it becomes difficult to separate true variants from false calls. In some regions, the read may be clipped or not mapped at all. As a result, variant calling algorithms that rely solely on alignments cannot characterize these events.Bacterial genomes are small and relatively simple, but they remain one of the hardest informatic targets due to their variability. Horizontal gene transfer (HGT) is one mechanism that changes samples significantly when compared to the reference, and it often leads to drug resistance or increased virulence -mer, and the k-mer frequency is queried for each of the four possibilities . An equiA modified Smith-Waterman  algorithk k-mers of the sample to differ from the reference. Active region detection searches for differences between neighbors that are less likely to have occurred by chance. Then by searching for a recovery in the downstream frequencies, it attempts to resolve the left and right breakpoints in k-mer space. This region is bounded by the unaltered k-mers at its flanks, which we label anchor k-mers. The low-frequency and the anchor k-mers together comprise the active region.The distribution of k-mer frequencies from a set of sequence data is approximately uniform with a mean equal to the average read depth of the sample, and variants disrupt this distribution over reference k-mers. For example, a single SNP causes iN and ϵ, the threshold required to trigger an active region scan  (f(0) is the anchor k-mer frequency, and it approaches a lower bound, minf, asymptotically. By default, f(x) is defined by scaling and shifting the standard exponential decay function, h(x) (h(x) is parameterized by λ, which must be also be set, but Kestrel does not configure this parameter directly because it is difficult to know how to choose a reasonable value. Instead, λ is chosen by a configurable parameter, α, that is defined as the proportion of the decay range, k k-mers, the recovery threshold f(k) has declined in its range from f(0) to minf by a factor of α. This is true for all nk such that When an active region occurs over declining read coverage, the recovery k-mer frequency may be lower than expected. As the scan moves further from the left anchor k-mer, the expected recovery frequency should be relaxed. The exponential decay function, f(x) , is emplon, h(x) .(1)f(x) 1 k-mer . This prin)+fmin . SupplemAfter the endpoints of an active region are found, the actual sequence (haplotype) from the sample must be reconstructed. This process is similar to a local assembly from k-mers, but it is implemented to keep resource usage at a minimum. Since the reference sequence over the whole region is known and anchor k-mers have been chosen, the search through k-mers in the sample can be greatly simplified.The process begins by initializing the haplotype with the left anchor k-mer. Then by removing the left-most base of the k-mer and appending a new base to the end, the k-mer can be shifted one base to the right. Each nucleotide can be appended and the frequency checked. The base that produces a k-mer with the highest frequency is appended to the haplotype. If more than one base produces an acceptable frequency, then the alignment is split by saving the state of reconstruction with alternate bases, continuing with the highest-frequency k-mer, and returning to the alternatives after the current haplotype is built. In this way, multiple haplotypes may be built over one active region.While this algorithm is simple enough to build the haplotype sequence, it does not know when to terminate. It could continue until the right anchor k-mer is found, but such reference-naïve reconstruction would certainly waste many CPU cycles extending erroneous sequence. Because the active region sequence and the haplotype sequences are known, an alignment could be performed as it is extended. A global alignment would be ideal except that it would have to be recomputed each time a base is added, and performance of such an algorithm would be unacceptable in all but the most trivial of applications.An ideal algorithm would align over the active region from end to end, anchor the left ends of the haplotype and active region, and allow the right end of the haplotype to extend. To accomplish this, Kestrel employs a modified Smith-Waterman alignment. Two key modifications were made to Smith-Waterman; (i) any subalignment with a score of 0 cannot be extended, and (ii) the alignment must begin with a score greater than 0. Because of these modifications, the alignment must begin with a non-zero score, and the gap extension penalty must be non-zero to prevent unbounded extension.i as ix and the haplotype base in column j as jy. As haplotype bases are added to the alignment, a column is appended to the matrix. Section 2.6 discusses how this is done efficiently.Smith-Waterman is a dynamic programming approach where matrices track scores by updating from shorter sub-alignments as the alignment progresses . The actmatchR is added to the score if they agree and mismatchR is added if they disagree. For convenience, we define match  and gap extension (gapR) penalties. This type of model requires three matrices over x and y to track the scores. One matrix, alnS, contains scores through aligned (matched or mismatched) bases. Two more score matrices, gactS and ghapS, contain scores through gaps in the active region and gaps in the haplotype, respectively. Using these definitions, the modified Smith-Waterman score update process is defined in initR is assigned   to returalnS needs to be queried to find the best score for the current alignment, maxR    , and Rmaot . If RmaxThe variants are interpreted from the alignment, and the locations of the variants are translated with respect to the location of the active region. The alignment provides a convenient way to identify mismatched bases and gaps in either sequence.T, has more than one path out, then there is more than one optimal alignment, and so there are multiple ways to translate the alignment to variant calls. When comparing two alignments, the one with the first non-matching base is given a higher priority. If the non-matching bases agree (same variant), then the next non-matching base is queried. If the non-matching bases do not agree, then alignments are prioritized by mismatch, insertion and deletion, in that order. This gives the algorithm predictable output for cases such as a deletion in a homopolymer repeat; Kestrel will always report that the first base was deleted even though the alignment score would be the same for a deletion at any locus of the repeat. The effect is to left-align variant calls.If any cell of trace matrix, Approximate read depth of an active region is estimated by summing the depth of all haplotypes, which may include the reference haplotype. Similarly, summing only the haplotypes that support a variant call gives the approximate depth of the variant. Because haplotypes may share k-mers, we use the minimum k-mer frequency as a conservative estimate of read depth of any single haplotype. These estimates may be useful for filtering variants with low support.alnS, gactS and ghapS) needs to be stored while the next column is built. Therefore, each of these matrices can be reduced to two arrays where one contains the last column, and one contains the new column being added. When alternate haplotypes are explored and the alignment splits, only one array for each matrix must be saved.Because of the nature of the dynamic programming algorithm, only the last column of the score matrices  garbage collection (GC) to detect and remove these nodes. In other words, GC can automatically prune dead branches of Streptococcus pneumoniae (S.pneumoniae) targeted by β-lactam compounds. According to several studies, 20% or more of a PBP gene may be altered by inter-species recombination  genes of We obtained 181 samples from 29 serotypes recently released by the Centers for Disease Control and Prevention from NCBI under BioProject PRJNA284954 . These data are whole-genome 250 bp paired-end Illumina sequence reads ranging from 15 Mbp to 1234 Mbp (median = 323 Mbp). Selecting the best reference out of more than 10 is often necessary  using three distinct approaches. The first is a standard alignment pipeline using BWA , 2010, PContamination in the PBP genes was identified in SRR2072298, SRR2072306, SRR2072339, SRR2072342, SRR2072351 and SRR2072379, and these samples are not included in our analysis results. For all of these samples, there were many variant calls in the PBP genes with a relative depth of 0.70 or less, which is unlikely in a monoploid organism. The size of the IKC files is also larger than expected, which supports our conclusion that they contain allelic variation not present in the host genome . Based oWith the minimum k-mer frequency set to 5, sequence read errors are filtered out of the distribution of k-mers. It is then interesting to note that a sample has a finite set of solid k-mers, and once this set is reached, the IKC file ceases to grow in size. BAM files must store a record for each read, and so they grow approximately linearly with read depth. The samples suspected of contamination and low coverage indeed show an increase and a decrease, respectively, in IKC file size .Kestrel produced 29 806 true positive (TP) variant calls with 73 false positive (FP) and 100 false negative (FN) calls  sensiti sensiti.Kestrel required an average of 13.3 CPU minutes per million 250 bp reads (min/M-reads), the alignment approach required an average of 14.5 min/M-reads, and the assembly approach required 106.2 min/M-reads . For allde novo assembled contigs and to use the database for comparing each allele to the sequence data (Multilocus Sequence Typing (MLST) attempts to cluster samples by analyzing the content of some set of genes. The current method is to build a BLAST (Neisseria meningitidis (N.meningitidis) samples from ENA study PRJEB3353 (ERR193671-ERR193677) (We obtained 7 R193677) . These dN.meningitidis was used as a BLAST query, and the best allele for each gene was chosen. With the allele calls, the sequence type (ST) was identified by comparing against sequence type profiles also obtained from pubMLST. This set of alleles and the sequence type represents the expected results based on the current methods.Sequence reads were assembled with SPAdes using default options, and contigs were used to construct a BLAST database. Each allele downloaded from pubMLST for Sequence reads were also transformed to an IKC file with KAnalyze using 31-mers, a 15-base minimizer, a minimum k-mer frequency of 5 and a minimum allele depth of 0.50. Each allele was used as a reference sequence for variant calling. For each gene, the allele with the fewest variants was chosen as the best match. If no variants were detected for an allele, the k-mer counts over the allele reference was checked to ensure that it was present in the sequence data. The best allele matches were used to identify the ST by comparing them against types from pubMLST.There was 100% concordance between the assembly and Kestrel methods. All samples were called with a minimum k-mer frequency of 5 except ERR193672, which was reduced to 2 to call gene pgm because of low coverage.The assembly-based MLST approach required an average of 51.6 min/M-reads and average of 7.1 GB of memory (max 7.8 GB). The Kestrel MLST approach required 10.4 min/M-reads and 1.6 GB of memory (max 1.7 GB).Escherichia coli (E.coli) samples obtained from assembled contigs in the We tested Kestrel’s ability to call variants on whole genomes using 309 E.coli K-12 reference (NC_000913.3), and variants between the reference and contig were identified. To minimize the effect of assembly errors, we used ART (S.pneumoniae contigs where the contig depth was at least 1 (mean 4.0 Mbp).The contigs were aligned to an S.pneumoniae reads . An additional parameter was given to Kestrel to discard variants over ambiguous reference bases, such as N, so that RTG vcfeval had an equivalent set of variants from both approaches. With all variant call sets, RTG vcfeval was used to test the calls. Kestrel must limit the size of active regions when calling on whole genomes or it will try to resolve erroneously large regions and perform poorly. For larger genomes, increasing the k-mer size may help reduce k-mer distribution noise.KAnalyze and Kestrel were applied to these simulated reads with the same parameters as the In addition to a VCF, Kestrel can output a SAM file of the haplotypes it assembles and aligns. The SAM feature was enabled for this experiment so that the locations of haplotypes could be identified. Variant statistics were calculated twice; once over all regions where the alignment depth was one and once for all regions where there was an assembled haplotype. The current implementation of Kestrel discards active regions with one wildtype haplotype, so the second analysis only applies to regions where at least one variant was identified (mean 2.3 Mbp).Over the whole genome, Kestrel yielded an FDR of 0.01, but a sensitivity of only 0.71. GATK yielded an FDR of 0.00 (0.0029) and a sensitivity of 0.84 If we examine only regions where Kestrel had an active region, the sensitivity rose to 0.98 for Kestrel and 0.97 for GATK, and the FDR remained 0.01 for Kestrel and 0.00 for GATK.Although the sensitivity was lower for Kestrel, there are regions where Kestrel consistently makes calls that are missed by the GATK pipeline. We compared all Kestrel TP calls that were not within 50 bp of any GATK TP call, merged the resulting calls within 50 bp, and found 780 regions affecting 86 unique genes where calls were missed by GATK in more than 20 samples .The Kestrel algorithm is a framework for calling variants from sequence data using evidence found only in k-mer space. It provides a mechanism for detecting regions of variation, a method for resolving the variation to variant calls, and a set of heuristics that make it work with real data. Inference on k-mers has been applied to RNAseq analysis , phylogede novo assemblies. By applying this method to other domains where assemblies are the current standard, such as MLST and pathogen surveillance pipelines, this approach can have a dramatic effect on computing resources.Although such a method is unorthodox with respect to current standards, it is able to capture variation in regions where alignments are too noisy. In these cases, a k-mer approach can displace alternatives that require far more computing resources and time to complete, such as Despite several advantages, a purely k-mer-based algorithm such as this does have limitations. The most significant of these is that paired-end and sequence read context is lost when shredding sequence reads into k-mers. This information is valuable for resolving variants in repetitive, duplicated or low complexity regions of the genome. Some evidence of these events is still present in k-mer space, such as frequency peaks, and although Kestrel attempts to work through these events, alignments or assemblies will often have higher accuracy.As a practical tool, Kestrel is a fast alternative to existing methods when applied to specific regions of the genome. We expect it to find use as a targeted tool, as part of automated surveillance pipelines or an orthogonal approach for other callers. In its current form, we cannot purport it to be a whole-genome alternative for software like Cortex or Platypus. Future developments may improve the limitations of this approach, or the algorithm may find use in a hybrid tool making use of k-mers and other data. For example, the GATK HaplotypeCaller might fall-back to such a k-mer method to rescue variants in a region where alignments suffer because of dense SNVs or large indels.In many cases, algorithms that are free of alignments and assemblies can reduce the demand on computing resources. As high-volume sequencing technology becomes faster and cheaper, reducing the cost of data storage and analysis becomes critical (Supplementary DataClick here for additional data file.


The abundance of sets containing hundreds of thousands of sequences is a formidable challenge for multiple sequence alignment algorithms. The article introduces FAMSA, a new progressive algorithm designed for fast and accurate alignment of thousands of protein sequences. Its features include the utilization of the longest common subsequence measure for determining pairwise similarities, a novel method of evaluating gap costs, and a new iterative refinement scheme. What matters is that its implementation is highly optimized and parallelized to make the most of modern computer platforms. Thanks to the above, quality indicators, i.e. sum-of-pairs and total-column scores, show FAMSA to be superior to competing algorithms, such as Clustal Omega or MAFFT for datasets exceeding a few thousand sequences. Quality does not compromise on time or memory requirements, which are an order of magnitude lower than those in the existing solutions. For example, a family of 415519 sequences was analyzed in less than two hours and required no more than 8 GB of RAM. FAMSA is available for free at  Multiple sequence alignment (MSA) is one of the most important analyzes in molecular biology. Most algorithms use progressive heuristics4O(k log k) and space complexity of O(k) (k being the number of sequences in the input set), PartTree was successfully adopted by MAFFT 6 packageO(k log k) exact similarity values to approximate other values. Embedding is combined with sequence clustering with the use of K-means algorithm, which prevents the storage of the whole similarity matrix, and keeps memory requirements under control. Both MAFFT and Clustal Omega use tuple matching for similarity calculation.PartTree, a divisive sequence clustering algorithm for building a guide tree without calculating all pairwise similaritiesA different approach to large-scale alignments was introduced in UPPO(k). A novel, in-place algorithm of profile alignment which prevents memory reallocations during the progressive stage is an important factor contributing to the computational scalability of FAMSA. As a result, FAMSA is the fastest and most memory-efficient alignment software when large protein families are taken into account. FAMSA’s superiority was observed for sets ranging from thousands to half a million of sequences.While MAFFT, Clustal Omega, and UPP are computationally applicable for families of even 100 000 proteins, we show that the quality of the results for such problems is often unsatisfactory. This article presents FAMSA, a progressive multiple alignment algorithm, particularly suitable for large sets of sequences. Pairwise similarities are established, by analogy to Kalign-LCS, on the basis of the longest common subsequences (LCS). Unlike MAFFT and Clustal Omega, FAMSA calculates all pairwise similarities. The process is highly efficient due to the multithreaded, bit-parallel LCS algorithm suited for AVX extensionsFAMSA is not only efficient, but also very accurate thanks to a number of algorithmic features. They include LCS for similarity measurement, MIQS substitution matrixk > 10000) makes extHomFam particularly representative for large-scale alignment problems, which are of crucial importance in the context of recent advances in high throughput sequencing.The scalability of FAMSA was assessed on extHomFam, a new benchmark generated by analogy to HomFamCalculation of pairwise similarities,Determination of a guide tree,Progressive profile merging according to the guide tree order,Optional iterative refinement of the final profile.Like other progressive algorithms, FAMSA consists of four stages:Detailed descriptions of the algorithm stages together with analyzes of time and space complexities are provided in the following subsections.A and B, the length of an LCS is the maximal number of perfectly matching columns. This can be considered as an estimation of true pairwise alignment. To compensate the effect of LCS length being larger for longer sequences, the value is normalized by the indel distance (the number of single-symbol insertions and deletions necessary to transform one sequence into another). This distance approximates the misalignment cost, i.e. the number of gaps in the alignment, in which only perfect matches are allowed:The length of a longest common subsequence (LCS) is used in order to determine the pairwise similarities of sequences in the input set. The choice was motivated by the promising results of LCS application in previous studies10w cells are computed at a time A and B can be directly derived from the LCS length according to the formula:The LCS length can be computed using a straightforward dynamic programming (DP) ruleS| denotes the length of the S sequence. The time complexity of the pairwise similarity calculation is:where |w is comparable to or smaller than the longer sequence length.under a reasonable assumption that t processing threads, a words in a single AVX vector , and that n denotes a sequence length, the total time complexity of the first stage can be expressed as:As modern computers are equipped with multi-core processors, FAMSA distributes the calculation of LCS lengths for different pairs of sequences to several computing threads. Moreover, the presented software makes use of vector operations provided by technologies like SSE, AVX, AVX 2Massively parallel architectures have become widespread in computationally demanding tasks. As FAMSA was designed for analyzing large protein families, it allows massively parallel devices, such as graphics processors, to be employed for the calculation of pairwise similarities. The procedure is implemented in OpenCLit can be computed incrementally, i.e. without storing the complete similarity matrix,O(k2) time using the SLINK algorithmit is very fast, i.e. it can be completed in the results were of superior quality in the previous studies22A number of algorithms for guide tree construction have been developed, e.g. NJO(k) space in contrast to O(k2), required by other guide tree construction algorithms like UPGMA. This is of crucial importance when huge protein families are investigated.To benefit from the incremental property of SLINK, the first two stages of FAMSA are performed simultaneously, which restricts the memory footprint. In particular, tree generation requires only O(k) profile alignments, each computed by means of dynamic programming. At least half of these alignments are degenerated cases in which one or both profiles consist of a single sequence. Dynamic programming implementation can be simplified in those cases, hence specialized variants of the general DP procedure were prepared. This resulted in remarkable computation time savings for huge datasets, in which most profile alignments are made against a single sequence due to the structure of a guide tree.The progressive construction stage requires n* computer words, with n* being the profile length),occurrence counters of each alphabet symbol in consecutive columns (32n* computer words),costs of alignment of consecutive columns to each possible alphabet symbol  sequence symbols, (ii) the number of gaps present before the corresponding sequence symbol. Moreover, to quickly localize a symbol in a column, as well as to insert or remove gaps, dynamic position statistics are stored in an additional array. The space for the gapped sequence is approximately 13 times the length of the sequence —opens a sequence at the left end or opens a contiguous series of gaps at the right end of a sequence,terminal gap open (Te)—extends a series of gaps inserted at the beginning or end of a sequence,terminal gap extension (Go)—opens a contiguous series of gaps inserted within a sequence,gap open (Ge)—extends a contiguous series of gaps inserted within a sequence.gap extension  does not always mean that exclusively gap opens have been inserted. Inserting only gap opens would result in an overestimation of their number. That is why the types of gaps within a column should be corrected.X and Y. A column of gaps is to be inserted into profile X (the left part of the figure). The proper types of gaps together with the corrected gaps in the neighboring column are shown in the right part of the figure. The following situations must be considered during correction of the gaps:S1: there is a terminal gap open at the right side of the inserted one; hence, the inserted gap should be a terminal gap open, and the following gap should be transformed into a terminal gap extension,S2: there is a terminal gap extension at the left side of the inserted one; hence, the inserted gap should also be a terminal gap extension,S3: the inserted gap will be placed into the gap series, so it should be a gap extension,S4: there is a gap open at the right side of the inserted one; hence, the inserted gap should be a gap open, and to prevent the occurrence of two gap opens one after the other, the second gap should turn into a gap extension,S5: the inserted gap is to be placed within the series of residues as the only gap, so it should be gap open,S6: there is a terminal gap open at the left side of the inserted one; hence, the inserted gap should be a terminal gap extension.The optimization of gap parameters and recognition of their influence on alignment accuracy is still the subject of intensive studiesgl and gd are two constants set by default to 45 and 7 .where The application of gap corrections and scaling leads to another modification of the traditional approach. It is usually assumed that the insertion of a gap column in to the first profile cannot be immediately followed by the insertion of a gap column in to the second profile. If some assumptions about the gap costs and substitution matrix values are made, it can be proved to be reasonable, i.e. such a situation never leads to the optimal alignment. Nevertheless, this does not hold true if the gap correction is applied. Therefore, it is checked whether consecutive insertions of gap columns in to both profiles render a higher-scored alignment. .The idea of an iterative refinement is to correct misalignments made in the early phase of the profile alignment. Several algorithms were proposed for this task, like REFINERTo simplify the time complexity analysis of the refinement, the input and the output profiles are assumed to be of comparable lengths . A single refinement iteration requiresn* being the length of the shorter of the two profiles obtained after splitting the original profile.time, with k ≤ 1000. The number of iterations was experimentally set to 100.Preliminary analyzes showed the refinement to be particularly beneficial for smaller sets of sequences. For this reason, and to improve the processing time of large protein families, the refinement is applied only for An assessment of MSA algorithms was performed using benchmark datasets. The presence of high-quality, manually curated reference alignments allowed supervised accuracy measures to be calculated. They were sum-of-pairs (SP) and total-column (TC) scores, defined as fractions of correctly aligned symbol pairs and columns, respectively. The scores were determined with a use of QSCORE softwareet al.Our aim was to propose an efficient and robust algorithm for the alignment of thousands of proteins. The largest available benchmarks contain sets of at most hundreds of sequences, with an exception of HomFam introduced by Sievers k = 4000, 10000, and 25000 to obtain subsets named small, medium, large, and extra-large. Note, that sets of ~1000 sequences are usually referred to in the literature as large—our naming convention is intended to show size diversity. ABC_tran, the most numerous set in extHomFam, contains 415 519 sequences, which is the largest benchmark protein family available.Since 2011, when HomFam was introduced, Pfam and Homstrad databases have demonstrated significant growth. Hence, we present the new benchmark, extHomFam, to carry out more extensive experiments. It was constructed according to the HomFam generation protocol, with several modifications. 399 high-quality alignments containing at least 3 proteins were selected from Homstrad (ver. 1 Apr 2015). By decreasing the threshold from 5, the larger benchmark could be obtained than the original HomFam. If two-protein families were also taken into account, extHomFam would be increased to 1013 sets, at the cost of positively biasing the TC score . Therefore, pairwise-only alignments were excluded. Next, selected Homstrad sets were enriched with the corresponding Pfam (ver. 28) families. After removing duplicated sequences, sets of less than 200 proteins were filtered out to provide the final benchmark of 380 families. For convenience extHomFam was divided at thresholds The scalability of algorithms was evaluated on the 53 largest extHomFam families, containing at least 30000 sequences each. These sets were recursively downsampled to the desired sizes, with a guarantee of preserving sequences from reference alignments. This scheme has a valuable property: smaller sets are contained in larger ones, which reduces results variability.To evaluate the performance of the presented algorithm on smaller alignment problems, classic benchmarks, i.e. BAliBASEO(k2) pairwise similarities, as well as -parttree and -dpparttree modes, especially suited for large sets of sequences due to lower computational requirements. Clustal Omega was executed with default parameters and with two combined iterations (-iter2), which delivered superior results in the previous studies13From among numerous sequence alignment algorithms, only those able to handle families of thousands of sequences were investigated on HomFam and extHomFam. They were MUSCLEThe experiments on smaller benchmarks  included also top consistency-based algorithms: MSAProbs19A workstation equipped with two 12-core Intel Xeon E5-2670v3 processors (clocked at 2.3 GHz), Nvidia Quadro M6000 graphic card (3072 cores clocked at 1.0 GHz), and 128 GB RAM was used for the experiments. To investigate the behavior of the algorithms on modern workstations and servers containing from a few to several tens of cores, all methods were run with 8 computing threads, unless stated otherwise. FAMSA was run in the CPU mode, except for the experiment on the algorithm scalability w.r.t. the number of CPU cores, where the GPU variant was additionally investigated.et al.k ≤ 3000, FAMSA was inferior only to both Clustal Omega configurations. For k > 3000, the presented algorithm took the lead in both measures, revealing its potential for large protein families. More importantly still, FAMSA was from several to hundreds of times faster than its competitors. For instance, it processed the entire HomFam in less than 12 minutes while Clustal-default and MAFFT-default required, respectively, 8 h 40 m and 2 h 30 m. An even greater difference was observed for Clustal-iter2, which completed the analyzes in over 51 hours. Interestingly enough, MAFFT-parttree and -dpparttree were also inferior to FAMSA. This is especially noteworthy because they calculate only selected pairwise similarities ) instead of the full matrix (O(k2)).Following Sievers small subset. For k > 4000, it became the best aligner and, depending on the subset and quality measure, was followed by Clustal, MAFFT, or UPP. As MUSCLE and MAFFT -parttree rendered inferior results, they were excluded from extra-large due to excessive memory or time requirements. Clustal Omega and MAFFT-default failed to process, respectively, one and four largest extHomFam families . Advances in SP and TC measures of FAMSA over the competing software on medium, large, and extra-large subsets were assessed statistically with the use of the Wilcoxon signed-rank test with the Bonferroni-Holm correction for multiple testing. The differences are significant at α = 0.005; p-values for all pairwise comparisons can be found in The experiments on extHomFam confirmed superior accuracy and execution time of FAMSA to scale well with the number of sequences . FAMSA wextra-large, FAMSA aligned in a proper manner approximately 25% more columns than UPP—the second best algorithm. A more detailed analysis of FAMSA accuracy compared to the competitors is given in k axis. Clearly, the number of test cases for which the presented software was superior to that made by the competitors, as well as the absolute advance in terms of quality, increases with the growing set size. This observation is supported by the scalability analysis performed on the 53 largest families (k ≥ 30000), randomly resampled to obtain less numerous sets. As can be seen in O(k2) instead of O(k log k)), it might be expected to exceed competitor execution times for a sufficiently large k. To verify this, the algorithms were compared on ABC_tran, the largest family in extHomFam with 415 519 proteins. FAMSA processed this set in less than 2 hours. Clustal Omega crashed due to excessive memory requirements after 55 hours of calculations suggesting that the algorithm is dominated by stages other than similarity computation. The situation was different for MAFFT-dpparttree. Its execution time scaled better with the number of sequences, though it was still inferior to FAMSA by a factor of 2.5. Importantly enough, FAMSA required below 8 GB of RAM, while MAFFT-dpparttree needed 47 GB. For comparison, MAFFT-default and Clustal Omega failed to run on a 128 GB machine (the former demanded 318 GB just for storing the similarity matrix). In conclusion, the calculation of all pairwise similarities performed by FAMSA did not prevent it from being the fastest and most memory efficient aligner in the comparison–even for immense protein families.The abundance of extremely large protein families makes extHomFam the most demanding benchmark in terms of computational resources. Apart from FAMSA, only MAFFT-dpparttree and -parttree were able to process all of its sets. Other algorithms either crashed due to memory requirements or were terminated on purpose when the processing time of a family was longer than 24 hours.  While MAFFT-default, MAFFT-dpparttree, UPP, and Clustal-default required from 50 to 188 hours, FAMSA finished the computations in less than 7 hours, which corresponds to 7- to 26-fold advance. Clustal-iter2 was an extreme case; it needed almost 1000 hours, and showed its combined iterations to be inapplicable for very large protein families. A more detailed analysis of the computational scalability of the presented algorithm is provided in ABC_tran, gtp, HATPase_c, helicase_NC, kinase, mdd, response_reg, rvp, sdr, TyrKc) were selected to investigate the scalability of the algorithm stages with respect to the number of computing threads. The experiments also considered the variant of FAMSA in which similarity calculation was adapted for massively parallel architectures with a use of OpenCL. For convenience, processing times of ABC_tran were marked separately. As can be seen in As FAMSA was designed to use all the available computational power, it takes advantage of multi-core architectures of contemporary computers. The ten largest protein families from extHomFam  time and space. The memory consumption is actually close to 2k2 bytes. This is equivalent to about 345 GB for the largest family (ABC_tran) making UPGMA unfeasible for immense sets of sequences. The performance of trees produced by Clustal Omega was also investigated in the experiments . Finally, we examined chained guide trees4142A single linkage method for guide tree determination was used in FAMSA owing to low memory requirements of the SLINK algorithm and superior quality results reported in the previous studies. Nevertheless, as the tree structure was shown to be of crucial importance for the analysis of large protein familiesABC_tran, the results of the single linkage were considered in this case. The experimental results for chained trees were averaged for 21 trials.The comparison of the results for extHomFam is given in pSP = 0.000011, pTC = 0.000019), was observed when compared with UPGMA. This, together with memory efficiency, made the authors choose the single linkage for FAMSA. To provide a deeper insight into the structure of the trees rendered by different strategies, the Sackin indexThe experiments confirmed that the single linkage was superior in terms of alignment quality. The smallest, yet statistically significant advance . This means that the reference sequences were located in the guide trees closer to each other than suggested by the random model.The same analysis was performed on the resampled sets employed for scalability experiments. The results coincide with the observations made for the entire benchmark.For completeness, the accuracy of algorithms was investigated on classic benchmarks with families ranging from a few to approximately one hundred sequences . As expeABC_tran, the largest among the investigated families containing 415 519 sequences, reveals the potential of the presented software. The set was processed by FAMSA within 2 hours in less than 8 GB of RAM, which is suitable for a typical laptop. In contrast, Clustal Omega crashed after 2 days of computations on a 128 GB machine due to excessive memory requirements. MAFFT in memory-efficient mode completed the analysis in 5 hours allocating 47 GB of RAM, yet only 5.7% of columns were successfully aligned, while FAMSA restored as much as 16.8%. No columns were aligned properly by UPP.The abundance of protein families containing hundreds of thousands of members imposes the development of algorithms computationally capable of aligning immense sets of sequences. The traditional progressive scheme was successfully modified by Clustal Omega and MAFFT aligners to eliminate its greatest bottleneck in large-scale analyzes—calculation of all pairwise similarities. Nevertheless, the experiments with FAMSA show that the computation of the entire similarity matrix with the use of LCS measure, combined with a memory-efficient single-linkage tree construction and in-place profile alignment, is orders of magnitude faster than the competing solutions. Importantly enough, this comes with superior alignment quality—FAMSA was significantly more accurate than Clustal Omega and MAFFT on sets of a few thousand and more sequences. The scalability of the presented algorithm in terms of the alignment quality as well as time and memory requirements, makes it applicable for protein families even of a million sequences—a no-go area for the competing software. Such families will likely be present in the Pfam database in the near future, as a consequence of advances in sequencing technologies. Importantly enough, the efficiency of FAMSA has the potential to be further improved. The natural option is the parallelization of the dynamic programming procedure at the profile construction stage; this appeared to be a bottleneck in the scalability tests. Another possibility could be better utilization of massively parallel architectures by optimizing the OpenCL code for GPUs or adapting it for Intel Xeon Phi co-processors.An alternative development direction concerns the alignment quality. Iterative refinement is one of the numerous techniques designed to improve accuracy. For computational reasons, it is performed by FAMSA on families of fewer than 1000 sequences, though. Some limited, less time-consuming refinement scheme could be applied also for larger sets of sequences. Other ideas include the introduction of profile Markov models or consistency. Until recently the latter was found infeasible for large families because of excessive computational requirements. However, our latest researchAnother issue related to large-scale analyzes is an accuracy assessment, particularly the unavailability of reference sequences. Evaluating the quality of the alignment of 10 000 or more proteins on the basis of a reference containing only a small fraction of the members is the largest flaw of the experimental pipeline used in the current research. The authors believe that the progress in multiple alignment domain is likely to be facilitated with the development of new benchmark datasets containing more reference sequences.et al.An interesting attempt into this direction is the recent work by Fox https://github.com/refresh-bio/FAMSA; extHomFam can be downloaded from http://dx.doi.org/10.7910/DVN/BO2SVW. Web service for remote analyzes is under development.FAMSA executables together with the source code are available at How to cite this article: Deorowicz, S. et al. FAMSA: Fast and accurate multiple sequence alignment of huge protein families. Sci. Rep.6, 33964; doi: 10.1038/srep33964 (2016).