The Multiple Sequence Alignment (MSA) is a computational abstraction that represents a partial summary either of indel history, or of structural similarity. Taking the former view (indel history), it is possible to use formal automata theory to generalize the phylogenetic likelihood framework for finite substitution models  to arbitrary-length sequences. In this paper, we report results of a simulation-based benchmark of several methods for reconstruction of indel history. The methods tested include a relatively new algorithm for statistical marginalization of MSAs that sums over a stochastically-sampled ensemble of the most probable evolutionary histories. For mammalian evolutionary parameters on several different trees, the single most likely history sampled by our algorithm appears less biased than histories reconstructed by other MSA methods. The algorithm can also be used for alignment-free inference, where the MSA is explicitly summed out of the analysis. As an illustration of our method, we discuss reconstruction of the evolutionary histories of human protein-coding genes. These types of hypothesis are similar, but with subtle (and important) distinctions: at the residue level, a claim of evolutionary homology (direct shared descent) is far stronger than a claim of structural homology (same approximate fold). Furthermore, both types of MSA–evolutionary and structural–typically only represent summaries of the respective homologies: some fine detail is often omitted. For example, an evolutionary MSA may–or may not–include the ancestral sequences at internal nodes of the underlying tree.The Multiple Sequence Alignment (MSA), indispensable to computational sequence analysis, represents a hypothetical claim about the homology beteen sequences. MSAs have many different uses, but the underlying hypothesis can often be classified as a claim either of template-based structure prediction, where a query sequence is aligned to a target of known structure; the success of this prediction reflects the number of query-template residues correctly aligned Structural and evolutionary MSAs are often conflated, but they have quite different applications. For example, a common use for a structural MSA is evolutionary accuracy – a correct reconstruction of the evolutionary history of the sequences.Evaluation of alignment methods is typically done with implicit regard for the structural interpretation. Many benchmarks have used metrics based on the Sum of Pairs Score (SPS) Several studies suggest that multiple alignment for evolutionary purposes is still a highly uncertain procedure The current state-of-the-art in phylogenetic alignment software is a choice between (on the one hand) programs that lack explicit models of the underlying evolutionary process, and so are not framed as statistical inference problems A telling observation is that while substitution rate is routinely measured from MSAs and used as an indicator of natural selection, there is relatively little analogous use of indel rate. As we report here, it seems highly likely that even if indel rate is a useful evolutionary signal (which is eminently plausible), the present alignment methods distort measurements of this rate so far as to make it meaningless .In this paper, we frame phylogenetic sequence alignment as an approximate maximum likelihood (ML) inference. Our inference algorithm assumes that the tree is known, requiring a separate tree estimation protocol. While this is a strong assumption, it is in principle shared among all progressive aligners  which is essentially “structural” , while ProtPal attempts to maximize a “phylogenetic” metric (the probability of a given evolutionary history). The metric we have used in our benchmark (which counts correct reconstruction of the number of indel events on branches of the tree) is also “phylogenetic”. When ranking the programs using the AMA metric, FSA perfoms well, with accuracy exceeding that of ProtPal in the highest indel rate category . This suversus-deletion biases that are, to a varying degree, asymmetric. Typically, the asymmetry is that insertions are underrepresented and deletions overrepresented. ProtPal's bias, which is generally less than the other programs, is also the most symmetric: reconstructed insertions and deletions are roughly equally reliable, with both slightly underestimated. Over the distribution of human gene rates used by this benchmark, our phylogenetic likelihood approach, ProtPal, provides the most accurate reconstructions of both insertion and deletion counts. PRANK, which also uses a tree (but no likelihood), avoids insertion-deletion biases to a certain extent, although insertion rates are slightly underestimated relative to deletion rates. Since ProtPal's MAP history estimation appears similar to the optimization algorithm of PRANK, we suspect that ProtPal's marginally better performance is due primarily to its main difference in implementation: ProtPal tracks an ensemble of possible reconstructions during progressive tree traversal (Section), whereas PRANK uses a single “current best guess.”All programs other than ProtPal display insertion- To investigate the effect of indel rate variation on estimation accuracy, we separate each program's error distributions by indel rate . We findGap attraction and other biases operate simultaneously, and are sometimes opposed. MUSCLE over-estimates the deletion rate under most conditions, but . ProbCons produces more reliable insertion estimates than PRANK in a broad range of benchmark categories, is tied with PRANK for deletion estimates, and appears robust to indel rate variation. PRANK performs slightly better than ProbCons in the slowest indel rate category we considered. ProtPal produces the most reliable estimates overall, outperforming ProbCons in all but the fastest indel rate category, and PRANK in all but the slowest.As compared to variation of simulated indel rate, variation of simulated substitution rate appears to have little effect on the accuracy of indel reconstruction . One notOrthologous and Paralogous Transcripts in Clades (OPTIC) database's Amniota set, comprised of the 5 mammals H. sapiens, M. musculus, C. familiaris, M. domestica, O. anatinus and G. gallus as an outgroup http://biowiki.org/oscar/optic_reconstruction.tar, and we provide here various graphical summaries of Amniota evolutionary history. Several negative results stand in contrast to earlier-reported trends.We present here a comprehensive set of reconstructions accounting for the evolutionary history of individual codons in human genes. We used genes in the Insertion and deletion rates are approximately gamma-distributed . RoughlyIn our simulations, ProtPal pinpoints residues' “branch of origin” more reliably than other tools, with a 93% accuracy rate . Many coAmniota - Australophenids (pink) branch  branch, as well as on the the ) branch .Distributions over amino acids differ significantly between inserted, deleted and non-indel sequences . In geneNematodeWe find, contrary to a previous study in The position of indels within genes is highly biased towards the ends of genes, presumably in large part reflecting annotation error . The biaWe find no general correlation between the indel rate for a gene and the number of indel polymorphisms recorded for that gene in dbSNP No Gene Ontology (GO) categories stand out as having significantly lowered or heightened indel rates in any of the three ontologies, contrasting with the reported results of a 2007 study using a smaller number of genes Sum of Pairs Score. Alignment programs that perform weakly on our benchmark have apparently performed well on these previous benchmarks. We hypothesize that these benchmarks, compared to ours, are less directly predictive of a program's accuracy at historical reconstruction, although they may better reflect the program's suitability to assist in tasks relating more closely to folded structure, like prediction of a protein's 3D structure from a homologous template.We developed and analyzed a simulation benchmark that compares programs based on their reconstructions of evolutionary history, using instantaneous mutation rates representative of Amniote evolution. We tested several different tree topologies; results were similar on all trees, but most pronounced on the tree with the longest branch lengths. We find that most programs distort indel rate measurements, despite claims to the contrary. Moreover, the systematic bias varies significantly when the rates of substitutions and indels are varied within a biologically reasonable range. Many of the programs we rated have been ranked in the past, but using benchmarks that use protein structural alignments as a gold standard, rather than evolutionary simulations. Furthermore, these previous benchmarks have not directly assessed the reconstruction of evolutionary history (or summary statistics such as the indel rate), but have used other alignment accuracy metrics such as the www.biowiki.org/ProtPal. The evolutionary reconstructions ProtPal produces are, according to our simulated tests, the most accurate of any available tool, for a range of parameters typical of human genes.We have introduced a new notation that describes a general, hidden Markov model-structured likelihood function for indel histories on a tree, as well as the structure of the corresponding inference algorithm. We have implemented the new method in a freely-available program, ProtPal, that allows, for the first time, phylogenetic reconstruction with accuracy over a broad range of indel rates. ProtPal is written in C++ as a part of the DART package: We applied ProtPal to the reconstruction of human gene indel history, using families of human gene orthologs from the OPTIC database. We find some patterns that agree with previous studies, such as the non-uniform distributions over amino acids seen in Many applications which use a fixed-alignment phylogenetic likelihood could potentially benefit from ProtPal's reconstruction profiles. For example, phylogenetic placement algorithms estimate taxonomic distributions by evaluating the relative likelihoods of placing sequence reads on tree branches In summary, multiple alignments are frequently constructed for use in downstream evolutionary analyses. However, except for our method and slow-performing MCMC methods, there are no software tools for reconstructing molecular evolutionary history that explicitly maximize a phylogenetic likelihood for indels. Our results strongly indicate that algorithms such as ProtPal (which use such a phylogenetic model) produce significantly more reliable estimates of evolutionary parameters, which we believe to be highly indicative of evolutionary accuracy. These results falsify previous assertions that existing, non-phylogenetic tools are well-suited to this purpose. Furthermore, we have demonstrated that it is possible to achieve such accuracy without sacrificing asymptotic guarantees on time/memory complexity, or resorting to expensive MCMC methods. ProtPal can reconstruct phylogenetic histories of entire databases on commodity hardware, enabling the large-scale study of evolutionary history in a consistent phylogenetic framework.http://arxiv.org/abs/1103.4347.The details concerning generation and analysis of simulated data are contained in Our algorithm may be viewed as a generalization of Felsenstein's pruning recursion Felsenstein's algorithm computes The pruning recursion visits all nodes in postorder. Each finite-state transducer, a probabilistic automaton that transforms an input sequence to an output sequence, and a familiar tool of statistical linguistics Our new algorithm is algebraically equivalent to Felsenstein's algorithm, if the concept of a “substitution matrix” over a particular alphabet is extended to the countably-infinite set of all sequences over that alphabet. Our chosen class of “infinite substitution matrix” is one that has a finite representation: namely, the By generalizing the idea of matrix multiplication  pairwise alignments of input and output sequences. For any transducer Composition: If Intersection: If Let Identity: Let Exact match: For any sequence Chapman-Kolmogorov transducers: A transducer probabilistic if time parameter, Suppose Then If the state space of We rewrite the evidence, The root and branch transducers Let Let Diagramatically we can write The phylogenetic likelihood is then fully described by Like Inference with HMMs often uses a dynamic programming matrix (e.g. the Forward matrix) to track the ways that a given evidential sequence can be produced by a given grammar.except the observed For our purposes it is useful to introduce the evidence in a different way, by transforming the model to incorporate the evidence directly. We augment the state space so that the model is no longer capable of generating any sequences If Diagramatically we can write Let The net output of Likewise, the input of We can think of Transducer If The likelihood of a given history may be calculated by summing over paths through Let For example, in a simple case involving a root node (1) with two children  whose sequences are constrained to be All states of Let If absorbing leaf indices for a state, such that the existence of a finite-weight transition Let alignment envelope is the set of sibling state-pairs from Let guide alignment. For leaf nodes An alignment envelope can be based on a This envelope excludes a pair of sibling states if they include a homology between residues which is more than matches from the homology of those characters contained in the guide alignment:Let http://genserv.anat.ox.ac.uk/downloads/clades/. We restricted our analysis to the http://genserv.anat.ox.ac.uk/clades/amniota/displayPhylogeny was used for all reconstructions, though branch lengths were estimated separately for each family as part of OPTIC. When computing branch-specific indel rates, the branch lengths of the species tree were used.Amniote gene families were downloaded from Gene families were aligned and reconstructed using ProtPal with a 3-rate class Markov chain over amino acids, insertion and deletion rates set to 0.01, and 250 traceback samples. Averaged and per-branch indel rates were computed with ProtPal using the -pi and -pb options. The indel rates were then normalized by the synonymous substitution rate for each corresponding nucleotide alignment (taken directly from OPTIC), computed with PAML http://www.ebi.ac.uk/GOA/human_release.html during 10/2010. Indel SNPs per gene were taken from a table downloaded from Supplemental Table 5 of Genes were mapped to Gene Ontology terms via the mapping downloaded from Text S1Contains techinical details concerning generation of simulation data, analysis of OPTIC data, as well as figures pertaining to both simulated and OPTIC data.(PDF)Click here for additional data file.


