Existing tools for multiple-sequence alignment focus on aligning protein sequence or protein-coding DNA sequence, and are often based on extensions to Needleman-Wunsch-like pairwise alignment methods. We introduce a new tool, Sigma, with a new algorithm and scoring scheme designed specifically for non-coding DNA sequence. This problem acquires importance with the increasing number of published sequences of closely-related species. In particular, studies of gene regulation seek to take advantage of comparative genomics, and recent algorithms for finding regulatory sites in phylogenetically-related intergenic sequence require alignment as a preprocessing step. Much can also be learned about evolution from intergenic DNA, which tends to evolve faster than coding DNA. Sigma uses a strategy of seeking the best possible gapless local alignments (a strategy earlier used by DiAlign), at each step making the best possible alignment consistent with existing alignments, and scores the significance of the alignment based on the lengths of the aligned fragments and a background model which may be supplied or estimated from an auxiliary file of intergenic DNA.Comparative tests of sigma with five earlier algorithms on synthetic data generated to mimic real data show excellent performance, with Sigma balancing high "sensitivity"  with effective filtering of "incorrect" alignments. With real data, while "correctness" can't be directly quantified for the alignment, running the PhyloGibbs motif finder on pre-aligned sequence suggests that Sigma's alignments are superior.By taking into account the peculiarities of non-coding DNA, Sigma fills a gap in the toolbox of bioinformatics. This requires scoring the significance of local alignments (to decide in what order to make them), and also a consistency check for each local alignment after the first . More sophisticated algorithms, such as T-Coffee [Alignment of homologous biological sequence has long been a central problem in bioinformatics, dating back to the 1970s with the Needleman-Wunsch algorithm for pairwise global alignment  dealt wiT-Coffee , have siAll these tools are designed for alignment of proteins or protein-coding DNA. Thus, they use well-established substitution matrices, and perhaps higher-level structural information, when dealing with amino acids, but tend to assume that all nucleotides are alike – or that a substitution matrix  adequately describes the differences – when dealing with DNA, or at best use codon translations – inappropriate for non-coding DNA – to search for "anchors". Moreover, they (with the notable exception of DiAlign) tend to penalise insertions and deletions rather severely, which may again be ill-advised for non-coding DNA. Thus, on the one hand, much of the approach of sophisticated protein-alignment algorithms is unnecessary or inappropriate for DNA, while on the other hand, some simpler considerations that apply to non-coding DNA are not used.sensu stricto species of yeast Saccharomyces cerevisiae, S. paradoxus, S. bayanus, S. mikatae, S. kudriavzveii [Drosophila melanogaster and D. pseudoobscura, have been fully or partially sequenced; and mammalian genomes exhibit much homology with one another  in their non-coding DNA. Accurately aligning orthologous noncoding DNA is now important. PhyloGibbs, a Gibbs sampler that we recently developed for phylogenetically related sequence [A need for tuning an alignment program to non-coding DNA has probably not been felt because it mutates much faster than coding sequence and, often, has diverged too far for any significant homology to survive. Till recently, there were not many sequences of closely-related organisms available. That situation has now changed dramatically. For example, the regulatory regions of five fully-sequenced iavzveii ,10 are ssequence ,12, usessequence  and EMnEsequence . , because it evolves so much faster than genes themselves. It is likely that the major differences in mammals, for example, or in two species of fruitfly or yeast, arise not so much from different genes as from different regulation of essentially the same genes. Moreover, there is probably new and unexpected information buried in the vast quantities of non-coding DNA that mammalian genomes contain. To take into account the peculiarities of this problem, Sigma , the tool presented here, uses a correlated "background model" extracted from actual DNA. Its performance on synthetic data generated from such models is a significant improvement over existing programs. Like DiAlign, it imposes no gap penalty, so sequences that are only partly conserved may still be aligned. Furthermore, its algorithm and scoring are such that the significance of later alignments is increased by the presence of earlier alignments, so that adding more related species actually makes alignment easier. Philosophically it is rather close to DiAlign, but it is a new approach whose algorithm and scoring are unbiased by earlier efforts' focus on proteins.Comparative genomics also tells us a lot about evolution, and non-coding DNA is of peculiar importance here precisely The core idea of Sigma is the same as that of DiAlign: it builds up a global alignment from significant local (pairwise) gapless alignments and doesn't worry about gaps in the global alignment.Since sufficiently short local alignments always exist, it is important to score them correctly. Sigma uses an estimate of the probability of seeing such an alignment between random sequences of the same lengths as the given sequences . Moreover, Sigma accounts for correlations naturally occurring in DNA sequence, so that one is more likely to align rarely-occurring strings and less likely to align commonly-occurring strings such as poly-A stretches. We demonstrate the practical importance of this in the section on synthetic data.DiAlign builds a list of possible local alignments  in one pass and then performs a recursively-determined consistent subset of this list in a later pass. In contrast, Sigma always immediately performs the best available local alignment consistent with previous alignments. This improves the sensitivity of Sigma: the significance of later, "smaller" alignments may be increased by the constraints from previously-performed alignments.Sigma operates, not on the raw input sequence, but on a set of "sequence fragments" that are labelled in such a way that inconsistent alignments can instantly be rejected. Initially, each input sequence is its own fragment with its own label, and there are no consistency conditions. When a local alignment is performed, the aligned regions of two fragments are merged into one single fragment, while the remaining regions remain as their own fragments figure . At eachEach "sequence fragment" contains sequence belonging to one input sequence, or locally-aligned sequence belonging to more than one input sequence. The sequence fragment is a data structure that containsS} that it belongs to. • A list of the sequences {Ls for each sequence s in {S}, that identifies it on that sequence. ). The labels are strings representing real numbers between 0 and 0.3, and are in increasing order as one moves along any particular sequence.• A label s in {S}, pointers to the previous and next fragments in s.• For each sequence s' not in {S}, "limits" Ll(s') and Lr(s') for the left-most and right-most fragments in s' with which it may be aligned.• For every sequence The algorithm is:• Initially there is one fragment for each input sequence, containing the entire sequence, with predecessor and successor elements set to NULL, the label set to 0., and without limits on alignment .fi and fj, whose sequence sets {S}i and {S}j are disjoint, and which fall within each other's "alignment limits". A possible alignment is an ungapped local alignment between the corresponding sequence stretches.• Each pairwise alignment operates on two sequence fragments • A list of all possible pairwise alignments is made, and sorted and performed in order of significance. Alignments inconsistent with prior alignments are omitted.• When an alignment is performed, the aligned stretch of sequence is broken into its own fragment, resulting in five new fragments figure . These f• This is done repeatedly until there are no more possible alignments within the specified significance limit.• The sequence fragment set is then converted into the desired output format and printed.S to which fragment B belongs, the label L(S) is within the limits Ll(S), Lr(S) for that sequence on fragment A (and vice versa). The updating of the alignment limits is done by "sweeps" from the newly-aligned fragment fnew. Let {Sf} be the set of sequences that fnew is a part of, and {S'} the complement of {Sf}, that is, the set of sequences that fnew is not a part of.  For its most stringent left limit on sequence S' ∈ {S'}, fragment fnew considers the left limits on its immediate left neighbour on each sequence S ∈ {Sf} that it is a part of, and takes the most stringent of these. Say this limiting fragment on sequence S' is fnew is the most stringent right limit for each sequence S ∈ {Sf}, and this applies also to every fragment to the left of Thus, the sequence labels and limits enforce the consistency conditions continuously: each fragment has a unique label for each sequence it belongs to, and fragment A can only be aligned to fragment B if (a) they belong to no sequences in common and (b) for each sequence When no further local alignments are possible, the result is a set of aligned fragments that can be "assembled" in linear time into a gapped alignment of the original sequences.S1, S2 and S3 are being aligned, there may be a long match between S2 and S3; but S2 may be fragmented due to earlier alignments with S1. So it may be that the match between S2 and S3 will take two or three steps (one fragment at a time) rather than one step. But this is often a gain: because we are now comparing fragments and not entire sequences, the length-dependent significance condition derived in the next section may be much improved by the reduced lengths involved. Thus, the fragmented matches will likely stay as significant as, or even be more significant than, the unfragmented match. Indeed, a match between S2 and S3 which would not be significant with an unfragmented sequence S2 may now become significant. We show in the section on synthetic data that when a random background model is assumed, Sigma does, in fact, typically align a much greater quantity of sequence than DiAlign for similar significance cutoffs, without suffering in terms of erroneous alignments.The apparent drawback here is that if, say, sequences S1 and S2 (respectively of lengths L1 and L2) have a length ℓ, and let there be m mismatches in this substring. The score we use is simply the probability of seeing such an alignment in two random sequences of the given lengths . DiAlign 2 [Let a local alignment of two strings iAlign 2  does thip is the probability of two arbitrary strings of length ℓ (drawn from the same background model) matching to the same degree as the alignment we're considering: that is, having the same number of matching bases, with the bases having similar background probabilities. The value of p is derived below. What we need is the probability of such an alignment appearing anywhere in two sequences of lengths L1 and L2. The local alignment is made only if this probability is smaller than a predefined threshold x (by default 0.02).Let's say not occurring is 1 - p for each possible pair of subsequences of length ℓ. There are L1 - ℓ + 1 such subsequences in sequence S1 and L2 - ℓ + 1 in S2. Thus, the probability of such a match occurring nowhere isThe probability of such an alignment at least one random match of this quality occurring is. The probability of p is small. If p is large, the above will be an overestimate and the match will be rejected if the cutoff threshold x is small, as it is by default.assuming p - K) which is the negative log of the above expression, but says that "K is a constant that depends on the sequence length" whereas for us it depends separately on both lengths L1 and L2 and also on the length ℓ of the local alignment. Also, L1and L2 for us are not the lengths of the original sequences but of the fragments presently being aligned, which may be much shorter, thus greatly improving the significance of a match, as noted in the previous section.DiAlign 2  uses a wp, we use the product, over each matching base, of the background probability of that base, which is preferably a conditional probability reflecting dinucleotide counts in actual sequence. This is important since dinucleotide correlations are known to be significant in DNA, and vary from one species to another. We denote this by pbg. For example, for a string "ACgCAcA" where the base preceding this string was T, we useTo calculate pbg(ACgCAcA) = p(A|T)p(C|A)p(C|G)p(A|C)p(A|C)skipping the factors for the lowercase letters; this is the background probability of this base pattern, with allowed mismatches at the same positions, occurring in actual sequence. . Third, already-aligned sequence fragments may contain "internal" mismatches; presently, any subsequent base aligned with these is automatically treated as a mismatch. There is scope for improvement here.)Ideally, the dinucleotide counts are taken from an auxiliary file given on the command-line. If none is given, dinucleotide counts are extracted from the input file itself, or optionally not used.positions of the m mismatches is really arbitrary: we should multiply the above probability by the number of ways m mismatches can be chosen from ℓ bases. Thus, we have an additional factor of the binomial coefficient Now, the x, the alignment is rejected.  fails. Such high values of x are not recommended.) DiAlign's significance parameter, given by the -thr commandline option, is analogous to - logx.If this is exceeds the threshold Early versions of Sigma experimented with "mismatch penalties" for mismatched bases : otherwise two random sequences can have arbitrarily long matches measured by matching bases alone. But the "entropy correction" for mismatches given by the binomial coefficient solves this problem more cleanly.Unlike DiAlign, Sigma does not give additional weight to alignments that extend across multiple (more than two) sequences. This would be easy to implement but seems unnecessary.L1L2) where L1, L2 are the lengths of the two sequence fragments being aligned. Each pass, moreover, aligns every pair of available sequence fragments. The first pass thus takes O(L2N2) time for N sequences of length L. Subsequent passes, however, align a progressively larger number of sequence fragments that grow shorter in length ; the details are quite dependent on the level of conservation in the sequences being aligned, and the total number of passes would depend on L and N in some way, but O(LpNq) with p and q not much larger than 2, seems to describe the overall time complexity in general for L and N not too large. The data structure is such that the consistency conditions can be updated at each iteration in linear time, O(LN). The "gaps" can be "inserted" into the sequence, prior to output, in linear time too.The time-complexity of the algorithm is hard to estimate exactly, but the major limiting factor is the pairwise local alignment, which is a Smith-Waterman-like dynamic-programming algorithm of O this is probably due to excessive internal fragmentation of the sequence, an issue that will be addressed in the future.The actual running time of Sigma on various datasets, compared to DiAlign and other programs, is discussed further below: Sigma's running time is typically close to DiAlign's, with neither program consistently faster than the other. With much larger datasets (greater than a few tens of kilobases), Sigma's speed appears to drop noticeably faster than O, but also minimise the number of "false positives" (high "specificity"). It may be reasonably argued that sensitivity – that is, predicting the maximum number of actually conserved structural motifs – is the major consideration in protein-alignment programs and specificity is less important. This is emphatically not true for a program aligning non-coding DNA: for example, running a motif-finder on a poor alignment could be disastrous.To have an objective measure of the performance of various programs on data with a known evolutionary history, we focus on synthetic data in this section, but with actual genomic dinucleotide correlations. The next section discusses yeast genomic data, where direct measurement of "correctness" of the alignment is not possible.Together with Sigma, we examine five other programs: ClustalW version 1.83 , T-CoffeBoth Sigma and DiAlign have just one adjustable parameter, the "significance threshold" beyond which local alignments are rejected.  We choose the least stringent threshold that does not erroneously align random sequence: this turns out to be about "-x 0.002" for Sigma (which we have made the default) and "-thr 6.3" for DiAlign (the default is 0.0). The number we choose for DiAlign is roughly the negative log of the number for Sigma, which is appropriate: see the section on scoring above.In addition, Sigma was run both with a correlated background model and with a random background model.All other programs were run with default parameters, specifying that the input is DNA sequence. MLagan requires an input binary tree specifying in what order species are to be paired; this was chosen arbitrarily, since the input data had a "flat" phylogeny  which is not supported by MLagan.N descendants, and each nucleotide was given a conservation rate q . Note that these conservation rates are from the ancestor to the descendant; the conservation rates between two descendants would be lower (q2 rather than q). For example, with our chosen q values of 0.35, 0.45, 0.55 and 0.65, the conservation between two descendants would be 0.1225, 0.2025, 0.3025 and 0.4225 respectively.The synthetic data were generated as follows: first, an ancestral sequence was created with dinucleotide correlations drawn from real DNA sequence, possibly also containing a few embedded "motifs" drawn from "position weight matrices" meant to indicate binding sites for transcription factors, that tend to be conserved under evolution. In other words, nucleotides were laid down with conditional probabilities on the previous nucleotides, and weight matrices were laid down with a small probability; the process can be described by a hidden Markov model. This ancestral sequence was then evolved into N descendants, not the ancestor.The binding sites were assumed to be conserved ; thus, if a base inside a "motif" mutated, the new base was drawn from the weight matrix representing that motif , while if a background base mutated, the new base was drawn from the background model with a conditional (dinucleotide) probability based on the preceding base. These are precisely the assumptions made by PhyloGibbs for real data, and are justified in greater detail in ,12. The S. cerevisiae), and background dinucleotide frequencies drawn from the complete genome of the malaria parasite Plasmodium falciparum. These genomic data are publicly available. The Plasmodium genome was picked as an extreme test case: it has an extraordinary bias to the A and T nucleotides (by far the most of any sequenced organism to date [Three possibilities were considered for the background model: a completely random background (each base having probability 0.25), background dinucleotide frequencies drawn from non-coding DNA in yeast ( to date ) and strTwo further possibilities were used: plain featureless background sequence, and background sequence containing five different embedded motifs, roughly equally spaced, each of length 10 with a weight matrix "polarization" (largest element in each column) of 0.8. The motifs would act as "anchors" of strongly conserved sequence that, as we see below, help programs align the remaining sequence better.N, was taken to be 3,6,9. For each choice of all these parameters, ten runs were averaged.Sequences of length 1000 bases were generated.  The number of sequences aligned, (q = 0.35 or 0.45), ClustalW, MLagan and T-Coffee – which are all based on Needleman-Wunsch-type approaches, with gap penalties and gap-extension penalties – align far too much sequence erroneously. Changing the gap penalties either had no significant effect, or had other problems such as excessively-fragmented alignments. Perhaps a non-default substitution matrix would improve things, but in our opinion, Needleman-Wunsch-type approaches are not well suited for the problem of non-coding DNA, where large regions may be well conserved but equally large regions may show no conservation at all.The results on the "typical" case of yeast-like correlations are laid out in detail in Tables Align-m, on the other hand, aligns remarkably little sequence erroneously; for weakly conserved sequence it shows improved sensitivity over Sigma and DiAlign (but has a somewhat higher error rate than Sigma), and does vastly better than ClustalW, MLagan and T-Coffee in terms of error rate. Its main drawbacks are its running time and its memory consumption, which are an order of magnitude more than other programs and rise sharply with the number of sequences being aligned.q = 0.55 Sigma and DiAlign continue to have a lower sensitivity than the other programs, but Sigma also has a much lower error rate. At q = 0.65, all programs show high sensitivity (DiAlign's is noticeably lower than the rest) and low error rates .At This is seen even more sharply with the highly-correlated plasmodium-like numbers, presented in brief in table Embedding a few highly-conserved weight matrices , which is an important criterion for us.q ≈ 0.65 or more) the difference between various algorithms is marginal, but with weak or intermediate conservation Sigma, DiAlign and Align-m all make significantly fewer erroneous alignments than other algorithms; and of these, Sigma generally shows better sensitivity than DiAlign, and a lower error rate than either DiAlign or Align-m .In summary, on synthetic data, with strong conservation  when some highly-conserved "motifs" are embedded in a poorly-conserved background. Other programs, too, improve in performance, but not as sharply.The poor sensitivity of Sigma on weakly-conserved sequence  suggests that it is a very hard problem to accurately align uniformly-diverged non-coding DNA. In real life, however, regions of well-conserved DNA may be interspersed with regions of poorly-conserved DNA. Here, we would be helped by Sigma's approach of using only the length of the fragments being aligned to judge the significance of an alignment. Table Benchmarks of any kind must always be viewed with some skepticism. The most realistic head-to-head comparison here is with DiAlign, and this comparison most clearly shows the improvements from Sigma's algorithm and scoring in specificity and error rate. It is possible that, with fine-tuning of parameters, other programs may perform much better than shown here.It is of great interest to measure the performance of different alignment programs on real genomic data, but the problem is that we don't know the "correct" answer. In protein sequence, structural information may give clues to what sequence is likely to have been phylogenetically conserved. Non-coding sequence evolves much faster, and binding sites are known not always to be conserved-instead, they tend to come and go, at least in yeast and drosophila ,22. HoweWe use a database, the Saccharomyces cerevisiae promoter database (SCPD) , that doS. cerevisiae and, where available, orthologues from (in order of closeness to S. cerevisiae) S. paradoxus [S. mikatae, S. kudriavzveii and S. bayanus [inputfile -o outputfile -t trackingfile -m 10 -N 1 -F backgroundfile -I 3,3,3, which means that it assumes phylogenetic alignment of the input sequences with uniform proximity 0.5, a dinucleotide background model extracted from the file backgroundfile, and an initial guess of three different transcription factors each having three (possibly multi-species) binding sites, each site 10 bases long. These are the same parameters used and explained further in [Regulatory regions for these genes from aradoxus , S. mika bayanus  were use bayanus . The binrther in .t (between 0 and 1) indicating its probability of being a genuine motif. As a function of t, there are two quantities of interest to us: the number of predictions of PhyloGibbs that are documented binding sites in S. cerevisiae (predictions in other species are ignored for this purpose), and the ratio of these to the total number of predictions. These may be taken as a measure of the sensitivity and specificity, respectively, of PhyloGibbs. Since the SCPD data is far from exhaustive, these numbers must be taken only as indicative trends: the "false positive" rate cannot really be measured. Further discussion is in the PhyloGibbs paper [PhyloGibbs uses a two-stage process of motif-finding, a simulated anneal to find the "best answer" followed by Markov-chain Monte-Carlo sampling of the entire configuration space and statistical "tracking" to find the "significance" of the answer . It thus assigns to each reported binding site a "tracking score" bs paper .Of these, the specificity is more relevant: by increasing the total number of predictions, the sensitivity can always be increased, to a point where predictions are meaningless. Moreover, the sensitivity here is of PhyloGibbs's predictions and not of the input alignments; this is hard to interpret, whereas one may reasonably argue that high specificity in PhyloGibbs predictions indicates more generally correct alignments.The results are plotted in figures Figure The results on the yeast data are similar except that DiAlign is slightly faster than Sigma, while AlignM is almost twice as slow as T-Coffee. The total running times for the alignment programs in seconds, for aligning 184 gene promoters for which at least three orthologous sequences existed (a requirement for AlignM), were - AlignM: 1850.2; ClustalW: 168.21; DiAlign: 255.52; MLagan: 430.7; Sigma: 266.5; T-Coffee: 646.45.Thus, on data sets of this size, Sigma's speed is competitive with three of the other five programs studied, and significantly better than the remaining two, without compromising on accuracy and sensitivity.http://caml.inria.fr). Nevertheless, it is already a fully-functional tool competitive with or superior to other programs in speed and accuracy, and substantial improvements in both respects may be possible. However, the present version is intended to be a starting point for more challenging tasks, some of which are in progress.The present implementation of Sigma focuses on programming simplicity rather than speed—the complete source code, excluding comments, totals under 1000 lines in Objective Caml  based on a multiple alignment, but uses the information thus obtained to in turn improve the multiple alignment. Such an approach may have far more success both in aligning weakly-conserved sequence and in predicting functional sites in that sequence, but would also be far more complex than either a stand-alone sequence-alignment program or a stand-alone motif-finder.A general assumption in multiple-alignment algorithms is that synteny is preserved among the aligned pieces. This assumption, quite reasonable for most proteins, grows progressively more dubious for longer stretches of non-coding DNA and it may be desirable to relax it in a controlled manner (the problem would be the hugely increased "search space" of possible matches).Thus, the hope is that Sigma can be significantly improved and extended in the future, and interfaced with other tools such as motif-finders and module-prediction programs.Project name: SigmaProject home page: http://www.imsc.res.in/~rsidd/sigma/Operating systems: Binaries for Linux and Windows available; source may be compiled on any system supported by Objective CamlProgramming language: Objective Caml (version 3.x)Other requirements: NoneLicence: GNU GPLAny restrictions to use by non-academics: NoneThe author(s) declares that they have no competing interests.


