BACKGROUND
due to the increasing speed and number of genome sequencing projects, the gap between the number of known structures and the number of known protein sequences keeps increasing.
as a result, demand for reliable computational methods today is higher than ever, while in silico estimation of protein structures remains one of the most challenging tasks in bioinformatics.
the central assumption of comparative bioinformatics methods for proteins is that the structures of proteins are more conserved than their amino-acid sequences.
this allows homology modelling, namely, mapping the structure of a sequence onto homologous sequences.
as insertions and deletions separating two homologous sequences accumulate, homologous characters in the two sequences will occupy different positions, which causes a non-trivial problem of identifying homologous positions.
this problem can be solved by sequence alignment algorithms  <cit> , which maximise the similarity between aligned positions while also minimise the insertions and deletions needed to align the sequences.
the relationship between gap-penalties and similarity scores can be set such that they maximise the number of correctly aligned positions in a benchmark set of alignments  <cit> .
by contrast, stochastic models are capable to calibrate their parameters by applying a maximum likelihood approach even if no benchmark set is available.
hidden markov models were the first such stochastic models which have appeared in bioinformatics more than ten years ago  <cit> .
thorne, kishino and felsenstein introduced time-continuous markov models for describing insertion and deletion events  <cit> , and they showed on simulated data that the maximum likelihood method could correctly estimate the insertion-deletion as well as the substitution parameters with which the simulated data had been generated.
the tkf models have subsequently been improved  <cit> , and have been tested for alignment accuracy on biological data  <cit> .
above automatic parameter estimation, the other main advantage of stochastic models is that such models can provide posterior probabilities for each estimated alignment column as well as for the whole alignment, and these posterior probabilities correlate with the probability for the alignment column being correctly aligned  <cit> .
the uncertainty in the sequence alignment can be slightly reduced when more than two sequences are simultaneously aligned together, and hence, much effort has been put in developing accurate multiple sequence alignment methods.
although efficient algorithms exist for any type of pairwise alignment problem, the multiple sequence alignment problem is hard.
it has been proved that the optimal multiple sequence alignment problem under the sum-of-pairs scoring scheme is np-hard  <cit> , and it is strongly believed that the statistical approach to multiple sequence alignment is algorithmically not simpler than score-based approaches.
since it is unlikely that fast algorithms exist for any type of exact multiple sequence alignment problem, heuristic approaches have become widespread.
profile-hmm methods  <cit>  align sequences to a profile-hmm instead of each other, and the multiple sequence alignment is obtained by aligning sequences together via a profile-hmm.
since the jumping and emission parameters of the hmm are learned from the data, this approach needs many sequences for parameter optimisation.
nevertheless, profile-hmms do not consider evolutionary relationships amongst sequences, and hence, they cannot handle properly over-representation of evolutionary groups.
iterative approaches have been introduced for score-based methods in the eighties  <cit>  and have recently been extended for stochastic methods  <cit>  using the transducer theory  <cit> .
the drawback of iterative approaches is that in each iteration, they consider only a single, locally optimal alignment that might not lead to a globally optimal alignment.
moreover, as they consider only locally optimal partial solutions, they naturally underestimate the uncertainty of posterior probabilities.
the markov chain monte carlo  method represents a third way to attack the multiple stochastic alignment problem.
it was first introduced for assessing the bayesian distribution of evolutionary parameters of the tkf <dig> model aligning two sequences  <cit> , and has subsequently been extended to multiple sequence alignment  <cit> .
the general theory of markov chain monte carlo  <cit>  states that the markov chain will be in the prescribed distribution after infinite number of random steps.
obviously, we cannot wait infinite many steps in practice, and therefore the success of mcmc methods depends on fast convergence: if the markov chain converges quickly to the prescribed distribution, the bias of samples from the markov chain after a limited number of steps will be negligible.
the convergence can be checked by measuring autocorrelation in the log-likelihood trace or a few other statistics of the markov chain and by running several parallel chains with different random starting points  <cit> .
since the above mentioned methods for multiple stochastic sequence alignment problems have been introduced only recently, no large-scale, comprehensive analysis on the performance of methods for protein structure prediction has been published yet.
in this paper, we present a survey on how stochastic alignment methods can be used for protein secondary structure predictions.
the prediction can be based on pairwise or multiple alignments and in both cases, either only a single, optimal alignment or the whole posterior distribution of alignments is used for prediction.
we are interested in the question how much one can gain by involving more sequences and the posterior distribution of the alignments into the secondary structure prediction.
RESULTS
implementation of the methods
we implemented a stochastic pairwise and a stochastic multiple sequence alignment method in java programming language , and we made a study of the methods on the homstrad database as described in the methods section.
the stochastic pairwise alignment method was tested on all the possible  <dig> pairs of sequences belonging to the same family.
the analysis took two days on an intel xeon  <dig>  ghz computer with suse linux  <dig>  operating system and jvm  <dig> .
<dig>  the most time-consuming part of the analysis was the maximum likelihood parameter optimisation, which took approximately 90% of the total running time.
<dig> families have been selected for testing the stochastic multiple sequence alignment method, see table  <dig>  the families have been selected such that they reasonably cover the percentage identity distribtion of the homstrad database and they contain relatively many and approximately the same number of sequences.
there are  <dig> possible pairs of homologous sequences obtainable from the  <dig> families, which is  <dig> % of the possible homologous sequence pairs of the homstrad database.
the analysis was performed on the zuse cluster of the oxford supercomputing centre, each job ran on a dual intel xeon  <dig> ghz processor under jvm  <dig> .
<dig>   <dig> mcmc steps were taken after convergence on each family.
the running time of the analysis varied between  <dig>  hours  and two days .
the convergence has been verified based on the log-likelihood trace and comparing sampling distributions from parallel chains with different starting points, see fig.
<dig>  for an example.
post-processing the data
secondary structure predictions have been given in four ways:
• based on the viterbi alignment .
in this case, the most likely – a.k.a.
viterbi – alignment was obtained for all pairs of sequences and was used to map the secondary structure of one of the sequences onto the other sequence.
• based on the posterior distribution of pairwise alignments using the forward-backward algorithm .
in this case, the posterior probabilities that two amino acids are aligned together were obtained for all pairs of sequences and all pairs of amino acids.
the secondary structure of one of the sequences was mapped onto the other sequence in a fuzzy way using the posterior probabilities.
• based on the maximum posterior decoding estimation from samples of a markov chain monte carlo  stochastic multiple alignment .
in this case, the maximum posterior decoding  alignments were predicted from mcmc samples and were used to map the secondary structure of one of the sequences onto the other sequences.
the mpd alignment maximizes the product of the posterior probabilities of its alignment columns.
see the methods section for an explanation why the mpd alignment can be more accurately estimated from mcmc samples than the viterbi alignment.
• based on the posterior distribution of multiple alignments obtained by mcmc stochastic multiple alignment .
in this case, the posterior probabilities that two amino acids are aligned together were estimated from the mcmc samples for all pair of sequences choosable from a multiple alignment and all pair of amino acids.
the secondary structure of one of the sequences was mapped onto the other sequence in a fuzzy way using the posterior probabilities.
amino acid sequences were divided into  <dig> categories based on their alignment posterior probabilities in the case of pairwise sequence alignments – or on their posterior structure prediction probabilities  in the case of viterbi and forward estimations, respectively.
the  <dig> categories were evenly distributed on the  <cit>  interval.
for each category and the three general types of secondary structures , the percentage of the correctly estimated secondary structure types was calculated and plotted on fig.
<dig>  in the case of the viterbi alignments, this means the ratio of the number of true positives and the number of all predictions of the given type.
in the case of the forward prediction, it is the number of amino acids of a given secondary structure type that fall in a particular category divided by the number of all amino acids in the category.
amino acid sequences of the selected  <dig> families were divided into  <dig> categories based on their alignment posterior probabilities in the case of multiple sequence alignments – or on their posterior structure prediction probabilities  in the case of mpd and bayesian estimation, respectively.
the  <dig> categories were evenly distributed on the  <cit>  interval.
for each category and the three general types of secondary structures, the percentage of the correctly estimated secondary structure types was calculated and plotted on fig.
<dig>  in the case of the maximum posterior decoding estimation, this means the ratio of the number of true positives and the number of all prediction of a given secondary structure type.
in the case of bayesian estimation, it is the number of amino acids of a given secondary structure type that fall in a particular category divided by the number of all amino acids in the category.
for a fair comparison, we repeated the pairwise sequence comparison protocols on the selected  <dig> families, the generated statistics are shown on fig.
<dig>  the statistics obtained from the  <dig> selected families show similar behavior than those obtained from the whole homstrad database: all the six curves have similar shapes in both cases.
our results indicate that methods predicting secondary structures based on a single alignment are over-pessimistic about their performance on alpha helices and beta sheets, namely, the posterior probabilities associated to the prediction are lower than the actual probability that the prediction is correct.
methods that predict structures based on the whole distribution of sequence alignments are less pessimistic – the alignment posterior probabilities better approximate the observed probabilities that the prediction is correct.
all pairwise alignment methods proved to be over-optimistic estimating the reliability of their predictions for alpha helices and beta sheets with posterior probability above  <dig> .
predicting the correctness of  <dig> helix predictions turned out to be the toughest of all secondary structure types.
each method except the bayesian estimation on multiple sequence alignments is much over-optimistic on their power of predicting  <dig> helices.
mpd is less optimistic than pairwise methods.
among all methods studied, bayesian estimation based on multiple alignments was the only one that was able to correctly predict its prediction power of all secondary structure types, including  <dig> helices, which makes mcmc-based multiple alignment methods successful candidates for promotion to a fundamental tool in protein structure prediction.
to show that the alignment posterior probabilities correlate not only with the goodness of secondary structure predictions but they also correlate with the similarities in the 3d structures, we calculated from the homstrad superimposed 3d structures the 3d distances between the cα atoms for each aligned pair of amino acids.
the alignment posterior probabilities were evenly divided into  <dig> categories, and the average 3d distances as well as the low and high quartiles have been plotted for each category.
fig.
<dig>  shows the results for viterbi alignments, both for the entire database and for the  <dig> selected sequence families.
fig.
<dig>  shows the results for the mpd alignments of the  <dig> selected families.
finally, we present on fig.
<dig>  the classical sensitivity values for the viterbi and mpd alignments.
not only the posterior goodness probabilities correlate with the alignment posterior probabilities but also the sensitivity values.
if secondary structure predictions are restricted for those alignment columns that have  <dig>  alignment posterior probabilities or greater, then the sensitivity of alpha helix and beta-sheet predictions are greater than 80%, and about 50% for  <dig> helices.
discussion
comparing predictions on different secondary structure types
the differences between the predictions of different secondary structure elements can be explained by their general attributes.
alpha helices are typically formed by  <dig> amino acids or more.
substitutions are frequent in alpha helices and they are surrounded by loop sequences where insertions and deletions often occur, therefore stochastic alignment methods realise some uncertainty, which yields relatively low posterior probabilities when aligning these regions.
however, since alpha helices are relatively long, and the substitutions that occur in them rarely change the chemical behaviour of the affected amino acids, the long runs of chemically similar amino acids in the two sequences to be aligned give a strong statistical signal that helps align alpha helices.
beta sheet elements are typically shorter than alpha helices, and are also surrounded by non-structured fragments accumulating insertions and deletions, which also yields relatively low alignment posterior probabilities.
however, beta sheet elements are more likely to be misaligned, since their short length keeps them from carrying a statistical signal that alpha helices do.
the  <dig> helices are the least conserved secondary structure elements.
even if the actual amino acid sequence does not change, mutations at other parts of the sequence might indicate a conformation change that can shift the  <dig> helix or transform it into a different structure type, see for example, fig.
<dig>  such conserved parts are assigned high alignment posterior probabilities, and they increase the false positive ratio when this  <dig> structure is mapped onto other sequences that do not contain this secondary structure motif.
the fact that different secondary structure motifs can build up the same region of a functional protein implies that the given region might not be crucial to maintaining the structure and function of the protein and thus mutations can accumulate in the vicinity of the given region.
stochastic multiple sequence alignment can reveal the uncertainty in aligning that region, which explains why multiple alignment methods improve in predicting their predicting power on  <dig> helices.
there is a similar explanation for the overoptimism in the region of  <dig>  and higher posterior probabilities in the case of alpha helices and beta sheets: slight structural changes might shift the position where an alpha helix or a beta sheet starts or ends, even if the amino acids in the positions of question do not change.
fig.
<dig>  also shows examples of such variations of secondary structure elements.
for instance, the first alignment column is indicated to have a beta sheet structure in some sequences while it is non-structural in others.
comparing predictions of different protocols
predictions based on a single, optimal pairwise or multiple alignment are over-pessimistic: alignment columns from both the viterbi alignments and the mpd multiple alignments are labelled with posterior probabilities that are typically lower than the actual probability that the secondary structure predictions are correct for these columns.
when the whole posterior ensemble of alignments is the basis of the secondary structure prediction, the posterior probabilities are closer to the actual probabilities that the prediction is correct.
one main difference between the two strategies – prediction based on a single optimal alignment and prediction based on the posterior distribution of alignments – is that in the latter case posterior probabilities of all secondary structure types are given for each amino acid, while in the former case, the viterbi or mpd alignment assigns at most one secondary structure element to each amino acid.
this suggests the hypothesis that prediction methods based on the posterior distribution of alignments are less over-pessimistic due to possessing such false positive predictions with small posterior probabilities that are not part of a viterbi or mpd alignment-based estimation.
to test this hypothesis, we predicted alpha helices and beta sheets from the posterior distribution of pairwise alignments in an alternative way.
in this alternative prediction, each amino acid has been assigned to at most one secondary structure element that had maximal posterior probability .
the correlation between alignment posterior probabilities and probabilities of correctly predicting a secondary structure type is obviously the same under the two different protocols if the posterior probability is greater than  <dig> , since an event having probability greater than  <dig>  must be the most likely event.
the two types of curves split very soon below  <dig>  , and the second type of prediction protocol  gets less over-pessimistic than the other protocol.
this means that there are more true positive predictions than false positive predictions with non-maximal posterior probabilities.
this result is just the opposite of what our hypothesis suggested, therefore we also plotted the number of false positive and true positive predictions for each secondary structure type and prediction methods, see fig.
<dig>  this analysis confirms that explanation for methods based on the posterior distribution of alignments being able to predict their prediction power better than methods based on a single, optimal alignment is that they have more false positive predictions with alignment posterior probabilities below  <dig> .
the pairwise and multiple alignment methods show a different behaviour for alignment posterior probabilities greater than  <dig> .
while the forward method has only slightly more true positive predictions and significantly more false positive predictions in this region than the viterbi method, the bayesian method has more true positive predictions and approximately the same false negative predictions as the maximum posterior decoding method.
correlation between 3d structure similarities and alignment posterior probabilities
high alignment posterior probabilities indicate that the aligned residues are close to each other in the superimposed 3d structures.
the average 3d distance between the aligned residues increases as the alignment posterior probability decreases.
however, the distribution of residue distances become flatter for small alignment posterior probabilities, namely, a small alignment posterior probability does not necessarily mean that the aligned residues are far from each other.
for example,  <dig>  alignment posterior probability in a pairwise alignment means that there is still about 25% probability that the aligned residues are closer to each other than the average distance between amino acids that are aligned together with more than  <dig>  posterior probability.
the distance distribution is even flatter in case of multiple alignments.
one possible explanation is that the alignment posterior probabilities are calculated for multiple alignment columns while distances are calculated for all possible pairs of amino acids in alignment columns.
a small alignment posterior probability indicates possible differences in the 3d structures, however, some of the 3d structures might be still similar.
averaging the 3d distances in alignment columns naturally makes the distribution more centred .
CONCLUSIONS
in this paper, we studied how posterior probabilities of aligning characters in pairwise or multiple alignments might indicate whether secondary structure predictions based on the alignments in question are correct.
we found that pairwise alignment methods are over-pessimistic on predicting alpha helices and beta sheets, namely, posterior probabilities of alignment columns are lower than the actual probability that the structure prediction based on the alignment column is correct, while they are overoptimistic on predicting  <dig> helices, i.e., posterior probabilities for these alignment columns are greater than the probabilities that the secondary structure prediction for these amino acids is correct.
multiple alignment methods provide slightly more reliable predictions about their reliability of secondary structure predictions – they are less overoptimistic on  <dig> helix predictions.
secondary structure predictions can be given based on single, optimal pairwise or multiple alignments and also based on the posterior ensemble of alignments.
in the latter case, posterior probabilities are closer to the probabilities that the secondary structure prediction is correct, especially when the structure prediction is based on the posterior distribution of multiple sequence alignments.
the multiple sequence alignment is the holy grail of bioinformatics  <cit>  since what "one or two homologous sequences whisper ... a full multiple sequence alignment shouts out loud"  <cit> .
our experiments show that multiple sequence alignments not only highlight conserved positions better than pairwise alignments, but they also more reliably indicate the reliability of their prediction capabilities.
this extra information could be exploited in 3d protein structure prediction: high posterior probabilities indicate the regions of the sequence alignment where the alignment accuracy is significantly better than the average alignment accuracy, see figs.
<dig> and  <dig>  these parts can be used as a reliable scaffold in homology modelling.
on the remaining, unreliable parts, homology modelling is expected to have a low quality, and hence the 3d structure of these regions should be predicted with alternative methods, like ab initio threading methods  <cit> .
it is worth mentioning that the alignment methods we applied in this work do not consider any information about how secondary structures evolve.
it is well-known that different secondary structure elements follow different substitution processes, and this difference in the substitution pattern can be used for secondary structure prediction  <cit> .
it is fairly straightforward to incorporate into current alignment methods a priori knowledge on the substitution, insertion and deletion processes of secondary structures, and we expect that such combined approaches will have a better performance in structure prediction.
nevertheless, secondary structures can be predicted not only in a comparative way, but also using a single sequence, based on the statistical properties of the amino acids in different secondary structure types  <cit> .
potential prior distributions for secondary types elements might be derived from such statistics and might be used in bayesian analysis.
the running time of the methods obviously increases with the complexity of the background models, and analyses utilising such combined methods currently take too long to be applicable for everyday use on personal computers.
however, the speed of processors keeps increasing exponentially following moore's law, and will soon reach a level when it won't pose barrier to such combined approaches.
nevertheless, there are also promising channels to improve the running time of the methods.
the standard approach for statistical multiple alignment is going to be mcmc, and current implementations make use of very basic tricks only, like the alignment window cut algorithm described in the methods section.
several groups are working on making mcmc alignment methods more efficient and quickly mixing, and significant improvements are expected in the coming years.

 due to the increasing speed and number of genome sequencing projects, the gap between the number of known structures and the number of known protein sequences keeps increasing. as a result, demand for reliable computational methods today is higher than ever, while in silico estimation of protein structures remains one of the most challenging tasks in bioinformatics. the central assumption of comparative bioinformatics methods for proteins is that the structures of proteins are more conserved than their amino-acid sequences. this allows homology modelling, namely, mapping the structure of a sequence onto homologous sequences. as insertions and deletions separating two homologous sequences accumulate, homologous characters in the two sequences will occupy different positions, which causes a non-trivial problem of identifying homologous positions. this problem can be solved by sequence alignment algorithms, which maximise the similarity between aligned positions while also minimise the insertions and deletions needed to align the sequences. the relationship between gap-penalties and similarity scores can be set such that they maximise the number of correctly aligned positions in a benchmark set of alignments. by contrast, stochastic models are capable to calibrate their parameters by applying a maximum likelihood approach even if no benchmark set is available. hidden markov models were the first such stochastic models which have appeared in bioinformatics more than ten years ago. thorne, kishino and felsenstein introduced time-continuous markov models for describing insertion and deletion events, and they showed on simulated data that the maximum likelihood method could correctly estimate the insertion-deletion as well as the substitution parameters with which the simulated data had been generated. the tkf models have subsequently been improved, and have been tested for alignment accuracy on biological data. above automatic parameter estimation, the other main advantage of stochastic models is that such models can provide posterior probabilities for each estimated alignment column as well as for the whole alignment, and these posterior probabilities correlate with the probability for the alignment column being correctly aligned. the uncertainty in the sequence alignment can be slightly reduced when more than two sequences are simultaneously aligned together, and hence, much effort has been put in developing accurate multiple sequence alignment methods. although efficient algorithms exist for any type of pairwise alignment problem, the multiple sequence alignment problem is hard. it has been proved that the optimal multiple sequence alignment problem under the sum-of-pairs scoring scheme is np-hard, and it is strongly believed that the statistical approach to multiple sequence alignment is algorithmically not simpler than score-based approaches. since it is unlikely that fast algorithms exist for any type of exact multiple sequence alignment problem, heuristic approaches have become widespread. profile-hmm methods align sequences to a profile-hmm instead of each other, and the multiple sequence alignment is obtained by aligning sequences together via a profile-hmm. since the jumping and emission parameters of the hmm are learned from the data, this approach needs many sequences for parameter optimisation. nevertheless, profile-hmms do not consider evolutionary relationships amongst sequences, and hence, they cannot handle properly over-representation of evolutionary groups. iterative approaches have been introduced for score-based methods in the eighties and have recently been extended for stochastic methods using the transducer theory. the drawback of iterative approaches is that in each iteration, they consider only a single, locally optimal alignment that might not lead to a globally optimal alignment. moreover, as they consider only locally optimal partial solutions, they naturally underestimate the uncertainty of posterior probabilities. the markov chain monte carlo method represents a third way to attack the multiple stochastic alignment problem. it was first introduced for assessing the bayesian distribution of evolutionary parameters of the tkf model aligning two sequences, and has subsequently been extended to multiple sequence alignment. the general theory of markov chain monte carlo states that the markov chain will be in the prescribed distribution after infinite number of random steps. obviously, we cannot wait infinite many steps in practice, and therefore the success of mcmc methods depends on fast convergence: if the markov chain converges quickly to the prescribed distribution, the bias of samples from the markov chain after a limited number of steps will be negligible. the convergence can be checked by measuring autocorrelation in the log-likelihood trace or a few other statistics of the markov chain and by running several parallel chains with different random starting points. since the above mentioned methods for multiple stochastic sequence alignment problems have been introduced only recently, no large-scale, comprehensive analysis on the performance of methods for protein structure prediction has been published yet. in this paper, we present a survey on how stochastic alignment methods can be used for protein secondary structure predictions. the prediction can be based on pairwise or multiple alignments and in both cases, either only a single, optimal alignment or the whole posterior distribution of alignments is used for prediction. we are interested in the question how much one can gain by involving more sequences and the posterior distribution of the alignments into the secondary structure prediction.  implementation of the methods we implemented a stochastic pairwise and a stochastic multiple sequence alignment method in java programming language, and we made a study of the methods on the homstrad database as described in the methods section. the stochastic pairwise alignment method was tested on all the possible pairs of sequences belonging to the same family. the analysis took two days on an intel xeon ghz computer with suse linux operating system and jvm. the most time-consuming part of the analysis was the maximum likelihood parameter optimisation, which took approximately 90% of the total running time. families have been selected for testing the stochastic multiple sequence alignment method, see table the families have been selected such that they reasonably cover the percentage identity distribtion of the homstrad database and they contain relatively many and approximately the same number of sequences. there are possible pairs of homologous sequences obtainable from the families, which is % of the possible homologous sequence pairs of the homstrad database. the analysis was performed on the zuse cluster of the oxford supercomputing centre, each job ran on a dual intel xeon ghz processor under jvm. mcmc steps were taken after convergence on each family. the running time of the analysis varied between hours and two days. the convergence has been verified based on the log-likelihood trace and comparing sampling distributions from parallel chains with different starting points, see fig. for an example. post-processing the data secondary structure predictions have been given in four ways: • based on the viterbi alignment. in this case, the most likely – a.k.a. viterbi – alignment was obtained for all pairs of sequences and was used to map the secondary structure of one of the sequences onto the other sequence. • based on the posterior distribution of pairwise alignments using the forward-backward algorithm. in this case, the posterior probabilities that two amino acids are aligned together were obtained for all pairs of sequences and all pairs of amino acids. the secondary structure of one of the sequences was mapped onto the other sequence in a fuzzy way using the posterior probabilities. • based on the maximum posterior decoding estimation from samples of a markov chain monte carlo stochastic multiple alignment. in this case, the maximum posterior decoding alignments were predicted from mcmc samples and were used to map the secondary structure of one of the sequences onto the other sequences. the mpd alignment maximizes the product of the posterior probabilities of its alignment columns. see the methods section for an explanation why the mpd alignment can be more accurately estimated from mcmc samples than the viterbi alignment. • based on the posterior distribution of multiple alignments obtained by mcmc stochastic multiple alignment. in this case, the posterior probabilities that two amino acids are aligned together were estimated from the mcmc samples for all pair of sequences choosable from a multiple alignment and all pair of amino acids. the secondary structure of one of the sequences was mapped onto the other sequence in a fuzzy way using the posterior probabilities. amino acid sequences were divided into categories based on their alignment posterior probabilities in the case of pairwise sequence alignments – or on their posterior structure prediction probabilities in the case of viterbi and forward estimations, respectively. the categories were evenly distributed on the interval. for each category and the three general types of secondary structures, the percentage of the correctly estimated secondary structure types was calculated and plotted on fig. in the case of the viterbi alignments, this means the ratio of the number of true positives and the number of all predictions of the given type. in the case of the forward prediction, it is the number of amino acids of a given secondary structure type that fall in a particular category divided by the number of all amino acids in the category. amino acid sequences of the selected families were divided into categories based on their alignment posterior probabilities in the case of multiple sequence alignments – or on their posterior structure prediction probabilities in the case of mpd and bayesian estimation, respectively. the categories were evenly distributed on the interval. for each category and the three general types of secondary structures, the percentage of the correctly estimated secondary structure types was calculated and plotted on fig. in the case of the maximum posterior decoding estimation, this means the ratio of the number of true positives and the number of all prediction of a given secondary structure type. in the case of bayesian estimation, it is the number of amino acids of a given secondary structure type that fall in a particular category divided by the number of all amino acids in the category. for a fair comparison, we repeated the pairwise sequence comparison protocols on the selected families, the generated statistics are shown on fig. the statistics obtained from the selected families show similar behavior than those obtained from the whole homstrad database: all the six curves have similar shapes in both cases. our results indicate that methods predicting secondary structures based on a single alignment are over-pessimistic about their performance on alpha helices and beta sheets, namely, the posterior probabilities associated to the prediction are lower than the actual probability that the prediction is correct. methods that predict structures based on the whole distribution of sequence alignments are less pessimistic – the alignment posterior probabilities better approximate the observed probabilities that the prediction is correct. all pairwise alignment methods proved to be over-optimistic estimating the reliability of their predictions for alpha helices and beta sheets with posterior probability above. predicting the correctness of helix predictions turned out to be the toughest of all secondary structure types. each method except the bayesian estimation on multiple sequence alignments is much over-optimistic on their power of predicting helices. mpd is less optimistic than pairwise methods. among all methods studied, bayesian estimation based on multiple alignments was the only one that was able to correctly predict its prediction power of all secondary structure types, including helices, which makes mcmc-based multiple alignment methods successful candidates for promotion to a fundamental tool in protein structure prediction. to show that the alignment posterior probabilities correlate not only with the goodness of secondary structure predictions but they also correlate with the similarities in the 3d structures, we calculated from the homstrad superimposed 3d structures the 3d distances between the cα atoms for each aligned pair of amino acids. the alignment posterior probabilities were evenly divided into categories, and the average 3d distances as well as the low and high quartiles have been plotted for each category. fig. shows the results for viterbi alignments, both for the entire database and for the selected sequence families. fig. shows the results for the mpd alignments of the selected families. finally, we present on fig. the classical sensitivity values for the viterbi and mpd alignments. not only the posterior goodness probabilities correlate with the alignment posterior probabilities but also the sensitivity values. if secondary structure predictions are restricted for those alignment columns that have alignment posterior probabilities or greater, then the sensitivity of alpha helix and beta-sheet predictions are greater than 80%, and about 50% for helices. discussion comparing predictions on different secondary structure types the differences between the predictions of different secondary structure elements can be explained by their general attributes. alpha helices are typically formed by amino acids or more. substitutions are frequent in alpha helices and they are surrounded by loop sequences where insertions and deletions often occur, therefore stochastic alignment methods realise some uncertainty, which yields relatively low posterior probabilities when aligning these regions. however, since alpha helices are relatively long, and the substitutions that occur in them rarely change the chemical behaviour of the affected amino acids, the long runs of chemically similar amino acids in the two sequences to be aligned give a strong statistical signal that helps align alpha helices. beta sheet elements are typically shorter than alpha helices, and are also surrounded by non-structured fragments accumulating insertions and deletions, which also yields relatively low alignment posterior probabilities. however, beta sheet elements are more likely to be misaligned, since their short length keeps them from carrying a statistical signal that alpha helices do. the helices are the least conserved secondary structure elements. even if the actual amino acid sequence does not change, mutations at other parts of the sequence might indicate a conformation change that can shift the helix or transform it into a different structure type, see for example, fig. such conserved parts are assigned high alignment posterior probabilities, and they increase the false positive ratio when this structure is mapped onto other sequences that do not contain this secondary structure motif. the fact that different secondary structure motifs can build up the same region of a functional protein implies that the given region might not be crucial to maintaining the structure and function of the protein and thus mutations can accumulate in the vicinity of the given region. stochastic multiple sequence alignment can reveal the uncertainty in aligning that region, which explains why multiple alignment methods improve in predicting their predicting power on helices. there is a similar explanation for the overoptimism in the region of and higher posterior probabilities in the case of alpha helices and beta sheets: slight structural changes might shift the position where an alpha helix or a beta sheet starts or ends, even if the amino acids in the positions of question do not change. fig. also shows examples of such variations of secondary structure elements. for instance, the first alignment column is indicated to have a beta sheet structure in some sequences while it is non-structural in others. comparing predictions of different protocols predictions based on a single, optimal pairwise or multiple alignment are over-pessimistic: alignment columns from both the viterbi alignments and the mpd multiple alignments are labelled with posterior probabilities that are typically lower than the actual probability that the secondary structure predictions are correct for these columns. when the whole posterior ensemble of alignments is the basis of the secondary structure prediction, the posterior probabilities are closer to the actual probabilities that the prediction is correct. one main difference between the two strategies – prediction based on a single optimal alignment and prediction based on the posterior distribution of alignments – is that in the latter case posterior probabilities of all secondary structure types are given for each amino acid, while in the former case, the viterbi or mpd alignment assigns at most one secondary structure element to each amino acid. this suggests the hypothesis that prediction methods based on the posterior distribution of alignments are less over-pessimistic due to possessing such false positive predictions with small posterior probabilities that are not part of a viterbi or mpd alignment-based estimation. to test this hypothesis, we predicted alpha helices and beta sheets from the posterior distribution of pairwise alignments in an alternative way. in this alternative prediction, each amino acid has been assigned to at most one secondary structure element that had maximal posterior probability. the correlation between alignment posterior probabilities and probabilities of correctly predicting a secondary structure type is obviously the same under the two different protocols if the posterior probability is greater than, since an event having probability greater than must be the most likely event. the two types of curves split very soon below, and the second type of prediction protocol gets less over-pessimistic than the other protocol. this means that there are more true positive predictions than false positive predictions with non-maximal posterior probabilities. this result is just the opposite of what our hypothesis suggested, therefore we also plotted the number of false positive and true positive predictions for each secondary structure type and prediction methods, see fig. this analysis confirms that explanation for methods based on the posterior distribution of alignments being able to predict their prediction power better than methods based on a single, optimal alignment is that they have more false positive predictions with alignment posterior probabilities below. the pairwise and multiple alignment methods show a different behaviour for alignment posterior probabilities greater than. while the forward method has only slightly more true positive predictions and significantly more false positive predictions in this region than the viterbi method, the bayesian method has more true positive predictions and approximately the same false negative predictions as the maximum posterior decoding method. correlation between 3d structure similarities and alignment posterior probabilities high alignment posterior probabilities indicate that the aligned residues are close to each other in the superimposed 3d structures. the average 3d distance between the aligned residues increases as the alignment posterior probability decreases. however, the distribution of residue distances become flatter for small alignment posterior probabilities, namely, a small alignment posterior probability does not necessarily mean that the aligned residues are far from each other. for example, alignment posterior probability in a pairwise alignment means that there is still about 25% probability that the aligned residues are closer to each other than the average distance between amino acids that are aligned together with more than posterior probability. the distance distribution is even flatter in case of multiple alignments. one possible explanation is that the alignment posterior probabilities are calculated for multiple alignment columns while distances are calculated for all possible pairs of amino acids in alignment columns. a small alignment posterior probability indicates possible differences in the 3d structures, however, some of the 3d structures might be still similar. averaging the 3d distances in alignment columns naturally makes the distribution more centred.  in this paper, we studied how posterior probabilities of aligning characters in pairwise or multiple alignments might indicate whether secondary structure predictions based on the alignments in question are correct. we found that pairwise alignment methods are over-pessimistic on predicting alpha helices and beta sheets, namely, posterior probabilities of alignment columns are lower than the actual probability that the structure prediction based on the alignment column is correct, while they are overoptimistic on predicting helices, i.e., posterior probabilities for these alignment columns are greater than the probabilities that the secondary structure prediction for these amino acids is correct. multiple alignment methods provide slightly more reliable predictions about their reliability of secondary structure predictions – they are less overoptimistic on helix predictions. secondary structure predictions can be given based on single, optimal pairwise or multiple alignments and also based on the posterior ensemble of alignments. in the latter case, posterior probabilities are closer to the probabilities that the secondary structure prediction is correct, especially when the structure prediction is based on the posterior distribution of multiple sequence alignments. the multiple sequence alignment is the holy grail of bioinformatics since what "one or two homologous sequences whisper... a full multiple sequence alignment shouts out loud". our experiments show that multiple sequence alignments not only highlight conserved positions better than pairwise alignments, but they also more reliably indicate the reliability of their prediction capabilities. this extra information could be exploited in 3d protein structure prediction: high posterior probabilities indicate the regions of the sequence alignment where the alignment accuracy is significantly better than the average alignment accuracy, see figs. and these parts can be used as a reliable scaffold in homology modelling. on the remaining, unreliable parts, homology modelling is expected to have a low quality, and hence the 3d structure of these regions should be predicted with alternative methods, like ab initio threading methods. it is worth mentioning that the alignment methods we applied in this work do not consider any information about how secondary structures evolve. it is well-known that different secondary structure elements follow different substitution processes, and this difference in the substitution pattern can be used for secondary structure prediction. it is fairly straightforward to incorporate into current alignment methods a priori knowledge on the substitution, insertion and deletion processes of secondary structures, and we expect that such combined approaches will have a better performance in structure prediction. nevertheless, secondary structures can be predicted not only in a comparative way, but also using a single sequence, based on the statistical properties of the amino acids in different secondary structure types. potential prior distributions for secondary types elements might be derived from such statistics and might be used in bayesian analysis. the running time of the methods obviously increases with the complexity of the background models, and analyses utilising such combined methods currently take too long to be applicable for everyday use on personal computers. however, the speed of processors keeps increasing exponentially following moore's law, and will soon reach a level when it won't pose barrier to such combined approaches. nevertheless, there are also promising channels to improve the running time of the methods. the standard approach for statistical multiple alignment is going to be mcmc, and current implementations make use of very basic tricks only, like the alignment window cut algorithm described in the methods section. several groups are working on making mcmc alignment methods more efficient and quickly mixing, and significant improvements are expected in the coming years. 