Small molecules are central to all biological processes and metabolomics becoming an increasingly important discovery tool. Robust, accurate and efficient experimental approaches are critical to supporting and validating predictions from post-genomic studies. To accurately predict metabolic changes and dynamics, experimental design requires multiple biological replicates and usually multiple treatments. Mass spectra from each run are processed and metabolite features are extracted. Because of machine resolution and variation in replicates, one metabolite may have different implementations  of retention time and mass in different spectra. A major impediment to effectively utilizing untargeted metabolomics data is ensuring accurate spectral alignment, enabling precise recognition of features (metabolites) across spectra. Existing alignment algorithms use either a global merge strategy or a local merge strategy. The former delivers an accurate alignment, but lacks efficiency. The latter is fast, but often inaccurate. Here we document a new algorithm employing a technique known as quicksort. The results on both simulated data and real data show that this algorithm provides a dramatic increase in alignment speed and also improves alignment accuracy. Knowledge about the function, distribution and abundance of metabolites is fundamental to a comprehensive systems level understanding of an organism. Furthermore, soluble and volatile metabolites are central players in influencing interactions at a higher ecosystem level through their role in sensing, perception and elaborating biotic and abiotic stress responses. In post-genomic systems level research, the metabolome  of an organism is examined for various pattern analysis purposes Fundamental to any biological research, dynamic behaviour of biological molecules, be they proteins, mRNA or metabolites, needs to be determined through highly replicated experimentation. Metabolite features need to be first extracted from multiple mass spectra prior to any pattern analysis. Due to machine resolution and sample variation, one metabolite will have different implementations in different spectra, i.e. non-identical retention time and mass values. This means that the exact retention time and mass values of a real, but unknown metabolites may not be seen in collected spectra. Most metabolites are unknown therefore to accurately recognize metabolites, precise alignment of features across spectra is the first critical task in analyzing metabolomic datasets based upon accurate statistical estimations.As described recently There are generally two types of alignment algorithms, i.e. a local merge strategy and a global merge strategy. The former commonly employs three techniques, warping In order to increase alignment accuracy we recently developed PAD (Peak Alignment via Density maximisation), which adopted a global merge strategy In this paper we present a novel feature alignment algorithm based upon the quicksort technique ethodsM. ethodsM for the definition) analysis for Toy A data at noise levels 60%, 80% and 100%. For simulations with the noise levels below 60%, the sensitivity of all three algorithms is 100%. No data for specificity (see ethodsM for the definition) analysis is shown here because the specificity of all algorithms is 100%. From Description of toy A is given in ethodsM. No error (MH and FP - see ethodsM for the definitions) was observed for PAD and PASS for all six data sets. By contrast, when the noise level was increased from 0% to 100%, the prediction error in SIMA with the mass resolution (see ethodsM for the definition) 0.0071 Daltons got larger  outputs. The mass resolution used for running SIMA was 0.0071 Daltons. It can be seen that PASS is much faster than PAD (32 times faster) and also faster than SIMA (four times faster). It is important to note that features in original spectra files should not be duplicated nor omitted. PAD and PASS have generated alignments without these errors, however, SIMA generated alignments with duplicated and missing features. The last column of sid2 at 6 hpi (hours post inoculation). Six duplicated features were found when aligning the spectra of Col-0 and sid2 at 10 hpi. Six duplicated features were found when aligning the spectra of Col-0 and sid2 at 16 hpi. Overall, 27% of features were missing when aligning 12 spectra of Col-0 at all three time points, 43% of features were missing when aligning 12 spectra of sid2 at all three time points and the alignment of all 24 spectra delivered 17% duplicated features.A description of the real data is given in In addition, many SIMA consensuses violated the collision condition, i.e. many Type-I errors were found in SIMA alignments, e.g. containing more than one feature from the same map (spectra). ethodsM for the definition) curves of PASS are always the lowest and the CAM curves of SIMA  are always the highest. Notably four plots of SIMA show flat sections at the top, meaning that for these alignments, no large consensuses were generated, which was defined as the pattern IV (the biased H-pattern) in ethodsM. ethodsM.As illustrated in http://ecsb.ex.ac.uk/PASS. The prediction of significantly differential metabolites  was done via the consensus among the three algorithms. p values. The objective of improving alignment quality is to improve the quality of subsequent multivariate analysis. Accompanying this new alignment algorithm, we also introduce a novel significance analysis. Three widely used significance analysis algorithms; SAM The accompanying R program also supports locating significantly differential metabolites in a R-M (Retention time – Mass) density surface, i.e. where we can visualize the relationship between detected significantly differential metabolites and retention-time mass density. et al. in PAD , and to speed up alignment. PAD adopts a global merge strategy in contrast to many local merge algorithms, giving an improved alignment accuracy. Because a local merge algorithm has no regression process, its alignment is often problematic leading to poor alignment quality, which has two consequences, i.e. duplication and unreliable alignment. This was demonstrated here using SIMA, a typical local merge strategy algorithm. While a local merge algorithm is computationally fast, PAD, a typical global merge algorithm is not. We therefore implemented a quicksort approach, which is used in many programming languages, to speed up the global merge algorithm. Here we have built alternately M-clusters and R-clusters based on sorted mass and retention time values. Prior to building these two types of clusters, we converted all the numerical data including mass, retention time, metabolite abundance and spectra index to strings and organized them into a string list with recognizable labels to discriminate them. Applying the quicksort technique based on mass or retention time will not affect other domains of data and maintains a feature’s spectra index and abundance value during sorting. We additionally proposed a new technique for quantifying the quality of an alignment, i.e. Characteristic Alignment Map (CAM). Using CAM analysis, the alignment quality can be easily visualized qualitatively between different alignments. We have compared this new algorithm against PAD and SIMA using toy data sets and demonstrated that this new algorithm has improved alignment accuracy. Furthermore, we have shown using a real dataset that this algorithm has significantly improved alignment quality compared with SIMA and also has a better performance than PAD. Importantly, this new algorithm is 32 times faster than PAD and SIMA. The speed improvement has also been demonstrated theoretically in emark 3R. The most important concept for a global optimization process for peak alignment is consensus generation. Based on this study and our earlier work on PAD, it can be seen that a consensus must be a cluster of peaks with similar mass values and retention times which satisfy the resolution condition as well as the collision condition. Local optimization, as we have shown, will not be able to find all these peaks for one consensus. However comparing all peaks one by one is a typical NP  - hard problem This paper has presented a new metabolite prediction  algorithm based on a widely used concept in computer sciences, the quicksort technique. The objective was to maintain the alignment accuracy based on the map coverage maximization principle, as recently described by Perera N discrete features of K maps. Each map refers to a mass spectrum. Each feature The notations used by the algorithm are as follows: A data set is denoted by thk true mass under estimation. As each map may contain tens of thousands features, aligning features from many spectra becomes problematic in terms of speed - see It is also assumed that the observed features are random samples of a true, but unknown metabolite. This means that the following condition should be satisfied for an alignment of each featureHere we adopt a different strategy to speed up an alignment process dramatically while maintaining the alignment accuracy. In this algorithm, we still follow the resolution condition described in equation (1) and the collision condition. Following In theory, The quicksort technique, a well known algorithm in computer sciences and implemented as a basic function in various programming languages, such as C, is used here to implement our algorithm. It sorts strings in a lexicographical order, i.e. the difference at an earlier position of strings has a priority compared with differences occurring at a latter position of strings. For instance, three strings AATT, ABAA and AAAA will be sorted to an order such as AAAA, AATT and ABAA. If strings represent numerical data, the order reflects the numeric accuracy of similarity, e.g. 130.034, 130.411, 130.410, 130.029, 130.411, 130.409, and 130.035 leads to 130.029, 130.034, 130.035, 130.409, 130.410, 130.411, and 130.411. At a mass resolution of 0.001, we can easily identify two clusters; (i) 130.033, 130.034, and 130.035 with the centre as 130.034 and (ii) 130.409, 130.411 and 130.410 with the centre as 130.410. The algorithm presented here was motivated by this observation. We note that this has been previously applied to proteomics studies X to a string list S in which each feature is expressed using a stringMass spectral feature alignment is conducted in a two-dimensional space, reporting retention time and mass. We first designed a novel data structure to convert In order to guarantee an accurate sorting of data, all numerical data must be of the same length. If a feature's retention time (or mass) has lower than the maximal number of digits  then '0' is introduced to enable the sorting to function appropriately . We refer to such a numerical value (say 001.5000) as a digit-aligned-value (DAV).The alignment is run in two stages. In the first stage, we construct so-called mass clusters or M-clusters. Each M-cluster is composed of a number of features, which satisfy the enlarged mass resolution,S till equation (4) is violated. For ith feature and the jth feature ifAn M-cluster is constructed by sequentially scanning the string list S list, which is critical for later manipulations. As all the data including mass, map index, and feature intensity of a string (feature) are unchanged, these will shift concomitantly as string positions are resorted.After sorting the retention time in the ed -list  will savWe next focus on forming R-clusters in the sorted S list every time prior to running quicksort. To do so, we simply “whiten” all the strings corresponding to the aligned features by replacing the mass by the letter “w”. As the “o” column in the S list, it is very easy to trace them back to the S list to whiten the corresponding strings. After using the quicksort technique, all the strings of the aligned features (hence whitened ones) will be moved to the bottom of the S list automatically and will not be visited in subsequent scans  but are in the same spectra (map). A type-II error refers to the situation when a feature in a cluster does not satisfy the resolution defined in equation (1).n - 1 maps. This is repeated till one map is left. For instance, we will start finding consensuses of size ten if the total number of spectra is ten. If no consensus of size ten can be found, we search for consensuses of size nine, etc. In this way, we can ensure that the MCM principle is followed to generate reliable alignments.In order to follow the Map Coverage Maximization (MCM) principle http://ecsb.ex.ac.uk/PASS.The algorithm is implemented in C based on a linux computer with 3GB memory of 2.6 Ghz. The executable code is available at ith DAV in the sorted list.Proof: We use the reductio ad absurdum approach for this proof. Suppose D as the length of all DAVs is the first digit makes k  = 3 and D  = 4. We denote the two letters of these two DAVs at this position as The greedy scanning guarantees the formation of a consensus of all its features for a sorted list of mass and retention time values.Proof: Again, we use the reductio ad absurdum approach for this proof. Suppose a feature list K is the number of maps) and a sorted DAV list of it is expressed as ith DAV in the sorted list. Based on the assumption that The average time complexity of PASS follows Proof: The time complexity of quicksort is i) we whiten corresponding strings in the S list whenever a consensus is formed; ii) quicksort is only used when the S list is exhausted. This means that the number of the strings in the S list when calling quicksort is decreased step by step as shown below (a note to the following equation is seen "notetoremark 3A " in the supplementary document) in the supplementary document. We next assume that all features contribute to singletons. In this case, only one quicksort is required and one scanning process of the S list is required. It is not difficult to see that the time complexity is emarkR 2 discussed above, it can be seen that only one call to quicksort can guarantee the formation of all consensuses.In addition to the simulated data used in PAD The data from We used SIMA N and number of aligned features is 2P, P being the number of TSMs. If the observed number of singletons is N0 and the number of aligned consensuses is C0, then specificity is defined asTo compare algorithms for these criteria we limited our analysis to Toy A data. We used the following assumptions. Suppose the number of non-aligned features is K maps, we use the following notation to denote the number of consensuses from 1 to K sizes, i. In addition to the c vector, we define another vector of TSMs, i. MHs occur whenAn alignment may introduce two prediction errors; a missing hypothesis (MH) or a false prediction (FP). A missing hypothesis means that a consensus of a specific size is lost during alignment (prediction). A false prediction means that an incorrect consensus is introduced for a specific consensus size. For simulated data (Toy B), we know in advance how many consensuses are expected. Post alignment, we have a set of consensuses, each formed by different numbers of features, corresponding to the consensus size. Suppose we have c vector, we calculated the cumulative sum of features aligned to different consensus sizes. It was denoted by We introduced this for comparing algorithms on real data. Based on the M, the alignment generates zero consensuses with sizes from M - H to M. The lower CAM curve illustrates that the alignment has no consensuses with small sizes - L-pattern. For map number M, the alignment generates zero consensuses with sizes from one to L. In theory, the total number of features before and after alignment should be identical. As SIMA was not reliable in this respect, the characteristic set (see ethodsM for details) was normalized for each algorithm in this paper for comparison, i.e.K refers to the number of maps (spectra). We then used We used the map number as the horizontal axis and Figure S1The distribution of prediction errors for Toy B data using SIMA . The horizontal axis represents the noise rate added to features in Toy B. The vertical axis represents either missing hypothesis (MH) or a false prediction (FP). Each histogram group comprises ten bars representing ten types of consensuses, i.e. consensuses containing ten different features. The first bar represents the error between the number of expected singletons and the number of predicted singletons. The last bar represents the error between the number of true consensuses of size ten and the number of predicted consensuses of size ten. When FP occurs, we will see a positive bar . When MH occurs, we observe a negative value .(TIFF)Click here for additional data file.Figure S2Characteristic alignment map (CAM) curves. The CAM was done for MCM analysis of six alignments on the real data of pathogen infected plant leaves. The horizontal axes represent the maps used for each alignment, i.e. from six to 24. The vertical axes represent the cumulative sum of aligned features or the size of consensuses. The open dots represent CAM curves of PAD. Dashed lines represent CAM curves of PASS and dotted lines represent CAM curves of SIMA .(TIFF)Click here for additional data file.Figure S3p value distributions of three modified t tests. Both horizontal and vertical axes represent p values ranging from zero to one.(TIFF)Click here for additional data file.Figure S4Instructions for using PASS.(TIF)Click here for additional data file.Remark S1(DOC)Click here for additional data file.