Multiple sequence alignment (MSA) is a useful tool in bioinformatics. Although many MSA algorithms have been developed, there is still room for improvement in accuracy and speed. In the alignment of a family of protein sequences, global MSA algorithms perform better than local ones in many cases, while local ones perform better than global ones when some sequences have long insertions or deletions (indels) relative to others. Many recent leading MSA algorithms have incorporated pairwise alignment information obtained from a mixture of sources into their scoring system to improve accuracy of alignment containing long indels.We propose a novel group-to-group sequence alignment algorithm that uses a piecewise linear gap cost. We developed a program called PRIME, which employs our proposed algorithm to optimize the well-defined sum-of-pairs score. PRIME stands for Profile-based Randomized Iteration MEthod. We evaluated PRIME and some recent MSA programs using BAliBASE version 3.0 and PREFAB version 4.0 benchmarks. The results of benchmark tests showed that PRIME can construct accurate alignments comparable to the most accurate programs currently available, including L-INS-i of MAFFT, ProbCons, and T-Coffee..PRIME enables users to construct accurate alignments without having to employ pairwise alignment information. PRIME is available at  In fact, even when a sum-of-pairs (SP) score with the simplest gap cost is used as an objective function, computation of optimal MSA is an NP-hard problem [Multiple sequence alignment (MSA) is a useful tool for elucidating the relationships among function, evolution, sequence, and structure of biological macromolecules such as genes and proteins -3. Altho problem . Hence,  problem -7 or an  problem -10 heuriThe group-to-group sequence alignment algorithm is a straightforward extension of the pairwise sequence alignment algorithm, and is the core of progressive and iterative methods. The essential difference of group-to-group sequence alignment from pairwise sequence alignment is the existence of gaps within each group of prealigned sequences. The gap opening penalty used in an affine gap cost disrupts the independence between adjacent columns, and hence calculating the optimal alignment between two groups with respect to the SP score was shown to be NP-complete . Gotoh wSeveral studies have discussed the tendency that global alignment methods perform better than local ones ,14. HoweL linear functions. Depending on the gap length, this gap cost varies its inclination, which corresponds to the gap extension penalty. However, in the case of group-to-group sequence alignment algorithm, it is difficult to calculate the proper gap extension penalty with only the data structures used in the previous algorithm that were designed to detect the opening of new gaps [In this paper, we propose a novel group-to-group sequence alignment algorithm with a piecewise linear gap cost , which inew gaps ,19. AccoPRIME stands for Profile-based Randomized Iteration MEthod. As a result of benchmark tests, the accuracy of our method is shown to be comparable to the most accurate methods available today, all of which incorporate pairwise alignment information obtained from all-by-all pairwise alignment. This implies that the piecewise linear gap cost is as effective as pairwise alignment information in improving the alignment accuracy of sequences, some of which have long indels.In this section, we first review the previous group-to-group sequence alignment algorithm with an affine gap cost ,19, and A and B denote prealigned groups of sequences. A includes m rows, and B, n rows. The respective lengths of A and B are I and J. Ap, ai, and ap,i denote the p-th row of A, the i-th column of A and the i-th residue of Ap, respectively. Bq, bj, and bq,j are defined similarly. Both ap,i and bq,j belong to Σ*. Note that any column of a group must not be a null column, which consists of nulls only. If all nulls are removed from a group, each row is an usual sequence. A run of consecutive nulls in a row is called a gap. A gap length is the number of nulls constituting the gap. A segment of A that consists of consecutive columns as to at is denoted by A; A is also expressed as A. s is a substitution score between residues a and b. By g(x), we mean a gap cost function of gap length x. The pair weight between the p-th sequence in A and the q-th sequence in B is wp,q. If the three-way method [wp,q can be factorized as p-th sequence in A and the q-th one in B, respectively.The definitions of symbols are as follows. Let Σ be the residue set and |Σ|, the number of elements in Σ. Σ* denotes the set containing a null and each element in Σ. A null means that a residue of one sequence does not aligned with that of another sequence when aligning sequences, and is denoted by the symbol '-'. y method  is used The previous group-to-group sequence alignment algorithm that optimizes SP or weighted SP score with an affine gap cost is based on a two-dimensional DP method . The keyAnother important feature of this algorithm is the candidate list paradigm, which is a variant of branch-and-bound methods. Because the calculation of gap opening penalties depends on a previous partial DP path, simple extension of pairwise sequence alignment algorithm may not yield globally optimal alignment between two groups . For rigg(x) = -(ux + v), where u(> 0) and v(> 0) are constants called gap extension penalty and gap opening penalty, respectively. The group-to-group sequence alignment algorithm with the affine gap cost employs essentially the same recurrent relations as the pairwise sequence alignment algorithm [i, j), of the DP matrix: i, j). ai and bj are aligned. ai and bj are aligned with null columns, respectively. The recurrent equations are:Let an affine gap cost function be lgorithm , with exA and B·S is responsible for the calculation of substitution scores and gap extension penalties:where '-' denotes a null column, and a or b is a null, s = -u, and if both a and b are null, s = 0. G and B on γ represents whether a gap opens with respect to a pair of rows. Specifically, if a is a residue, x ≥ y, and b is a null; or if a is a null, x ≤ y, and b is a residue; then γ = 1. Otherwise, γ = 0. In order to evaluate exact gap openings for calculation of each ap,i is a null, d = arg maxk≤3 1≤{O(mn) computational steps, these steps can be reduced by using a generalized profile [S, while the static gap profile vectors are necessary to calculate G is calculated byWith the frequency and residue profile vectors, r (including null) on column ai, and residue profile O(|Σ*|), because each frequency and residue profile vector consists of |Σ*| values. When m × n is sufficiently large, the computation time can be considerably reduced. Although S is easy to calculate, the profile-based calculation of G} where g is the gap state of previous column ck-1 and f is the weighted frequency of the occurrence of rows whose element on ck is either a residue or null depending on g, f+), f+ represents the weighted frequency of the occurrence of rows whose gap states are not less than g. For the example shown in Figure Static gap states are compactly represented as a static gap profile. A static gap profile is obtained by gathering static gap states with the same values at a column. More specifically, the static gap profile at a column s, d), where s is the length of a static gap and d is the summed length of dynamic gaps inserted within or after the static gap. Let A) be the gap mediation profile of group A at the DP node ·A) follows a recurrent relation, the initial condition of which is A) = {}. We first consider the case where ai and bj are aligned. For each  in s, d) in A) such that g = s, then  ∈ A). In the case where bj is aligned with a null column, then  ∈ A) where  is an element in A) or A) depending on the maximum operation of equation 4. If ai is aligned with a null column, A) equals A) or A). In the case of Figure A) = {, , } is derived from A) = {, , }. The other gap mediation profile vectors are constructed in a similar way.Like a static gap profile, a running gap profile can represent running gap states compactly. In order to obtain a running gap profile, another data structure called a gap mediation profile is required. A gap mediation profile is defined for each path in the DP process, and records the total number of dynamic nulls inserted into static gaps that are currently open. Each element of the gap mediation profile is expressed as (A), and static gap profiles g, f+) in s, d) is chosen from A) such that g = s, and then  ∈ A) and Running gap profile vectors Using running gap profile vectors S • E+ is expressed assp and p-th and q-th elements in S and E+, respectively, and f(e) is the weighted frequency of element e. q is chosen such that the gap state of E+ whose gap states are not less than that of sk. Calculation of S • E+ requires O(|S|) + |E+|), and hence G. Using equation 8 instead of equation 6 can reduce computation from O(mn) to O(m + n) even in the worst case where gap states on a column are mutually different.where S and G to G and vl+1 > vl(> 0). When L = 1, this cost is the same as the affine gap cost. This cost could alleviate over-penalizing long indels, because the inclination of g(x), which corresponds to a gap extension penalty, ul, becomes small as gap length increases. In other words, this cost calculates gap extension penalties based on gap length. For the sake of simplicity, we restricted our attention to the case of L = 2. Then, g(x) = -(u1x + v1) if x ≤ xc or g(x) = -(u2x + v2), otherwise, xc = ⌊(v2 - v1)/(u1 - u2)⌋ is called the critical gap length.where S in order to use the piecewise linear gap cost. Therefore, S is expressed as:As mentioned above, the calculation of gap extension penalties must be separated from the calculation of the substitution score where G, where F1 = F2 = In the previous algorithm with an affine gap cost, A called 'relevant segment', A in this example. Second, the two nulls on B1 at columns b5 and b11 are aligned with two separate dynamic gaps inserted into A. The first observation suggests that F1 and F2 for any segment may be calculated before the DP process. However, the second observation indicates that the number of null columns of dynamic gaps aligned with static nulls on a target gap must be subtracted from the gap state of the target gap for correct assignment of the relevant segment; without this subtraction, the relevant segment would be assigned as A in the above example.This example indicates two important points for the exact calculation of gap extension penalty. First, each gap length is obtained by counting the residues on each row of a specific range in ai are aligned with a null of a target gap on bj whose gap state is g. We define F0(ai) as the weighted fraction of nulls on ai: δ = 1 if a = b, otherwise, δ = 0, and '-' denotes a null. F0(ai) is the same as the null component of the frequency profile at ai, i.e. F0(ai) = F1 as the sum of weights of sequences {Ap} such that ap,i ≠ '-' and the number of residues within segment A aligned with the target gap is less than or equal to xc: ap, i, g) = 1 if the number of residues on the p-th row of A is less than or equal to xc, otherwise, Δ = 0. Specifically, if ap, i, g) = 1, otherwise, Δ = 0. Likewise, F2 is defined as the sum of weights of sequences {Ap} such that ap,i ≠ '-' and the number of residues within A aligned with the target gap is greater than xc. Obviously,We initially consider the first point, neglecting the presence of dynamic gaps for a moment. Without loss of generality, we assume that the residues on F0(ai)+ F1 + F2 = 1.     (11)g and g' (0 ≤ g <g' ≤ i) such that F1 = F1, we need to store only distinct F1 values, the number of which is at most the number of rows of A, m. For actual calculations, we use an 'insertion length profile' associated with each column of a group. An insertion length profile of column ai, i - gk + 1, F1)}, where gk is a maximum gap state such that F1 = F1 for gk ≤ g' <gk+1. Information about F2 does not need to be recorded, because it can be easily derived from F0(ai) and Because there may exist gap states g - s, where g is the gap state of the target gap and s is the number of dynamic null columns to be removed for correct assignment of the relevant segment. For example, dynamic null columns aligned with b5 and b11 in Figure p, l), where p and l indicate the position and the length of a dynamic gap, respectively. For efficiency, the dynamic gap information list {} is sorted in order of pk. The dynamic gap information of group A at , A), is recurrently calculated as follows. When ai and bj are aligned, A) is simply copied from A). Similarly, when ai is aligned with a null column, A) is copied from A) or A) depending on the maximum operation of recurrent equation 3. When bj is aligned with a null column, A) is first copied from A) or A), and then a new element is added to it or its last element is modified. Specifically, if the last element of A) is , it is modified to . Otherwise, a new element  is added to A). The other dynamic gap information lists are obtained in a similar way.The second point raises the key problem: how to determine the 'tailored gap state' of the target gap, A) and gap mediation profile A) contain information on dynamic gaps from different viewpoints. The information held in dynamic gap information is relevant to the group aligned with a gap in question (group A in the present example), while that maintained in a gap mediation profile is relevant to the group containing the gap (group B in the above example). In addition, each element of A) refers to a single dynamic gap, while that of A) records the total length of separate dynamic gaps inserted within or after a static gap. In the case of Figure A) = {, , } indicates the dynamic gaps of lengths 1, 2, and 1 inserted before column a1, after a2, and after a7, respectively, while that of A) = {, ,  } means the total length of dynamic gaps inserted after the last non-null residue within or before the present column in A1 or A4, A3, and A2, respectively.It is worth mentioning that dynamic gap information Di, j(A) = {} and a gap state g, we can easily derive the tailored gap state s denotes the total number of dynamic gap columns to be removed and tk indicates the distance in the reverse direction from the current position i to the start position of the k-th dynamic gap inserted into A:Given a dynamic gap information list Algorithm getTailoredGapState, g)s ← 01. k ← |Di,j(A)| down to 12. for tk ← s + i - pk+ lk(a) tk ≤ g, then s ← s + lk(b) if tk - lk <g, then s ← s + g - (tk - lk)(c) else if tk ≥ g, then return g - s(d) if g - s3. retrun The gap extension penalty for the target gap is then obtained bywB{u1·F1, gh)(a) u ← u + fh{u1·F1 u3. return gh, fh) is the h-th element of O|·|bj are aligned with gaps on ai in a similar way.where  Divide the alignment into two groups based on a randomly chosen branch of the tree(b) Align these two groups using a group-to-group sequence alignment algorithm(c) Repeat steps 4a to 4b until no better weighted SP score is obtained5. Repeat steps 1 to 4 until the weighted SP score of the alignment does not improve anymore at step 4We developed a program called PRIME (Profile-based Randomized Iteration Method). PRIME is written in ISO standard C++, implementing the doubly nested randomized iterative strategy similar to our previous MSA program, Prrn . Howeverpiecewise and PSAaffine. PSApiecewise and PSAaffine use the piecewise linear gap cost and the affine gap cost, respectively.To evaluate the performance of PRIME and other MSA programs shown in Table BAliBASE is categorized into five references according to the nature of sequences to be aligned Table . ReferenSPS) is defined as the proportion of correctly aligned residue pairs:To evaluate alignment accuracy based on BAliBASE, we use sum-of-pairs and column scores . The sumI and J are the number of columns of test and reference alignments, respectively. where ami and ani of the test alignment also exists in the reference alignment, Pi = 1. Otherwise, pi = 0. j of the reference alignment. The column score (CS) represents the proportion of correctly aligned columns:If aligned residue pair i-th column of the reference alignment, ci = 1.If the column of the test alignment is identical to the ci = 0.Otherwise, PREFAB is another MSA benchmark. Each alignment of PREFAB is generated automatically, while that of BAliBASE is constructed by human expertise. PREFAB consists of three data sets: main, long gap, and weighting sets. The main set corresponds to the previous PREFAB version 3.0, which is not categorized unlike BAliBASE. Each alignment of the long gap set, a subset of the main set, contains one or more gaps whose lengths are more than 10. The weighting set involves alignments each of which includes more sequences of one sub-family than that of the other sub-families. Whereas each reference alignment of BAliBASE is provided as an MSA, each reference alignment of PREFAB is provided as a pairwise alignment of a pair of PDB sequences of known structures.QS) is the ratio of correctly aligned residue pairs of the reference pairwise alignment: J is the number of residue pairs in the reference alignment. If the residue pair of the test alignment is also aligned in the reference alignment, pi = 1. Otherwise, pi = 0. Note that if the reference alignment is pairwise alignment, quality score, sum-of-pairs score, and column score have the same value.For alignment evaluation of PREFAB, the quality score is employed, which measures only two PDB sequences within each alignment. The quality score . One of the reasons is that the current PRIME does not use any heuristics, such as anchoring or grouping method used in Prrn, for reducing the computation. To improve calculation speed of PRIME without a loss of accuracy, we are attempting to incorporate these heuristics. To further improve alignment accuracy, we will investigate several problems including the conditions under which PRIMEProject name: PRIME projectProject home page: Operating system(s): Platform independentProgramming language: C++Licence: GNU GPL version 2 or laterAny restrictions to use by non-academics: NoneSY devised the proposed algorithms, implemented PRIME, carried out the benchmark test and its evaluation, and drafted the manuscript. OG conceived of the study, devised the proposed algorithms, helped to implement PRIME, and drafted the manuscript. HY participated in the design and coordination of the study, and helped to implement PRIME. All authors read and approved the final manuscript.PRIME source code. This tar.gz archive includes the source files of PRIME. To compile PRIME, one can check 'INSTALL' and 'Makefile' in the archive. Although 'Makefile' basically assumes GNU make and g+ +, another compiler can be used with a few modification of 'Makefile'.Click here for filep-values of the Friedman test of full length set. Each value is p-value of the Friedman test, indicating the significance of a difference in performance between programs of a row and a column. The upper right and lower left p-values are calculated using sum-of-pairs and column scores on all alignments of the whole full length set, respectively. PRIMEpcw denotes PRIMEpiecewise, and PRIMEafn, PRIMEaffine. The respective signs + and - denote that a program of a row performs significantly better and worse than that of a column.Click here for filep-values of the Friedman test of homologous region set. Each value is p-value of the Friedman test, indicating the significance of a difference in performance between programs of a row and a column. The upper right and lower left p-values are calculated using sum-of-pairs and column scores on all alignments of the whole homologous region set, respectively. PRIMEpcw denotes PRIMEpiecewise, and PRIMEafn, PRIMEaffine. The respective signs + and - denote that a program of a row performs significantly better and worse than that of a column.Click here for file