we showed that alignment posterior probabilities correlate with the reliability of secondary structure predictions, though the strength of the correlation is different for different protocols. the correspondence between the reliability of secondary structure predictions and alignment posterior probabilities is the closest to the identity function when the secondary structure posterior probabilities are calculated from the posterior distribution of multiple alignments. we also showed that alignment posterior probabilities correlate with the 3d distances between cα amino acids in superimposed tertiary structures. alignment posterior probabilities can be used to a priori detect errors in comparative models on the sequence alignment level. they can highlight the most likely alignment, and above that, they can give posterior probabilities for each alignment column. we made a comprehensive study on the homstrad database of structural alignments, predicting secondary structures in four different ways. the prediction is based on a multiple alignment that contains both reference sequences with known structures and the sequence whose unknown structure is predicted. intensive research has been made to improve the quality of multiple alignments, since misaligned parts of the multiple alignment yield misleading predictions. stochastic sequence alignment methods define a posterior distribution of possible multiple alignments. the largest deviation from the identity function has been obtained in the case of predicting secondary structures from a single optimal pairwise alignment.
 comparative methods have been the standard techniques for in silico protein structure prediction. the prediction is based on a multiple alignment that contains both reference sequences with known structures and the sequence whose unknown structure is predicted. intensive research has been made to improve the quality of multiple alignments, since misaligned parts of the multiple alignment yield misleading predictions. however, sometimes all methods fail to predict the correct alignment, because the evolutionary signal is too weak to find the homologous parts due to the large number of mutations that separate the sequences.  stochastic sequence alignment methods define a posterior distribution of possible multiple alignments. they can highlight the most likely alignment, and above that, they can give posterior probabilities for each alignment column. we made a comprehensive study on the homstrad database of structural alignments, predicting secondary structures in four different ways. we showed that alignment posterior probabilities correlate with the reliability of secondary structure predictions, though the strength of the correlation is different for different protocols. the correspondence between the reliability of secondary structure predictions and alignment posterior probabilities is the closest to the identity function when the secondary structure posterior probabilities are calculated from the posterior distribution of multiple alignments. the largest deviation from the identity function has been obtained in the case of predicting secondary structures from a single optimal pairwise alignment. we also showed that alignment posterior probabilities correlate with the 3d distances between cα amino acids in superimposed tertiary structures.  alignment posterior probabilities can be used to a priori detect errors in comparative models on the sequence alignment level. 