Furthermore, three techniques: weighted seed-pairing heuristic, paired-end alignment pair ranking and read mate rescuing have been conceived to facilitate accurate paired-end alignment. For base-space alignment, we have compared CUSHAW3 to Novoalign, CUSHAW2, BWA-MEM, Bowtie2 and GEM, by aligning both simulated and real reads to the human genome. The results show that CUSHAW3 consistently outperforms CUSHAW2, BWA-MEM, Bowtie2 and GEM in terms of single-end and paired-end alignment. Furthermore, our aligner has demonstrated better paired-end alignment performance than Novoalign for short-reads with high error rates. For color-space alignment, CUSHAW3 is consistently one of the best aligners compared to SHRiMP2 and BFAST. The source code of CUSHAW3 and all simulated data are available at http://cushaw3.sourceforge.net.The majority of next-generation sequencing short-reads can be properly aligned by leading aligners at high speed. However, the alignment quality can still be further improved, since usually not all reads can be correctly aligned to large genomes, such as the human genome, even for simulated data. Moreover, even slight improvements in this area are important but challenging, and usually require significantly more computational endeavor. In this paper, we present CUSHAW3, an open-source parallelized, sensitive and accurate short-read aligner for both base-space and color-space sequences. In this aligner, we have investigated a hybrid seeding approach to improve alignment quality, which incorporates three different seed types, i.e. maximal exact match seeds, exact-match  The emergence and rapid progress of next-generation sequencing (NGS) technologies has driven a substantial amount of research efforts into the development of short-read alignment algorithms. To date, a variety of short-read aligners have been developed, which can be further classified into two generations in terms of functionality. The first-generation aligners are usually designed and optimized for very short reads . These aligners usually postulate that the short-reads have very small deviations from the genome, and thus typically only allow mismatches. Even though some aligners provide support for gaps, the maximum allowable number of gaps is also quite limited  for the sake of speed. Example first-generation aligners include RMAP With the progress of NGS, the maximum or average read lengths are steadily increasing beyond 100 for Illumina sequencing, which is most widely used. However, these longer short-reads usually come at the expense of higher sequencing error rates. On the other hand, these reads are prone to have more true insertions or deletions (indels) to the genome. These new features make the first-generation aligners become inefficient to align such longer reads in terms of alignment quality, speed or even both, and thus motivate the development of second-generation aligners that allow for fully gapped alignments with more mismatches and indels supported.k-mer (a k-mer is a substring of k bases) seeds, while CUSHAW2 and BWA-MEM respectively identifies variable-length maximal exact match (MEM) seeds and super MEM seeds. SOAP3-dp is an aligner based on graphics processing unit (GPU) computing and adopts a similar seeding approach to Bowtie2, while GEM adopts a filtration-based approximate string matching approach to extract relevant candidate matches by suitable pigeonhole-like rules. In addition, Novoalign (http://www.novocraft.com) is a proprietary short-read aligner for fully gapped alignments. However, its method has not been published. Although these aligners can efficiently align the majority of short-reads at high speed, they still have difficulties in correctly aligning all reads, even for simulated ones, to large genomes such as the human genome Several second-generation aligners have been developed recently, including BWA-SW k-mer seeds and variable-length seeds derived from local alignments, into the alignment pipeline. Furthermore, three techniques: weighted seed pairing heuristic, paired-end (PE) alignment pair ranking and read mate rescuing, have been proposed to facilitate accurate PE alignment. It needs to be stressed that the concept of hybrid seeding has already been implied in some other implementations for short-read alignment. One example is Stampy k-mers. Another example is TMAP (https://github.com/iontorrent/TMAP), an aligner for Ion Torrent sequencing, which incorporates the alignment approaches from SSAHA (fixed-length k-mer seeds) In this article, we present CUSHAW3, an open-source sensitive and accurate short-read aligner for both base-space and color-space sequences. In our aligner, we have investigated a hybrid seeding approach to improve alignment quality, which incorporates three different seed types: MEM seeds, exact-match The performance of CUSHAW3 has been assessed by aligning both simulated and real short-reads to the human genome in terms of single-end (SE) and PE alignment. For base-space alignment, our aligner is further compared to Novoalign, CUSHAW2, BWA-MEM, Bowtie2 and GEM. The experimental results reveal that CUSHAW3 is consistently superior to CUSHAW2, BWA-MEM, Bowtie2 and GEM for both SE and PE alignments. Furthermore, our aligner achieves better PE alignment quality than Novoalign for short-reads with higher error rates. As for the speed, CUSHAW3 is inferior to CUSHAW2, BWA-MEM, Bowtie2 and BWA-MEM, but nearly always faster than Novoalign. As for color-space alignment, our aligner is consistently one of the best aligners in terms of alignment quality at superior speed, compared to SHRiMP2 We have evaluated the performance of CUSHAW3 (v3.0.2) by aligning both simulated and real short-reads to the human genome (hg19). This performance is further compared to that of CUSHAW2 (v2.1.10), Novoalign (v3.00.04), BWA-MEM (v0.7.3a), Bowtie2 (v2.1.0) and GEM (v 1.376). All tests are conducted in a workstation with a dual hex-core Intel Xeon X5650 2.67 GHz CPUs and 96 GB RAM, running Linux (Ubuntu 12.04 LTS).To measure alignment quality, we have used the sensitivity metric, which is calculated by dividing the number of aligned reads by the total number of reads, for both simulated and real reads. For simulated reads, as the true mapping positions are known beforehand, we have further used the recall metric, which is defined as dividing the number of correctly aligned reads by the total number of reads. For simulated reads, an alignment is deemed to be correct if the mapping position has a distance of ≤10 to the true position on the genome. Considering that GEM reports all detected alignments and BWA-MEM might produce multiple primary alignments for a read, we define that a read is deemed to be correctly aligned if any of its reported alignments is correct. To provide fair comparisons, we have configured CUSHAW3, CUSHAW2 and Bowtie2 to report a maximum of 10 alignments for each read and Novoalign to report all repetitive alignments. Detailed alignment parameters of all evaluated aligners can be obtained from Tables S1, S2, S3, S4 and S5 in We have simulated three Illumina-like PE datasets from the human genome (hg19) using the wgsim simulator in SAMtools v0.1.18 Firstly, we have compared the alignment quality of all evaluated aligners by considering all reported alignments see , by settSecondly, we have further assessed all evaluated aligners by only considering the first alignment occurrence per read in the SAM file, with the minimum MAPQ set to 0. This alignment sampling does not affect the sensitivity of each aligner, but might change the recall. Hence, all aligners are only compared in terms of recall in this evaluation see . In termq, we compute TPR by dividing the number of correctly aligned reads, whose MAPQs are not less than q, by the total number of reads, and FPR by dividing the number of incorrectly aligned reads, whose MAPQs are not less than q, by the number of aligned reads whose MAPQs are also not less than q. In this evaluation, we have merely taken into account the alignments whose MAPQs are greater than 0. As GEM does not compute MAPQs, it has been excluded. For Bowtie2, we have disabled the option “-k” to enable meaningful MAPQ and have used the default setting to report at most one alignment per read. CUSHAW2 and CUSHAW3 have both been configured to report at most one alignment per read for the SE and PE alignments. For Novoalign, we have used the “-r Random” option to report at most one alignment for a single read. Thirdly, we have generated the receiver operating characteristic (ROC) curves by plotting the true positive rate (TPR) against the false positive rate (FPR) in terms of MAPQ, where for each dataset all alignments are sorted in descending order of MAPQ. For any MAPQ Finally, we have assessed all aligners using three real PE datasets produced from the Illumina sequencing. All datasets are publicly available and named after their accession numbers in the NCBI sequence read archive see . The perx/y in the table, x is the sensitivity calculated from all reported alignments and y is the sensitivity after removing the alignments with <50% aligned base proportion per read. Without alignment removal, in terms of SE alignment, CUSHAW3 aligned the most reads for each dataset and GEM is the worst. In terms of PE alignment, BWA-MEM gives the best sensitivity and CUSHAW3 is the second best for all datasets. However, after alignment removal, the sensitivities of both BWA-MEM and Novoalign significantly drop for all datasets in terms of both SE and PE alignment. Bowtie2 keeps its SE sensitivity, but has a slight decrease in PE sensitivity. GEM has also experienced significant PE sensitivity drops for all datasets. Both CUSHAW2 and CUSHAW3 keep their sensitivities unchanged for each case. With alignment removal, CUSHAW3 is consistently superior to all other aligners for each dataset in terms of both SE and PE alignment. In addition, we have shown how the sensitivity  varies as MAPQ changes  is computed by taking into account all alignments whose MAPQs are not less than q.Besides alignment quality, the speed of each aligner has been evaluated using the aforementioned simulated and real data. We have run each aligner with 12 threads on the aforementioned workstation. For fair comparisons, GEM has counted in the SAM format conversion time , as every other aligner reports alignments in SAM format. In addition, all runtimes are measured in wall clock time.As for memory consumption, the peak resident memory of each aligner has been calculated by performing PE alignment on the dataset with 2% error rate using a single CPU thread see . Bowtie2In addition to base-space alignment, we have evaluated the performance of CUSHAW3 for color-space alignment, and have further compared our aligner to SHRiMP2 (v2.2.3) and BFAST (v0.7.0a). In this evaluation, we have simulated two mate-paired datasets (read lengths are 50 and 75) from the human genome using the ART (v1.0.1) simulator Both CUSHAW3 and SHRiMP2 are configured to report up to 10 alignments per read and BFAST to report all alignments with the best score for each read. Each aligner conducts mate-paired alignments and runs with 12 threads on the aforementioned workstation. http://www.bioplanet.com/gcat), which is a free collaborative platform for comparing multiple genome analysis tools across a standard set of metrics. In this evaluation, we have compared CUSHAW3 to CUSHAW2, BWA-MEM and Novoalign in terms of alignment quality and variant calling. The evaluation results for each aligner can also be obtained from our CUSHAW3 homepage (http://cushaw3.sourceforge.net).Finally, we have evaluated the performance of our aligner using the public benchmarks at GCAT  and the other contains large indels (the large-indel dataset). All of the four datasets are simulated from the human genome and have read length 100, where there are 11,945,249 reads in each SE dataset and 11,945,250 reads in each PE dataset. To be consistent with the GCAT standard evaluations, both CUSHAW2 and CUSHAW3 are configured to report at most one alignment per read for both the SE and PE alignments. In terms of variant calling, a real exome sequencing dataset has been used in this test. This dataset is comprised of Illumina 100-bp PE reads and has 30× coverage of the human exome. In this test, we have used SAMtools as the variant caller. k-mer seeds and variable-length seeds derived from local alignments, into our alignment pipelines. Furthermore, we have proposed three critical bioinformatics techniques: weighted seed-paring heuristic, PE alignment pair ranking and read mate rescuing, to facilitate accurate PE alignments. CUSHAW3 accepts short-reads represented in FASTA, FASTQ, SAM/BAM In this article, we have presented CUSHAW3, an open-source tool for sensitive and accurate short-read alignment to large genomes, such as the human genome. This aligner is designed based on the well-known seed-and-extend heuristic and has introduced a hybrid seeding approach to improve alignment quality for both SE and PE alignments. This hybrid seeding approach works by incorporating three different seed types, namely MEM seeds, exact-match CUSHAW3 provides support for both base-space and color-space alignments. For base-space alignment, we have assessed the performance of CUSHAW3 and other top-performing short-read aligners: Novoalign, CUSHAW2, BWA-MEM, Bowtie2 and GEM using simulated as well as real reads from the human genome. For both simulated and real data, we have employed the sensitivity measure. Additionally, the recall measure has been further used on simulated data, as the ground truth of alignments is known beforehand. On simulated data, CUSHAW3 achieves consistently better alignment quality  than CUSHAW2, BWA-MEM, Bowtie2 and GEM in terms of both SE and PE alignment. Compared to Novoalign, CUSHAW3 has comparable PE alignment performance for short-reads with low error rates, but performs better for short-reads with high error rates. On real data, CUSHAW3 achieves the highest SE and PE sensitivities for each dataset. As for speed, CUSHAW3 does not have any advantage over CUSHAW2, BWA-MEM, Bowtie2 and GEM, but shows to be nearly always faster than Novoalign. In terms of color-space alignment, we have evaluated and compared the performance of CUSHAW3, SHRiMP2 and BFAST using simulated mate-paired color-space reads. The results show that CUSHAW3 is consistently one of the best color-space aligners in terms of alignment quality. Moreover, on average CUSHAW3 is one order-of-magnitude faster than both SHRiMP2 and BFAST on the same hardware configurations. From our evaluations, we have observed that a considerable number of alignments, reported by Novoalign, BWA-MEM, Bowtie2 and GEM, have low aligned base proportion per read (<50%), especially for the PE alignments. Furthermore, even though both CUSHAW3 and Novoalign are shown to have higher alignment accuracy, some simulated reads still missed their correct alignments. Moreover, this situation becomes even worse as the error rate grows larger. Hence, more research efforts are still required in order to better align short-reads with high error rates. Finally, as shown in our evaluations, the hybrid seeding approach does improve accuracy, but at the expense of speed. To significantly reduce the runtime, one promising solution is the use of GPU computing, as some pioneer work e.g.  has showk-mer seeds, and variable-length seeds at different phases of the alignment pipeline. For a single read, the alignment pipeline generally works as follows  and aligned base proportion per read (default = 80%), the optimal local alignment will be considered as qualified. Otherwise, we will attempt to rescue the read using a semi-global alignment approach. As an optimal local alignment usually indicates the most similar region on the genome, our semi-global alignment approach takes the optimal local alignment as a variable-length seed, re-computes a new mapping region on the genome and then performs semi-global alignment between the read and the new mapping region to obtain an optimal semi-global alignment. If the optimal semi-global alignment satisfies the global-alignment constraints, including minimal percentage identity (default = 65%) and aligned base proportion per read (default = 80%), this alignment will be deemed to be qualified. This double-alignment approach enables us to capture the alignments with more continuous mismatches and longer gaps. This is because we might fail to get good enough optimal local alignments in such cases, as the positive score for a match is usually smaller than the penalty charged for mismatches and indels.k-mer seeds. To improve speed, we search all non-overlapping k-mers of the read against the genome to identify seed matches. Subsequently, we employ the k-mer seeds to repeat the aforementioned alignment process to rescue the read. If we still fail to gain a qualified alignment, we will stop the alignment process and then report this read as unaligned.Finally, when we still fail to get any qualified alignment, this likely means that the true alignment is implied by none of the evaluated MEM seeds. In this case, we attempt to rescue the alignment by re-seeding the read using exact-match In comparison with SE alignment, the long-range positional information contained in PE reads usually allow for more accurate short-read alignment, by either disambiguating alignments when one of the two ends aligns to repetitive regions or rescuing one end from its aligned mate. In addition, for aligners based on the seed-and-extend heuristic, the PE information, such as alignment orientations and insert-size of both ends, can aid to significantly reduce the number of noisy seeds prior to the time-consuming alignment extensions. This filtration can be realized through a seed-paring heuristic S1 and S2, our PE alignment pipeline generally works as follows  and the mapping region derived from the seed, and m is the positive score for an alignment match. To rank all qualified seed pairs, we employ w as the key of each entry in the max-heap.To guide the production of real PE alignments in a quality-aware manner, we introduce a weighted seed-paring heuristic computing a weight iq is not definitely the optimal local alignment score, but might be the optimal semi-global alignment score. This is because an alignment is possibly produced from a semi-global alignment as mentioned above. Furthermore, when two qualified alignment pairs hold the same weights, we further rank them by comparing the sums of the edit distances of each alignment pair. In this case, smaller edit distance sums mean higher ranks.In addition to seed pairs, all qualified alignment pairs have been further ranked in terms of weight and edit distance. For an alignment pair, we calculate its weight following For unpaired reads, we have employed a read mate rescuing procedure, which attempts to rescue one read from the top hits of its aligned mate by using the paired-end long-range distance information. In general, our rescuing procedure works as follows.First, the best alignments of the two reads are computed (if available). The read, whose best alignment has a MAPQ exceeding a minimum threshold (default = 20), will be used to rescue its mate. If an optimal alignment satisfying the aforementioned constraints has been gained for the mate, the two reads are considered as paired. Otherwise, we will continue the rescuing process using the alignments with smaller MAPQs. Secondly, if the two reads have not yet been properly paired, we will attempt to pair them from more top hits of both reads. The rescuing process will not stop until the two reads have been properly paired or having reached the maximum number (default = 100) of top seeds for each read. Finally, for unpaired reads, we will report their best alignments (if available) in a SE alignment mode.This read mate rescuing is usually time-consuming mainly due to two factors. One is the dynamic-programing-based alignment with quadratic time complexity. The other is the maximal insert-size of a read pair, which basically determines the mapping region size of the mate on the genome. In sum, the more reads are paired by seed-pairing heuristic; the less time is taken by the read mate rescuing procedure.Most existing color-space aligners encode a nucleotide-based genome as a color sequence and then identify potential short-read alignment hits in color space. However, different approaches may be used to produce the final base-space alignments. For a color-space read, one approach is to identify a final color-space alignment and then convert the color sequence to nucleotides under the guidance of the alignment using dynamic programming In our aligner, we also convert a nucleotide-based genome to a color sequence and perform short-read alignment in color-space basically following the same workflow as the base-space alignment (mentioned above). For a color-space read, after obtaining a qualified color-space alignment, we must convert the color sequence into a nucleotide sequence. This conversion is accomplished by adopting the dynamic programming approach proposed by Li and Durbin File S1Supplementary Tables and Figures.(PDF)Click here for additional data file.