Pairwise stochastic context-free grammars (Pair SCFGs) are powerful tools for evolutionary analysis of RNA, including simultaneous RNA sequence alignment and secondary structure prediction, but the associated algorithms are intensive in both CPU and memory usage. The same problem is faced by other RNA alignment-and-folding algorithms based on Sankoff's 1985 algorithm. It is therefore desirable to constrain such algorithms, by pre-processing the sequences and using this first pass to limit the range of structures and/or alignments that can be considered.We demonstrate how flexible classes of constraint can be imposed, greatly reducing the computational costs while maintaining a high quality of structural homology prediction. Any score-attributed context-free grammar  is amenable to this treatment. It is now possible to combine independent structural and alignment constraints of unprecedented general flexibility in Pair SCFG alignment algorithms. We outline several applications to the bioinformatics of RNA sequence and structure, including Waterman-Eggert N-best alignments and progressive multiple alignment. We evaluate the performance of the algorithm on test examples from the RFAM database.A program, Stemloc, that implements these algorithms for efficient RNA sequence alignment and structure prediction is available under the GNU General Public License. As our acquaintance with RNA's diverse functional repertoire develops -5, so doMany programs for comparative analysis of RNA require the sequences to be prealigned -9. This et al  for an array of N probability parameters normalized so that . It is also convenient to introduce some notation for ungapped sequences at this stage. Let X, Y ∈ Ω* denote ungapped RNA sequences, including (possibly) the empty string ε. Let Xi be the i'th symbol of X , let Xij denote the subsequence from Xi+1 to Xj inclusive, or the empty string if i = j  and let |X| denote the length of X.Table  is a probabilistic model for deriving sequences X, Y from a single nonterminal. This derivation proceeds as follows: start with an initial sequence containing one starting nonterminal, S, then repeatedly apply probabilistically-sampled transformations to the nonterminals in the sequence. Eventually the sequence will contain only terminals from Ψ. This process generates a parse tree, rooted at node S, in which internal nodes are labeled with nonterminals and leaf nodes with terminals, with children of each node ordered left-to-right  starting from nonterminal W. We will refer to this subsequence-pair  as the inside sequence-pair of W.The grammar t Figure . Sequencparse tree likelihood is the product of all the rule probabilities corresponding to the internal nodes. Summing the likelihoods of all parse trees rooted in state S and generating sequences X, Y, one obtains P, the sequence likelihood. This sum can be performed efficiently by the Inside algorithm, as will be described below.The The following section describes the constrained and unconstrained dynamic programming (DP) algorithms used for Pair SCFGs.P by recursive decomposition via intermediate probabilities  ≡ P. In RNA normal form, the time-limiting step in the Inside algorithm involves summing contributions to  from bifurcation rules of the form U → VW, such that the bifurcation splits the two sequences  between bases  and The Inside algorithm  computes An asymptotically faster step involves summing contributions from matching emission rules of the form A is the ungapped version of A'. Thus |A| = 0 ⇔ A = ε ⇔ A' =  and similarly for B, C and D.) = Q1 + Q2U → ε, if and only if the subsequences  are emptyTermination of the recursion is provided by matching end rules,  = (U → ε)The sequence likelihood is obtained asP ≡ In pseudocode, the Inside algorithm isX, Y, S, • Inputs: i = |X| to 0 (descending)• For j = i to |X|    • For k = |Y| to 0 (descending)       • For l = k to |Y|          • For U ∈ ε       • For each nonterminal Q1 ← 0; calculate Q2          • Set m = i to j          • For n = k to l             • For QB and add to Q1                • Calculate  and store          • Calculate • Return QB) involves six indices  and the time complexity of the full recursion is O(|X|3|Y|3). However, the stored intermediate probabilities involve only four indices  and so the memory complexity is O(|X|2|Y|2).The time-limiting step of the Inside algorithm (computing the Q2) account for homologous base-pairings between residues  and , or unpaired residues at Xi, Xj, Yk or Yl. This may also imply that Xi and Yk are aligned, or that Xj and Yl are ) account for conserved multiloop structures in the RNA, i.e. one homology between substructures Xim and Ykn and another between substructures Xmj and Ynl  RNA-folding method) and identify likely base-pairs  or , and/or likely unpaired nucleotides Xi or Yk. Even simpler, we could simply throw out basepairs  between distant residues (i.e. where j - i exceeds some cutoff) Alternatively, we might want to pre-align the sequences  alignment method) and identify likely alignment columns  and/or likely indels Xi or Yk. Again, more simply, we could simply exclude columns  for which |k - i| is too large.The high time and memory cost of the Inside and related algorithms motivate the development of slimmer, faster versions. To begin with, we impose constraints that narrow the search space. For example, we might want to pre-parse the sequences individually  = P = 0 unless the following conditions are satisfiedWe can combine these various strategies into a generalized constraint on base-pairs, alignment-columns or both. We stipulate that  and  are sets of permissible co-ordinates for structurally discrete subsequences in X and Y. Fold-related features (basepairs and unpaired residues) can be included or excluded by this set, and so we refer to it as a fold envelope [ is a set of possible cut-points in the alignment of X and Y, and is referred to as an alignment envelope [Here envelope . The setenvelope . Both tyIf equality holds in all three cases, then we recover the unconstrained Inside algorithm.i, j, k, l) for the cutpoints and subsequences lie between residues of X and Y.Note that the co-ordinates (X| + 1)(|Y| + 1) cutpoints in the maximal alignment envelope  and (|X| + 1)(|X| + 2) subsequences in the maximal fold envelope .There are  of radically different lengths, i.e. for which |(j - i) - (k - l)| exceeds some cutoff. This constraint is employed by the FOLDALIGN program. It is not expressible as a combination of independent alignment and fold constraints, and has not been implemented for the present work, though it would be relatively straightforward to combine it with the other constraints described here [The constraints given here allow the independent imposition of alignment or fold constraints. One can imagine further, even more general constraints. For example, one could exclude subsequence-pairs . This is achieved by pre-indexing the fold envelopes ,  and the alignment envelope  so that we can quickly locate valid co-ordinates . The following is pseudocode for the algorithm with the redesigned iteratorSimply setting some intermediate probabilities to zero is not sufficient to accelerate the Inside algorithm. We also need to redesign the iteration to avoid visiting zero-probability subsequence-pairs • For j satisfying  ∈  (ascending) (†)    • For each k satisfying  ∈  (descending) (†)       • For each l satisfying  ∈  (ascending) (†)          • For each j, l) ∈  then             • If , } ⊂  (†)                   • For each n satisfying {, } ⊂  (†)                      • For each m, n) ∈  then                         • If  and add to Q1                            • Calculate  and store                   • Calculate • Return ,  and  can be precomputed for speed.(†) These ordered subsets of Alternative designs for the algorithm are possible, and indeed different circumstances may affect the choice of optimal design (e.g. depending on which envelopes are most constrained). using a five-dimensional array indexed by U, i, j, k and l. To get the most benefit out of imposing constraints, it is necessary to replace this multidimensional array with an efficiently-indexed reduced-space container.Memory is the most prohibitively expensive resource demand of the Inside algorithm. In its simplest form, the algorithm stores the intermediate probabilities O(N)-storage and O(N log N) access-times, such as balanced search trees [U, i, j, k, l).This design decision involves a close trade-off between CPU and memory usage. Initially, we tested various combinations of generic containers with ch trees . These w, we precompute and sort the list  = {} ⊆  of subsequences starting at each position i. For each subsequence  ∈ , let  be its rank in . These  are also precomputed and stored. Similar precomputed sets  and ranks  are stored for .For fold envelope Our DP matrix then uses an inner two-dimensional array nested inside an outer two-dimensional array.X|, |Y|) and is indexed by . The inner array has dimensions  and is indexed by . Cells of this inner array are further sub-indexed by nonterminal U using a standard fixed-length array, yielding .The outer array has dimensions " in all formulae . The entries of the DP matrix, , represent the maximum likelihood of any parse tree for . A recursive/stack-based traceback algorithm can be used to recover this parse tree, beginning from subsequence  =   or  = argmax   [The Cocke-Younger-Kasami (CYK) dynamic programming algorithm  is relatignment) .The Outside and KYC algorithms widen the applications of probabilistic inference with SCFGs. The Outside algorithm, together with the Inside, can be used to recover posterior probabilities of given basepairs/columns, which can be used as alignment reliability indicators or as update counts in Expectation Maximization parameter training ,26. The These algorithms use dynamic programming recursions that are related to Inside and CYK. The Outside algorithm calculates intermediate probabilities of the form = PS and ending in V without having yet generated sequences Xij and Ykl. Then, for example, the posterior probability that some node V in the parse tree has inside sequence-pair  isrepresenting the sum-over-probabilities of all partial parse trees rooted at  are found using similar recursions (see below), but with all sums "p + q" replaced by maxima "max". The CYK and KYC DP matrices can be used to find the maximum likelihood of any parse tree containing a node V with inside sequence-pair : this maximum likelihood is  . A recursive/stack-based traceback algorithm can be used to find the parse tree with this maximum likelihood.As CYK is related to Inside, the KYC algorithm is related to the Outside algorithm: the intermediate probabilities  from various matching production rules. In contrast to the Inside algorithm, the nonterminal V that indexes  (...) must now be matched on the right-hand-side, not the left-hand-side, of these production rules. We first consider bifurcations from a source nonterminal U that adjoin adjacent subsequences to left (U → WV) or right (U → VW), so that the inside sequence-pairs for U are (respectively)  or As with the Inside algorithm, we sum contributions to , again representing transitions as the special case A' = B' = C' = D' = Next we consider emission rules, The intermediate Outside probabilities are thus =  +  = 1 (Termination condition) are needed to compute the Outside probabilities. We supply the Inside matrix, I, as an input to the Outside algorithm .Note that the Inside probabilities Xij, Ykl) is enclosed by subsequence-pair OUTER =  . Then the Inside iterator visits INNER before OUTER, whereas the Outside iterator visits OUTER before INNER. The order in which the Outside iterator visits nonterminals is topologically forward-sorted with respect to the grammar's transition-rule graph (i.e. the reverse of the order used by the Inside iterator).In terms of the underlying iteration, the key difference between the Inside and Outside algorithms is as follows. Suppose subsequence-pair INNER = • Initialize i = 0 to |X| (ascending)• For j satisfying  ∈  (descending) (†)    • For each k satisfying  ∈  (ascending) (†)       • For each l satisfying  ∈  (descending) (†)          • For each j, l) ∈  then             • If (U ∈ Φ (reverse order)                • For each nonterminal  ← 0; calculate                    • Set m satisfying {, } ⊂  (†)                   • For each n satisfying {, } ⊂  (†)                      • For each m, n) ∈  then                         • If  and add to                             • Calculate m satisfying {, } ⊂  (†)                   • For each n satisfying {, } ⊂  (†)                      • For each m, n) ∈  then                         • If  and add to                             • Calculate  and store                   • Calculate ,  and  can be precomputed for speed.(†) These ordered subsets of The reduced-space dynamic programming matrix that was developed above for the constrained Inside algorithm can be re-used for the constrained Outside algorithm.The above-described algorithms were implemented in the C++ dart library. One dart program in particular, stemloc, is an efficient general-purpose RNA multiple-sequence alignment program that can be flexibly controlled by the user from the Unix command line, including re-estimation of parameters from training data as well as a broad range of alignment functions.The dart libraries provide Inside, Outside, CYK, KYC, traceback and training algorithms for any pairwise SCFG in RNA normal form, whose rule probabilities can be expressed as algebraic expressions of some set of probability parameters . The operator-overloading features of C++ are utilized in full, so that the syntax of initializing a grammar object involves very few function calls and is essentially declarative.dart source code releases can be downloaded under the terms of the GNU Public License, from the following URL The grammars and algorithms described in this paper specifically refer to release 0.2 of the dart package, dated October 2004 .fold/alignment envelopes. This section offers a non-exhaustive list of possible strategies for choosing appropriate single-sequence SCFG/pair HMM that models RNA folding/primary sequence alignment. Compute posterior probabilities of subsequences/cutpoints using the Inside-Outside/Forward-Backward algorithm for some single-sequence SCFG/pair HMM that models RNA folding/primary sequence alignment. Select all subsequences/cutpoints with posterior probability above some threshold (or select e.g. the top 10 percentile of the posterior probabability distribution). Ensure that each of these subsequences/cutpoints is on a valid traceback path, e.g. by running the CYK-KYC/Viterbi-forward-backward algorithm to find the maximum-likelihood traceback path from any given subsequence/cutpoint. Take the union of all subsequences/cutpoints on these traceback paths to obtain the required envelope.• Choose some appropriately simplified grammar, such as a single-sequence SCFG/pair HMM that models RNA folding /primary sequence alignment. Compute the maximum traceback path-likelihood from all subsequences/cutpoints using the CYK-KYC/Viterbi-forward-backward algorithm for this grammar. Select all subsequences/cutpoints with maximum traceback likelihood above some threshold (or select e.g. the top 10 percentile of the max-traceback likelihood distribution) and do a traceback from each such cell. Take the union of all subsequences/cutpoints on these traceback paths to obtain the required envelope.• As above, choose some appropriate single-sequence SCFG/pair HMM that models RNA folding /primary sequence alignment. Sample some number of RNA structures /pairwise alignments using the Inside/Forward algorithm with stochastic traceback. Take the union of all subsequences/cutpoints on these traceback paths to obtain the required envelope.• As above, choose some appropriate The latter two strategies have been implemented in the stemloc package described below. Empirically, the stochastic strategy appears to be less reliable than the deterministic strategies .A heuristic algorithm for performing multiple alignment-and-folding of RNA sequences with a pairwise SCFG by progressive single-linkage clustering runs as follows• Start by making pairwise alignments (with predicted secondary structures) for all pairs of input sequences.with their predicted secondary structures. This highest-scoring pair is called the seed alignment.• Mark the highest-scoring pair, and extract the two marked sequences • While some sequences remain unmarked:    • For each newly-marked sequence:with a fold envelope constrained by its predicted structure, to each unmarked sequence in turn.        • Align the marked sequence,     • Select the highest-scoring of the pairwise (marked-to-unmarked) alignments. Use this alignment to merge the unmarked sequence into the seed alignment, and mark this sequence as newly aligned.• Return the seed alignment.N best non-overlapping alignments by repeatedly applying an incremental Waterman-Eggert-style mask to the alignment envelope [The above algorithms have been implemented in stemloc. The multiple alignments produced by this algorithm lack well-defined probabilistic scores unless the pair SCFG is conditionally normalized. It is also straightforward to retrieve the envelope . This isAfter some empirical experimentation, we developed the grammar of Tables x, y or xy superscripts . The Multi state models multiloops, using a bifurcation to LMulti and RMulti.The starting nonterminal is Start. The nonterminals representing higher-level units of RNA structure are Loop, Stem, LBulge, RBulge and LRBulge. Each of these has associated Match, Ins and Del states  and each of these states has an associated emission state, prefixed with Tables et al [To summarize, the grammar models homologous stems, loops, multiloops and bulges in pairwise RNA alignments, with covariant substitution scores and affine gap penalties (geometric indel length distributions). It has the property that any combined alignment and structure prediction for two RNA sequences has a single, unambiguous parse tree. In our investigations, this unambiguity appeared to improve the accuracy of alignment and structure prediction substantially; see also writings on this topic by Giegerich  and Doweet al . The graπ-orbital overlap, nor does it allow low-cost insertion or deletion of whole stems or substructures. Since the algorithms are implemented for any SCFG, it is straightforward to modify the program to experiment with grammars that model such phenomena. An example of a grammar that models the latter type of mutation (whole-substructure indels), and is also fully derived from an evolutionary rate-based model, is presented in a companion paper [The stemloc grammar does not model basepair stacking effects due to on paper .N to the counts computed during Expectation Maximization training, where N is the number of sequences in the multiple alignment from which the pairwise alignments were derived. Furthermore, the pairwise alignments were binned according to sequence identity, providing four alternative parameterisations; the bin ranges were 30–40%, 50–60%, 70–80% and 90–100%.Under the SCFG framework, the probability parameters for the grammar can be estimated directly from data using the Inside-Outside algorithm with appropriate constraints, which are easy to supply . The parameters were trained from 56376 (non-independent) pairwise alignments from RFAM [de novo structure prediction program PFOLD [stemloc allows the user to re-estimate all parameters from their own personal training set of trusted alignments. This may be a useful feature, since the training procedure described above is probably biased. Since training was performed using all kinds of sequence available in RFAM, including RNA sequences with computationally predicted secondary structure as well as those for which structures were experimentally confirmed, it is possible that the stemloc parameters may be skewed by the parameters of the computational methods used by the RFAM curators to predict structure. These include the homology modeling program INFERNAL  and the am PFOLD .IH designed, programmed, tested and documented the algorithms.


The alignment of multiple protein sequences is a fundamental step in the analysis of biological data. It has traditionally been applied to analyzing protein families for conserved motifs, phylogeny, structural properties, and to improve sensitivity in homology searching. The availability of complete genome sequences has increased the demands on multiple sequence alignment (MSA) programs. Current MSA methods suffer from being either too inaccurate or too computationally expensive to be applied effectively in large-scale comparative genomics.We developed Kalign, a method employing the Wu-Manber string-matching algorithm, to improve both the accuracy and speed of multiple sequence alignment. We compared the speed and accuracy of Kalign to other popular methods using Balibase, Prefab, and a new large test set. Kalign was as accurate as the best other methods on small alignments, but significantly more accurate when aligning large and distantly related sets of sequences. In our comparisons, Kalign was about 10 times faster than ClustalW and, depending on the alignment size, up to 50 times faster than popular iterative methods.Kalign is a fast and robust alignment method. It is especially well suited for the increasingly important task of aligning large numbers of sequences. The alignment of multiple sequences is essential in the analysis of protein sequences . In contThe Kalign algorithm follows a strategy analogous to the standard progressive method for sequence alignment . PairwisIn progressive alignment the order in which sequences are aligned is crucial for accuracy. The goal is to align the most similar sequences first, to avoid errors in early stages of the alignment that cannot be corrected later on. This is normally accomplished by building a guide tree that dictates the order of pairwise alignments. The tree is typically built from a matrix of pairwise distances between all sequences, e.g. using the UPGMA  or the Ntk) where t is the length of the text string and k the number of errors allowed. Previously, protein sequences were commonly searched with patterns 2–3 long [The Wu-Manber algorithm is an extension to the exact Baeza-Yates-Gonnet algorithm  that all2–3 long ,9,10, an2–3 long  allows uAt each internal node of the guide tree two sequences, two profiles or one sequence and one profile are aligned. Optionally, Kalign can use Wu-Manber matches as anchor points during the alignment phase, which requires two extra steps in addition to the dynamic programming. This option is intended to improve accuracy in cases of discontinuous alignments, e.g. if a domain has been inserted or deleted. It speeds up the dynamic programming, but the gain is cancelled out by the time to perform the extra steps.Kalign employs the global dynamic programming method using affine gap penalties as described in Durbin et al. . ResidueThe task of the consistency check is to sieve through the thousands of matches found between two sequences and find the largest set of matches that can be included into an alignment. For example: a pattern matching at position 100 in both sequences is inconsistent with a pattern that matches sequence A at position 20 and sequence B at position 150. Matches found in both sequences (or profiles) are plotted at the corresponding position into the dynamic programming matrix. Since it is possible for several patterns to match at the same position the number of matching patterns is recorded. The filled matrix is analogous to a homology matrix containing substitution scores in standard sequence alignment. A modified version of the Needleman-Wunsch algorithm is then used to find the path through the dynamic programming matrix that contains the highest number of consistent patters. Because we are interested in local matches here, no gap penalties are used. Finally, all shared matches that occur on too short diagonals are considered spurious and are excluded. We found that a cutoff of 22 residues long diagonals worked well.th column in a profile, if 5 gaps were inserted anywhere in sequence A before position 50. The matches initially 'tied' to individual sequences are thus assigned to matches within profiles and can be used in the next pairwise alignment step.Including matches in initial pairwise alignments involving regular sequences is relatively trivial. However, deeper into the guide tree, profiles are aligned both to each other and to sequences. The updating step adjusts the absolute position of matches found within sequences to their relative positions within the profiles generated by the dynamic programming step. For example, a match at position 50 in sequence A can end up in the 55Like other alignment programs based on dynamic programming, Kalign uses a substitution matrix and affine gap penalties. The choice of matrix and gap penalties has been the subject of previous studies . The mosThe Kalign algorithm was implemented in standard C.To compare Kalign to other MSA programs, the following test sets were used: the Balibase 2.01 ,33 test The Balibase test set is a collection of alignments derived from structural databases or from manual alignments in the literature. We used the first five categories in Balibase version 2.01, containing 141 alignments. Each category represents some characteristic such as long or short sequences, high or low sequence identity, or large N/C terminal deletions or extensions. Reference alignments in Balibase contain only few, on average 10, and partial sequences. As noted before , this unPrefab exploits the abundance of pairwise structural alignment to create a multiple alignment test set. Each case in Prefab consists of a pairwise reference alignment and a set of sequences containing the two reference sequences plus 48 additional sequences that were obtained by querying a database with the reference sequences. To perform a test, the set of 50 sequences are aligned, the pairwise alignment of the two reference sequences is extracted from the resulting MSA, and is compared against the pairwise reference alignment. Prefab version 3 contains 1932 individual test cases, each based on a single pairwise alignment. Compared to the 141 test cases in Balibase this seems impressive, but each Balibase test case is an alignment of more than two sequences and in effect Balibase contains 8053 pairwise alignments.A drawback of both Balibase and Prefab is that sequence-based MSA methods strive to give evolutionarily motivated alignments that are inherently distinct from the structurally motivated reference alignments in the databases. In structural alignments, residues are assigned to the same column if they are considered structurally equivalent. In evolutionary alignments, aligned residues are thought to have originated from the same residue in a common ancestor. Although these two interpretations of the data often overlap, it is not always the case. Consider the Balibase alignment in Figure As Balibase and Prefab alignments are relatively small (10 and 50 sequences), we felt the need to examine performance on larger alignments. Since no real testset with large alignments exists, we were forced to use simulations to create this dataset. We used Rose version 1.3 , a progrThe alignment quality of each method was determined by calculating the sum-of-pairs score (SP) according to Thompson et al. . This scWe compared our method Kalign (with the default parameters) to Mafft version 3.85 , Muscle The average sum-of-pairs score was calculated for each category in Balibase and the results are shown in Table Due to the large number of test cases in Prefab we limited this analysis to ClustalW, Kalign, Muscle and Mafft. The results Table  agree wiTo further evaluate the quality and speed of multiple alignment methods, we used our own large testset with up to 400 sequences per alignment, and up to an evolutionary distance of 400 PAM. T-Coffee and Dialign were excluded from these tests due to computational limitations. To investigate the effect of the Wu-Manber algorithm, we generated a series of alignments with Rose, each containing 50 sequences with an average evolutionary distance ranging from 0 – 400 Figure . We testIn this paper we present Kalign, a novel multiple sequence alignment algorithm based on Wu-Manber approximate pattern matching that combines high quality with high speed. Compared to existing programs, Kalign performed much more robustly when aligning large amounts of sequences or distant sequences in a large-scale benchmark of generated alignments. In terms of computational efficiency, Kalign is superior to the other methods, and readily aligns hundreds of sequences in minutes on a normal desktop computer. Coupled with the fact that Kalign gives very accurate alignments, this makes Kalign a very attractive overall method. The high accuracy of Kalign is due to the innovative use of the approximate Wu-Manber string-matching algorithm. This allows sequence distances to be accurately estimated even in difficult cases. Precise sequence distances generate good quality guide trees that, in turn, lead to good alignments. At the same time, Wu-Manber string-matching is very fast and dramatically cuts down the time required for the distance estimation step that dominates the running time of most alignment programs. The strategy detailed here can, in principle, be applied to any other progressive alignment method. Even when disregarding the results on the new large testset, Kalign's performance on Balibase and Prefab is impressive especially when considering that unlike other methods Kalign was not trained on either test set, and that other methods with similar performance are much slower. or by request from the authors.The Kalign program and a Kalign server are freely available at TL had the idea of using a fuzzy-string matching algorithm in multiple sequence alignments, implemented the method and carried out the evaluation. ELLS supervised the work. All authors read and approved the final manuscript.


Evolutionary distances are a critical measure in comparative genomics and molecular evolutionary biology. A simulation study was used to examine the effect of alignment accuracy of DNA sequences on evolutionary distance estimation.P-distance < 0.5). Beyond this threshold, the alignment procedure artificially inflates the apparent sequence identity, skewing distance estimates, and creating alignments that are essentially indistinguishable from random data. This general result was independent of substitution model, sequence length, and insertion and deletion size and rate.Under the studied conditions, distance estimation was relatively unaffected by alignment error  as long as 50% or more of the sites were identical among the sequences (observed Examination of the estimated sequence identity may yield some guidance as to the accuracy of the alignment. Inaccurate alignments are expected to have large effects on analyses dependent on site specificity, but analyses that depend on evolutionary distance may be somewhat robust to alignment error as long as fewer than half of the sites have diverged. Evolutionary distance, the number of substitutions per site separating a pair of homologous sequences since they diverged from their common ancestral sequence, is an extremely important measure in molecular evolution and comparative genomics. It is used for a wide variety of purposes, ranging from phylogenetic analysis ,2, to eshypothesis of homology (just as a phylogenetic tree is a hypothesis of evolutionary history). As with other hypotheses, these alignments may contain more or less error depending on the nature of the data. While it is widely recognized that highly divergent sequences are more difficult to align and will contain more error than less divergent sequences , the, thehypoLittle attention has been paid to how errors in sequence alignment affect downstream analysis. Individual studies have shown that error in alignment can have broad effects on computational approaches to discovering functional elements ,17 and pI performed a simulation study to examine the relationship between global alignment accuracy and evolutionary distance estimation of noncoding DNA sequences. It consists of a profile of the magnitude of error one expects to find in paired sequence alignment under the simulation conditions and the comparison of evolutionary distance estimates from correct and hypothesized alignments as the true divergence increases.Under the baseline simulation conditions, alignment accuracy  is largely dependent on the proportion of homologous sites containing identical nucleotides. When sequence identity exceeded 80%, essentially all aligned sites (>99%) were truly homologous Figure . As idenA distinction needs to be made between the true identity of the sequences  and the aligned identity . The nature of alignment algorithms is to predict homology by inserting gaps so that sites with identical nucleotides align. When true variation among sequences is large, algorithms can be quite efficient at incorrectly inferring identity. The theoretical minimum identity for a pair of sequences under the present simulation conditions is 25–26% (depending on the specific substitution model), yet Clustal yields sequences with a minimum identity of 44% Figure , even foThe results represented in Figure dtrue - dalign|/dtrue) is less than 10%, even when up to 50% of the sites are aligned incorrectly ; these changes would also alter the accuracy of the alignment. The purpose of this study was not to test the best possible way to construct alignments, but rather to examine the effects of typical alignment errors on evolutionary distance estimation from DNA sequences.The effects of evolutionary parameters on alignment and distance estimation accuracy varied by parameter, but one general observation is that when the value of a specific parameter has an effect, the effect is amplified when the true distance between the pair of sequences is larger Figure . While sChanging the α parameter of the Γ-distributed rate variation had an easily predictable effect on alignment accuracy given the results in Figures Not surprisingly, nucleotide frequency biases have a large effect on the accuracy of both alignment and distance estimation Figures . AlignmeOverall, these results are somewhat encouraging, particularly when one considers that the more realistic substitution models  are more robust to alignment error for much longer evolutionary distances. However, the robustness of these distance estimates is extremely context dependent. Whether a 10% error in distance estimate is large or small depends on the questions being asked as well as the relative distances of other sequence pairs being analyzed.P-distance), as well as a somewhat different approach to sequence alignment. Clustal is among the most commonly used alignment programs and implements a variation of the most commonly used pair wise alignment method, the Needleman-Wunsch algorithm )In this study, I've shown evolutionary distance estimation to be somewhat robust to errors in alignment for moderate divergences (>50% identity). Other uses of aligned data, including for example, identification of conserved sites relative to exploration of genetic disease ,36, are Three large sets of simulations were conducted, each differing by the nucleotide substitution model: Jukes-Cantor (JC) , HasegawC = πG = 0.3, πT = πA = 0.2, and the transition-transversion bias was set to that observed at neutral sites in mammals, κ = 3.6 [The second set of simulations conducted was identical to the first, except using the HKY model of nucleotide substitution. For this model, initial and expected nucleotide frequencies were π κ = 3.6 . The thi κ = 3.6 .Sequence length is known to play an important role in evolutionary distance estimation; to test for an interaction between sequence length and alignment accuracy, subsets of the HKY simulations were repeated with initial sequences of 100, 200, 300, 400, 500, 1500, 2000, 5000, and 10000 bases. To test the effect of rate and size of insertions and deletions on distance estimation, subsets of the HKY simulations were repeated with mean indel lengths of 2, 6, 8, and 10 bases  and with insertion and deletion rates of 1 every 200 (insertion) & 80 (deletion) substitutions , 150 & 60 substitutions , 75 & 30 substitutions , and 50 & 20 substitutions . The effects of nucleotide frequencies  and gamma-distributed rate variation  were similarly examined.For every simulated data set, the fate of each of the original sites was tracked and an alignment representing the true homology was constructed for each data set . The gaps were removed from the sequences and each data set was then aligned using Clustal W version 1.83  with theEvolutionary distances between sequence pairs were estimated for both the correct and hypothesized alignments using the Jukes-Cantor , Tamura-After the initial analyses, the order of the nucleotides in every simulated sequence was completely randomized to create random sequences with identical nucleotide content as the simulated sequences. The random sequences were also aligned using Clustal.MR designed, programmed, executed, and analyzed all parts of this study.


TBLASTN is a mode of operation for BLAST that aligns protein sequences to a nucleotide database translated in all six frames. We present the first description of the modern implementation of TBLASTN, focusing on new techniques that were used to implement composition-based statistics for translated nucleotide searches. Composition-based statistics use the composition of the sequences being aligned to generate more accurate E-values, which allows for a more accurate distinction between true and false matches. Until recently, composition-based statistics were available only for protein-protein searches. They are now available as a command line option for recent versions of TBLASTN and as an option for TBLASTN on the NCBI BLAST web server.We evaluate the statistical and retrieval accuracy of the E-values reported by a baseline version of TBLASTN and by two variants that use different types of composition-based statistics. To test the statistical accuracy of TBLASTN, we ran 1000 searches using scrambled proteins from the mouse genome and a database of human chromosomes. To test retrieval accuracy, we modernize and adapt to translated searches a test set previously used to evaluate the retrieval accuracy of protein-protein searches. We show that composition-based statistics greatly improve the statistical accuracy of TBLASTN, at a small cost to the retrieval accuracy.TBLASTN is widely used, as it is common to wish to compare proteins to chromosomes or to libraries of mRNAs. Composition-based statistics improve the statistical accuracy, and therefore the reliability, of TBLASTN results. The algorithms used by TBLASTN are not widely known, and some of the most important are reported here. The data used to test TBLASTN are available for download and may be useful in other studies of translated search algorithms. BLAST ,2 is a pTBLASTN is widely used as associating proteins with chromosomes or with mRNAs is useful in many biological studies. Despite this popularity, a performance evaluation of TBLASTN has never been published. BLASTX, a related variant of BLAST that aligns a DNA sequence to a protein database, was described in Gish and States. The deset al.  d det al.      if forall 0≤ j <i not HSP_IS_CONTAINED then      M←ADJUST_COMPOSITION          a←CALC_X_DROP_ALIGNMENT          if a.score≥cutoff_score then         a,             end if         end if      end for   return A   end functionThe HSP_IS_CONTAINED routine returns true if the HSP provided as its first argument is contained in the HSP provided as its second argument. An HSP is considered to be contained in a second HSP if its query and subject bounds are contained in the query and subject bounds of the second HSP and if the second HSP has equal or higher score.a to the set of alignments a. If a is added to a. In this fashion, repeatedly calling the routine WITH_DISTINCT_ENDS ensures that the final list of alignments does not contain an alignment that shares an endpoint with a higher-scoring alignment. When two alignments share the same endpoint, the higher-scoring one is the preferred alignment; the lower-scoring alignment is a suboptimal artifact of the BLAST heuristics.The WITH_DISTINCT_ENDS routine adds the alignment pq, ps) that will force an alignment between offset pq in the query and ps in the subject. It computes an alignment in both directions starting from this point. A starting point is defined for each HSP that is realigned. If possible, the starting point that was originally used to compute the HSP is reused. Due to the effects of SEG filtering and the newly computed scoring matrix, however, the previous starting point may no longer be desirable; it may lie in a region of nonpositive score. We discuss the rule used to validate the existing starting point, and if necessary choose a new one, in The x-drop algorithm requires a starting point .Mus musculus) genome. One thousand protein sequences were randomly selected from the list of RefSeq[To measure how effective composition-based statistics is at eliminating false matches with low E-value, we performed a series of tests using randomly permuted amino acid sequences from the mouse (of RefSeq mouse prHomo sapiens) genome, released August 26, 2004. The database includes chromosomes X and Y and the unplaced sequence fragments included in the build. We omitted the mitochondrial genome from the database, however, as these sequences are known  to haveTo test the effectiveness of various modes of composition adjustment for TBLASTN, we performed a number of tests using the yeast nuclear genome. We downloaded the yeast genome from, a site We aligned a set of 102 protein domains to the yeast nucleotide genome using TBLASTN. This test set was first developed for the study in . An updaIn the yeast genome, each known yeast protein is annotated with the location and strand of its coding region. These annotations allow us to adapt the test set for use with TBLASTN as follows. For TBLASTN, alignments are divided into three categories: (1) alignments that match a query to the coding region of a known true positive match; (2) alignments that match a query to a known coding region that is not a true positive match; and (3) alignments that do not match a known coding region. An alignment is said to match a query to a coding region if the subject portion of the alignment overlaps the coding region and is on the same strand.It is not uncommon for there to be more than one alignment between a query and a coding region. Indeed this is expected; protein-protein searches also report multiple alignments between pairs of proteins. When there is more than one alignment to a coding region, only the lowest E-value alignment between a particular query and the coding region is used when computing ROC scores. No attempt is made to apply a similar rule to noncoding regions. All alignments that do not overlap a coding region are categorized as false positive matches and counted when computing ROC scores.-12. The pseudogene is expressed and produces a functional protein under certain conditions [We made two explicit exceptions to this scheme for classifying hits. The first exception is to add a particular pseudogene (Entrez Gene ID 850644) to our list of coding regions and to make the pseudogene a true positive for one of our queries, raising the maximum possible number of true positives to 988. Each of the variants tested found an alignment to this pseudogene with E-value smaller than 10nditions -56. ThouEMG made most of the changes to the BLAST software, conducted most of the testing, and wrote the paper with assistance from SFA. Y-KY developed the method for C-BLAST and aided in the testing. RA provided resources and aided in the testing. AAS provided resources, made some of the changes to the BLAST software and developed earlier versions of the test sets. SFA directed the study and designed some of the methods. All authors edited, read, and approved the final manuscript.Permuted mouse sequences. Sequence data used to test the statistical accuracy of TBLASTN. These data are not suitable for inclusion in a sequence database, as they have been randomly permuted and no longer represent true biological sequences. See the README included in the archive.Click here for fileYeast data set. queries and lists of true positives for performing ROC analysis of translated nucleotide search algorithms. Also contains the exact version of the yeast genome used in the experiments described in this paper.Click here for fileSupplemental information. discusses rules for the treatment of nonstandard amino acids and for determining a staring point for gapped alignment when the current starting point is unacceptable.Click here for file