The 16S rRNA is by far the most common genomic marker used for prokaryotic classification, and has been used extensively in metagenomic studies over recent years. Along the 16S gene there are regions with more or less variation across the kingdom of bacteria. Nine variable regions have been identified, flanked by more conserved parts of the sequence. It has been stated that the discriminatory power of the 16S marker lies in these variable regions. In the present study we wanted to examine this more closely, and used a supervised learning method to search systematically for sites that contribute to correct classification at either the phylum or genus level.When classifying phyla the site selection algorithm located 50 discriminative sites. These were scattered over most of the alignments and only around half of them were located in the variable regions. The selected sites did, however, have an entropy significantly larger than expected, meaning they are sites of large variation. We found that the discriminative sites typically have a large entropy compared to their closest neighbours along the alignments. When classifying genera the site selection algorithm needed around 80% of the sites in the 16S gene before the classification error reached a minimum. This means that all variation, in both variable and conserved regions, is needed in order to separate genera.Our findings does not support the statement that the discriminative power of the 16S gene is located only in the variable regions. Variable regions are important, but just as many discriminative sites are found in the more conserved parts. The discriminative power is typically found in sites of large variation located inside shorter regions of higher conservation. The use of stable parts of the genomic content as an evolutionary marker was a breakthrough for microbial studies in the 1980s . The 16SThe location of the variable regions, and implicitly the conserved parts flanking them, has been based on some multiple alignment of more or less full-length 16S genes. Van de Peer et al. , and conin silico in a sequence of genomic DNA, or more commonly, in situ by polymerase chain reaction (PCR) amplification [Escherichia coli 16S rRNA [The conserved parts are used to locate the marker gene, either fication  based on16S rRNA . Over th16S rRNA ,13.et al.[In recent years it has been discovered that the conserved parts are not in fact as conserved as once conceived, and that there are really no such thing as universal PCR-primers that will sample equally well in all branches of the tree-of-life -16. A reet al. considerWe approach this problem by classifying the 16S sequences using a multivariate method and data consisting of multiple alignments. We conduct a systematic search for the best discriminative sites along the alignments. We use high-quality data from the databases Greengenes , the RibSSURef_111_NR_tax_silva_trunc_aligned containing 286 858 sequences over 45 984 positions.Data were downloaded from three databases; Greengenes , RDP 2222 and SIA,C,G,T or -) and sequences not classified to one of the 2074 bacterial genera listed in the List of Prokaryotic names with Standing in Nomenclature . We also discarded duplicated sequences. This resulted in a reduced alignment of high-quality data from each database, see Table From all alignments we discarded sequences less than 1200 bases long, sequences having alien characters .A, C, G and T were discarded as these provided too little data. At each remaining site k we computed the entropy To relate sites in the three alignments to each other, and to conserved/variable regions, we computed the entropy for each site in each alignment. This approach has also been used in previous studies (e.g. ). For alp1,p2,p3 and p4 are the empirical proportions of the four bases appearing at position k.where In order to visually identify the regions of high/low entropy, this entropy was smoothed across positions using a centered moving average of length 51. Figure In order to search for discriminating sites along the 16S alignments in a systematic way, we implemented a supervised learning approach. The input data to the supervised learning method are one of the three alignments previously described and the class-labels for each sequence in the alignment. We have used the Partial Least Squares (PLS) method , which iA,C,G,T or -. In order to use the supervised learning method we coded each symbol into a row-vector of five binary values. The symbol A was coded as , C as , G as , T as  and the indel - as . Thus, each N×1 column of symbols in the alignment gives rise to a N×5 matrix of binary values to be used in the PLS-algorithm. Where N is the number of sequences. We use the term variable instead of site below, but each site actually gives rise to five numerical (binary) variables.All three alignments were considered one at a time. Each site in the alignment contains a column with the symbols N×1 column containing 11 different phyla was translated into an N×11 matrix of binary values, where Proteobacteria corresponds to , Firmicutes to  etc.The response variable is in this case the class labels, and this was also coded in a similar way, using one bit for each class. As an example, when using phylum as response, the single Being a multivariate method, PLS finds combinations of the explanatory variables giving the minimum classification error. These combinations are referred to as PLS components. In principle, all explanatory variables are included, and given more or less weight in the components. Variable selection means we intend to select only a subset of the original explanatory variables, and then combine these to achieve the best possible discrimination. There are many approaches to variable selection under the PLS paradigm , and forThe site-selection algorithm contained the following steps: •A 10-fold cross validation was first used to find the optimal number of PLS-components needed to classify the given response with the minimum obtainable error.•A PLS regression model was fitted to the full data set, with the fixed number of components from Step 1, to obtain regression coefficients for all explanatory variables. For every explanatory variable the selectivity ratio.•For every explanatory variable the selectivity ratio was calculated based on the regression coefficients from 2. Due to the coding, each site in the alignment corresponds to five SR-scores. The maximum of these five SR-scores was used as a site specific SR-score.•These site specific SR-scores were sorted in descending order; the largest SR-score corresponding to the most interesting sites. One by one the sites were included in the final model, and a 10-fold cross validation was again conducted to estimate a classification error. The final choice of how many sites to include was based on this classification error.smoothed entropy in order to display the regions. The actual entropy at the various sites fluctuates much more, as we will come back to below.We extracted 12362 unique sequences from the three databases Greengenes, RDP and SILVA, all having at least 1200 bases, no alien characters, found in all three databases and with identical assignment to genus. This consensus data set must be considered a high-quality data set for 16S sequences, and an overview is given in Table Instead of focusing on conserved or variable sites, we used the PLS supervised learning method to extract the sites giving the best possible discrimination regardless of where they may be along the alignment. First, we used phylum as response, i.e. there are 11 distinct classes, and for each of the three alignments  we employed the site selection algorithm.A or not an A at this position. The three panels in Figure Figure The first impression given by Figure p<0.0001 here. The point is that selected sites have high entropy, but are not necessarily located in high-entropy regions. In fact, they tend to have much higher entropy than their surrounding sites, which is shown in the right panel of Figure Even if selected sites are both inside and outside of variable regions, their actual site-specific entropy from eq. (1) are in all cases significantly above the average entropy for the entire alignment. This was tested by a simple permutation test, and the results are displayed in the left panel of Figure Figure From Figure Next, we repeated everything done so far, but using genus instead of phylum as class labels. This means we have 198 instead of 11 classes, making the separation much more difficult. In Figure The aim of this study was to investigate the dogma of 16S based classification, stating that the key information for separating classes is harboured in the variable regions of this marker. By using three different multiple alignments of the same sequence data, we implemented a supervised learning method to systematically search for discriminative sites without any constraints with respect to conservation. The selected sites came out remarkably similar for the three data sets, a sign of a stable selection despite the obvious differences between the three alignments.Our first major finding is that the discriminative sites are not exclusively located in the variable regions. In fact, the nine variable regions are not even enriched with sites selected by our algorithm. Variable regions are important, but not more important than any other region. The second major finding is that discriminative sites are typically sites with high entropy located among neighbouring sites of much lower entropy. This seems like a logical outcome. Regions of lower entropy means some degree of conservation, and alignments tend to be more accurate in such regions. If a site inside such regions show a much larger variation, it is more likely this is due to real biology, not alignment errors.We believe these findings should be taken into consideration when it comes to improving methods for 16S based classification of bacteria.The authors declare that they have no competing interests.The project was initiated by LS and KHL. All authors have been involved in the development of the approach. KHL and HV did the programming. HV and LS drafted the manuscript. All authors have read and approved the final version.


Large-scale protein structure alignment, an indispensable tool to structural bioinformatics, poses a tremendous challenge on computational resources. To ensure structure alignment accuracy and efficiency, efforts have been made to parallelize traditional alignment algorithms in grid environments. However, these solutions are costly and of limited accessibility. Others trade alignment quality for speedup by using high-level characteristics of structure fragments for structure comparisons.ppsAlign, a parallel protein structure Alignment framework designed and optimized to exploit the parallelism of Graphics Processing Units (GPUs). As a general-purpose GPU platform, ppsAlign could take many concurrent methods, such as TM-align and Fr-TM-align, into the parallelized algorithm design. We evaluated ppsAlign on an NVIDIA Tesla C2050 GPU card, and compared it with existing software solutions running on an AMD dual-core CPU. We observed a 36-fold speedup over TM-align, a 65-fold speedup over Fr-TM-align, and a 40-fold speedup over MAMMOTH.We present ppsAlign is a high-performance protein structure alignment tool designed to tackle the computational complexity issues from protein structural data. The solution presented in this paper allows large-scale structure comparisons to be performed using massive parallel computing power of GPU. Large-scale protein structure comparison is becoming a more and more important approach to providing a better picture for understanding biological systems ,2. GivenSeveral approaches have been developed to address the limitations of traditional alignment methods and tackle the computational issues. The traditional alignment methods ,2,7, sucWith the increase in performance and programmability of many-core Graphic Processing Units (GPUs), more and more bioinformatics applications have been deployed on GPUs and have shown promising results in terms of speedup over their conventional CPU implementations. Liu et al.  implemenppsAlign, a parallel protein structure Alignment framework which is designed and optimized to exhaustively exploit the parallelism of the GPU architecture for residue-level structure comparisons. Our experimental results (reported on a NVIDIA Tesla C2050 GPU card) show that ppsAlign significantly outperforms existing structural alignment tools in computational efficiency.In this paper, we present We believe that GPU's massive parallel computing power can unlock the door to a cost-effective and high-performance computing environment that can be beneficial to the structural biology community.ppsAlign is shown in Figure Λ = {P1, P2, ...., nP}. The outputs are structure alignments between the target protein and each database protein. The online alignment starts with a generation of some initial sets of matched fragments and corresponding alignments. Then, the initial alignments are extended and refined using Dynamic Programming to obtain the final results. Specifically, the ppsAlign algorithm consists of 5 steps: 1) Index-based matched fragment set (MFS) search is utilized to find the maximal seed Nseed MFS' between the target protein and each database protein; 2) Fragment-level alignment is used to assemble the MFS' and generate initial alignments; 3) Residue-level alignment is used to refine the initial alignments to residue alignments; 4) Maximal alignment search is used to find a transformation that can best superimpose the entire target protein over each database protein based on the obtained residue alignments; 5) Final assessment is performed to calculate z-Score and evaluate statistical significance of alignments. Steps 1) and 5) are executed on the CPU core, while steps 2) ~ 4), the most time-consuming parts of ppsAlign, are implemented as GPU kernels and iteratively executed on GPU for iter Ntimes. The GPU kernels are developed using CUDA (Compute Unified Device Architecture) programming model [ppsAlign has an off-line component that pre-processes substructures from the entire protein database and builds an indexing tree to allow fast retrievals.The framework of ng model . During ng model ,31. To fQ Lresidues and a database protein with P Lresidues, respectively. Here, q and p represent 3D coordinates of the α Catoms. A fragment f is a set of f L( = 8) continuous residues with the direction from N terminal to C terminal along the protein backbone. A MFS includes two non-empty subsets, Q Fand PF, which contain an order of fragments that conforms to some criteria of structural similarity between Q and P, respectively. The fragments in a MFS will then be used to generate a rough alignment between Q and P in the fragment-level alignment.The purpose of this CPU-based step is to quickly find all possible matched fragment sets (MFS') between the target protein and each database protein for further refinement based on an information retrieval (IR) approach which goes beyond the capability of the traditional "bag of words" concept by introducing spatial relationships among these fragments. Let Q are indexed by an indexing tree in which each leaf node is denoted by Λ tis returned. For simplicity, we use t to denote Λt. The database proteins that have substructures in Λ tcan be found by an inverted index. Such a database protein, P, can be represented by an order of substructures, denoted by tΩ, occurring in t. Likewise, the protein Q can be represented by an order of substructures, denoted by t. As substructures identified by the same t are similar, they can be used as "anchors" for rough alignments. For detailed explanation of the substructure mapping method, readers are referred to [The MFS search utilizes the substructure mapping method of the Index-based Substructure Alignment algorithm , developerred to .ppsAlign, substructures are further projected into fragments as follows: if any residue of a substructure from P F(or QF). The fragment subsets P Fand Q Fare used to construct a MFS between the protein Q and P. After searching all Qt, we can obtain all possible MFS' between Q and database proteins, if any. In this step, if the algorithm cannot find any MFS for a database protein, all the fragments from Q and the database protein are selected to form a MFS. An example of MFS searching and construction is illustrated in Additional file In Q and each database protein are ranked according to scoring function MFS Sand the top seed Nsets are selected. The scoring function is defined as follows:After searching MFS, a filtering process is called to remove redundant MFS'. Then, the non-redundant MFS' between Q Nand P Ndenote the cardinality of Q Fand P Fin a MFS, respectively.where Q Nand PN. The values 1, w2w, and 3 ware used to weight the contributions from the three terms.ppsAlign in order to compute the alignments on GPU are: structures of the protein Q and of the database proteins, and MFS'. To allow efficient processing, those data must be judiciously laid out on the GPU memories. Specifically, the database structures are transferred to the texture memory before execution. The MFS' are transferred from CPU memory to GPU global memory as inputs to the fragment-level alignment  of each fragment pair for 1 ≤ i ≤ Q Nand 1 ≤ j ≤ P Nusing the following recurrence:In this step, the fragments in each MFS are assembled to obtain initial alignments using Dynamic Programming (DP). For a given MFS, the DP algorithm first sorts the fragments from f Gis gap penalty and f Sis based on the inverse cosine distance of fragment's feature vector. Given a fragment pair, A and B, and their corresponding feature vectors A Dand B, Sf Dis calculated as follows:where A, DB D> is the inner product of A Dand BD, ||AD|| and ||BD|| are the norm of A Dand BD, respectively. In the current implementation, features only use Euclidean distance of each residue pair for fast calculation. The main reason for using feature distance as an approximate measure of fragment similarity is the need for simple control paths due to the SIMT  computing mode of the GPU [where < the GPU . Traditi the GPU , which cf Sby assigning a database protein to each thread. This kernel performs all-against-all fragment comparisons and writes similarity scores into the GPU global memory.The pseudo-code in Figure T Nthat can run concurrently on the GPU is mainly limited by the global memory capacity of the GPU (in this phase each thread requires approximately 10 kB of memory). Suppose that the total number of MFS between Q and all database proteins is FN. If F N>TN, the overall MFS' will be divided into batch N= ⌈FN/TN⌉ batches. ppsAlign sequentially schedules each batch to run on GPU. In each batch, the DP is first executed as a GPU kernel and each thread corresponds to a MFS. Then, the GPU kernel for the back tracing is called to obtain alignment paths for each MFS. When a batch terminates, ppsAlign transfers the output  from the GPU memory to CPU memory. After aggregating the outputs from all batches, ppsAlign first performs filtering to remove redundant alignments, and then assembles all the fragments along the alignment paths to form residue alignments which will be further refined by the residue-level alignment.The second GPU kernel implements the DP algorithm, whereas the third one performs back tracing. The total number of threads T N× SN) where S Nis the maximal size of all MFS'. Each thread of the DP kernel fetches a MFS to initialize its setting. The score and direction matrices are stored in a separate 3D memory block of size (Q N× P N× TN), where Q Nand P Nrepresent the maximal number of fragments from the target protein and all the database proteins, respectively. The alignment paths are then stored in a 2D block of size (P N× TN). In ppsAlign, multiple GPU memory accesses are coalesced into a single transaction whenever possible. This fragment-level alignment process provides a selection of seed fragments which are likely to be successful in accurate alignment. Only approximately 1.6% of the total execution time is spent in this phase.It is critically important to effectively utilize the limited memory resources of the GPU. Our GPU memory allocation scheme is exemplified in Figure R = { | iq∊iQ', p∊P'}, where Q' ⊆ Q (target protein) and P' ⊆ P (database protein).The results of fragment-level alignment are then refined by a residue-level alignment process. Such a refined alignment result is an ordered set T that minimizes the RMSD of R is first calculated. Then, the transformation T is used to superimpose all the residues from Q over P. Finally, the DP algorithm is used to find an alignment path between Q and P similar to the fragment-level alignment. In the DP, the gap penalty r Gis set to 0 and the residue similarity score r Suses the scoring function from TM-align [In this step, a rigid-body transformation (rotation and translation) TM-align . HoweverTM-align .T  make itlgorithm , gRMSD-QR to the GPU global memory. Next, the gRMSD-QCP kernel is invoked to calculate the transformation T which is also written into the GPU global memory. Finally, a DP kernel is called to find residue alignments which are transferred into the CPU memory after the kernel terminates.The GPU implementation of residue-level alignment starts with loading coordinates of residues from ppsAlign aggregates the outputs of residue alignment R, which are used in the next step for searching the maximal alignment.As in the fragment-level alignment phase, the residue-level alignments are divided into batches according to the memory requirement of the threads. After all the batches are executed, M ⊆ R such that the score of the residue alignment R, denoted by aS, is maximized. Because finding the largest subset M is extremely time-consuming, a heuristic and approximate algorithm, MaxSub [ppsAlign, a variant of MaxSub, gMaxSub, is designed to parallelize the search process on the GPU. In the current implementation of a ppsAlign, Sis defined using the TM-score [The maximal alignment search is used to find the largest subset , MaxSub , has beeTM-score .R from the residue-level alignment which has R Laligned residue pairs. The original MaxSub algorithm on CPU searches the largest subset M by shifting a window W of size W Lalong R  shift operations which are candidates for parallelization. Then, gMaxSub searches the maximal alignment by concurrently dispatching each calculation of W to different GPU threads  windows are generated. Second, the gRMSD-QCP kernel is invoked to calculate the transformation T for the residue pairs within each W and then T is used to superimpose residues from Q over P in R. Third, residue pair ∊R is added into W if its distance is below a cutoff (4.0 Å) after the superimposition. The above two steps  are iteratively executed for MS Ntimes. Forth, the last W is assigned to M and a Sis calculated.Figure ppsAlign aggregates the outputs of subset and selects the one with the largest a Sas the largest subset M. The transformation T associated with the largest subset M is used to superimpose all the residues from Q over P and the residue pair whose distance is below a cutoff (4.0Ǻ) is selected to form a new residue alignment R.As in previous phases, the maximal alignment searches are divided into batches. After all the batches are executed, iterN, the residue alignment R will be first filtered to remove redundant alignments from the same database protein and then sent to the residue-level alignment for further refinement; otherwise, R will be used as input for the next step of final assessment.After gMaxSub terminates, if the current iteration number <R are transferred from the GPU memory to CPU memory. We use PSI , defined as the percentage of residue pairs from R with distance below 4.0 Å, to score the alignment quality. We also assess the statistical significance of the alignments through z-Score of the PSI, which is given as follows:After structure alignments are computed on GPU, the residue alignments PSI μand PSI σdenote mean and standard deviation of PSI for a given protein chain length, respectively. The parameters PSI μand PSI σare obtained using a method similar to [PSI μ= 375.64·k-0.5295 and PSI σ= 99.67·k-0.5885. Here, k is the minimum chain length between target and database proteins.where milar to , leadingppsAlign's performance to concurrent methods in terms of alignment quality and computational efficiency. We evaluate ppsAlign using an NVIDIA Tesla C2050 GPU card equipped with 448 cores at 1.15 GHz and 3 GB global memory. The concurrent methods include TM-align [ppsAlign. As DALI [In this section, we compare TM-align , Fr-TM-aTM-align , and MAMTM-align , which s As DALI  have bee As DALI , we do neN) while minimizing the RMSD of the aligned residues, denoted by cRMSD. To eliminate the size dependence of cRMSD on eN, in this paper we use a normalized measure of cRMSD, RMSD100, to evaluate the alignment quality. RMSD100 is calculated as follows [The main purpose of structure alignment is to maximize the number of aligned residues  by sending the alignment tasks to our CPU-based algorithm and 2) if resource allows, by using another GPU card to align the remaining 1.5% of large structures. Although the algorithm can also handle small protein chains below 80 residues (~16% of ASTRAL40), we do not use them for our testing because they have relatively simple topologies [To evaluate efficiency, we measure the execution time on a dataset in which the protein's chain length is in a range from 80 to 500 residues extracted from ASTRAL 1.75 database  with seqpologies .1D, which includes 6, 569 proteins in the range [80, 250) residues selected from ASTRAL40 according to the length distribution of proteins, and 2) 2D, which includes 1, 912 proteins in the range [251, 500) residues. The target dataset includes 100 proteins which are randomly selected in the range [80, 250) from ASTRAL40. For each target protein, a one-against-all alignment is performed with all database proteins and totally 100 ×  = 848, 100 non-homologous protein pairs are compared during the experiment.To efficiently utilize global memory of GPU card, the entire database proteins are sorted according to the chain length and then divided into two small datasets: 1) ppsAlign, namely the maximal number of iteration (iterN) and the maximal number of MFS (seedN). Intuitively, when increasing iter Nor seed, ppsAlign Nwill often obtain better alignment quality but the execution time will be significantly lengthened. To verify this, we preliminarily investigate the performance of different settings using a small target dataset of 17 proteins and the dataset 1 Din terms of RMSD100. The experimental results of RMSD100 with iter N= {3, 5, 7} and seed N= {10, 30, 50, 70} are shown in Figure ppsAlign has decreased RMSD100 when iter Nand/or seed Nis increasing. This figure can be used as a guideline for parameter selection of ppsAlign. For a fair comparison of efficiency improvement from ppsAlign to a concurrent method, we select a combination of iter Nand seed Nthat achieves comparable alignment quality.There are two critical parameters for ppsAlign is executed with a parameter setting of iter N= 3 and seed N= 20 which results in a comparable RMSD100 to TM-align and the CPU version of ppsAlign. Table ppsAlign achieves speedups of 23.8 and 35.9 compared to CPU-based ppsAlign and TM-align, respectively. The detailed comparison of alignment quality of ppsAlign and TM-align can be found in Additional file In this experiment, ppsAlign algorithm to achieve a comparable alignment quality with Fr-TM-align. The experimental results of RMSD100, average execution time, and corresponding speedup with iter N= 6 and seed N= 30 are shown in Table ppsAlign achieves speedup 64.7 compared to Fr-TM-align with the same alignment quality. The detailed comparison of alignment quality of ppsAlign and Fr-TM-align can be found in Additional file Since Fr-TM-align performs more iterations to improve its alignment quality over TM-align, we increase both iteration and seed numbers of ppsAlign and MAMMOTH. Different from TM-align and Fr-TM-align, MAMMOTH is originally developed for the purpose of large-scale comparisons with high efficiency at the cost of the reduction of alignment quality. Because of its high speed, MAMMOTH is used as a benchmark for maximal speed on the CPU platform in [100, average execution time, and corresponding speedup with iter N= 1 and seed N= 8 are shown in Table ppsAlign achieves speedup 40.3 compared to MAMMOTH and higher alignment quality. The detailed comparison of alignment quality of ppsAlign and MAMMOTH can be found in Additional file In the last experiment, we use the same dataset to compare the performance of tform in . The expppsAlign is a general-purpose GPU platform for protein structure alignment which could take many concurrent methods, such as TM-align [ppsAlign utilizes a hybrid inter- and intra- task parallel model. In particular, each task  is divided into several independent seed alignments. Each seed alignment is assigned to a different thread , whereas each block executes one or more pair-wise comparisons . Second, a smart design of memory layout and memory access patterns are developed, the former allowing an effective use of the memory capacity at the different levels of the GPU memory hierarchy, and the latter minimizing the memory bandwidth requirement of the application. Third, several efficient algorithms for avoiding complex control flow on GPU are proposed to take advantage of the SIMT nature of the GPU. For instance, a feature-based measure is used to compute similarity of fragment at the fragment-level alignment which can avoid time-consuming RMSD calculation at the initial stage of structure alignment.The framework of TM-align  and Fr-TTM-align , into thTM-align ,20. HoweppsAlign differs to other methods is implementing protein structure alignment at the residue level on GPU. Recently, the GPU-enhanced algorithms are gaining an increasing attention in bioinformatics. One of the major steps was a GPU implementation of a one-against-all sequence comparison using Smith-Waterman algorithm [ppsAlign is the first protein structure comparison platform for GPU that provides the residue level structural alignment.One of the major ways in which lgorithm ,21. Withlgorithm . To provlgorithm  was develgorithm . Comparelgorithm , aligns ppsAlign is to provide a high-performance computing platform for the research community. An alternative solution to accelerate the protein structure alignment is to install more CPU computing cores in a single machine. However, using more CPU cores in a single machine need to upgrade main board and memory accordingly, which could decrease price/performance ratio. In contrast, installing a GPU card into a PCIe  slot does not require extra cost and more GPU cards can be installed into one PCIe slot by a switch. In this paper, an NVIDIA Tesla C050 GPU card is utilized to evaluate performance, which has also been used in GPU-BLAST [The substantial contribution of PU-BLAST . Though ppsAlign for large-scale protein structure alignment using GPUs. ppsAlign employs an index-based search procedure to find seeds of matched fragment sets, and then iteratively refines the seeds with fragment- and residue- level alignments. We provide an in-depth comparison of ppsAlign against several concurrent CPU-based methods. Our experimental results show that ppsAlign can achieve significant speedup over its CPU implementation, TM-align, Fr-TM-align, and MAMMOTH on a single NVIDIA Tesla C2050 GPU.This paper presents ppsAlign is not designed as a replacement for the existing structural alignment tools, but as a general-purpose platform for protein structure alignments on GPU. With this platform, we can parallelize the existing algorithms  on GPU and utilize the massive parallel computing power of GPU to achieve high-throughput structural comparisons without sacrificing alignment quality.We emphasize that the framework of ppsAlign• Project name: http://proteindbs.rnet.missouri.edu/ppsalign/ppsalign.html• Project home page: • Operating system(s): Linux• Programming language: CUDA, JAVA, and PHP• License: noneBLAST: Basic Local Alignment Search Tool; CPU: Central Processing Unit; CUDA: Compute Unified Device Architecture; DP: Dynamic Programming; GPU: Graphics Processing Units; IR: information retrieval; MFS: matched fragment set; PCIe: Peripheral Component Interconnect Express; RMSD: Root mean square deviation; SA. simulated annealing; SIMT: Single Instruction: Multiple Thread; SSE: secondary structure element.http://www.wwpdb.org/.The data sets supporting the results of this article are available in the Worldwide Protein Data Bank repository, The authors declare that they have no competing interests.BP developed the software and wrote the manuscript. NZ analyzed results and contributed to the discussion. MB and DK contributed to discussion, analyzed the results, and revised the manuscript. CRS coordinated the study and contributed to writing the manuscript. All authors read and approved the final manuscript.Figure S1. In this example, one leaf node Q is used to search the indexing tree of entire protein database Λ and m best matched nodes are returned. In this example, j, 1, uj, 2, uj, 3u} from Q. A search of Λ returns two database leaf nodes, i, 1, 1, di, 1, 2d} and {i, 2, 1, di, 2, 2, di, 2, 3d} which are from database proteins 1 Pand 2P, respectively. k, 1, 1, dk, 1, 2d} and {k, 3, 1, dk, 3, 2, dk, 3, 3d} from database proteins 1 Pand 3P, respectively. The RMSD of Q can be represented by j, 1, uj, 2, uj, 3u}. The database proteins 1, P2P, and 3 Pcan be represented by i, 1, 1, di, 1, 2, dk, 1, 1, dk1, 2d}, i, 2, 1, di, 2, 2, di, 2, 3d}, and k, 3, 1, dk, 3, 2, dk, 3, 3d}, respectively. After projecting the substructures to fragments, we have three MFS' for node i of the indexing tree of Q for 1, P2P, and 3P. Table S1. Comparison of alignment quality (RMSD100) of ppsAlign and TM-align. The table compares the alignment quality measured in RMSD100 of the 100 target proteins using ppsAlign and TM-align. Table S2. Comparison of alignment quality (RMSD100) of ppsAlign and Fr-TM-align. The table compares the alignment quality measured in RMSD100 of the 100 target proteins using ppsAlign and Fr-TM-align. Table S3. Comparison of alignment quality (RMSD100) of ppsAlign and MAMMOTH.The table compares the alignment quality measured in RMSD100 of the 100 target proteins using ppsAlign and MAMMOTH.Click here for file