BACKGROUND
the discovery of novel non-coding rna  families expanded our understanding of rnas, which not only carry genetic codes for protein synthesis but also participate in other functions, especially the regulatory processes, such as localization, replication, translation and degradation  <cit> .
in mammals, a substantial amount of transcripts  are non-protein-coding, and most of them are functional  <cit> .
what’s more, the non-coding regions in the human genome are crucially important.
for example, microrna  is used as a marker to differ normal tissues from tumors  <cit> ; long non-coding rna  also contributes to human disease etiology  <cit> .
these findings fuel the research of rna and also pose new challenges.
unlike protein-coding genes, whose primary sequences can be applied for accurate functional prediction with statistical signals, rnas’ functions depend on their secondary structures.
many computational methods have been proposed to fold rna structures.
one type of popular algorithms adopts minimum free energy  model to fold a single rna sequence, which has been implemented in mfold  <cit>  and rnafold  <cit> .
however, the structure prediction accuracy of this approach is limited.
one major reason is that the precise energy parameters are hard to obtain experimentally  <cit> ; on the other hand, the functional rna structure may not be the one with the minimum energy  <cit> .
what’s more, single sequence folding may not be applied to discover new rna families even if the predicted structures are correct, because the statistical signals in an rna secondary structure are not strong enough to distinguish itself from the stable structures folding from random sequences  <cit> .
comparative methods can solve these problems by folding a consensus structure from multiple sequences, which not only improve the structure prediction accuracy, but also provide additional signals to discover novel rnas  <cit> .
the idea of this approach is that rna secondary structures are conserved through evolution.
therefore, a consensus structure detected by comparing related rna sequences should be more accurate and significant than the structure folded from a single sequence.
with a consistent consensus structure, the specific structure of each sequence in the alignment can be obtained by constraint folding.
a classic comparative method is the sankoff algorithm  <cit> .
because constructing a precise structural alignment of rna sequences is also a challenging problem, the sankoff algorithm computes alignment and fold structure simultaneously.
excessive computational resources ) are required by the sankoff algorithm for a large-scale problem.
some implementations of this approach, such as dynalign  <cit> , foldalign  <cit> , locarna  <cit>  and conan  <cit> , attempt to restrict its solution space by limiting the number of possible sub-structures.
however these methods are still computationally expensive ).
to reduce the computation complexity, comparative methods may align related sequences first and then detect conserved signals in the alignment to infer a consensus structure.
one type of these methods extends the energy-based model from single sequences to alignments.
based on the assumption that high covariance of two aligned columns implies the conservation of pairing, all potential pairing columns in an alignment can be determined.
after that the optimal consensus structure with minimum average free energy can be folded just as a single sequence structure.
an example of covariance scoring scheme is mutual information , which can measure the dependence of two columns in the alignments  <cit> .
rnaalifold  <cit>  adopts the basic idea of mi scoring and imports the pairing rules of rna into the measurement of covariance.
another type of comparative methods is evolution-based.
in these methods, no thermodynamic parameters but statistical learning algorithms are used.
the evolutionary history of the aligned sequences is reformed with probability theories  <cit> , and the rna secondary structures are modeled as stochastic context-free grammar   <cit> .
both strategies have their own strengths and weaknesses  <cit> .
some methods try to integrate both approaches.
for example, petfold extends pfold  <cit> , an evolution-based algorithm, to consider the energetically favorable base-pairs  <cit> .
however, petfold utilizes a nussinov style model  <cit> , which does not make full use of the energy parameters.
rnaalifold also tested two other covariance scoring schemes to incorporate evolutionary information  <cit> , but neither of them yielded a better result.
in this article, we propose a novel method called phylornaalifold.
it improves rnaalifold by explicitly incorporating the phylogenetic tree of the aligned sequences into the computation of covariance scores.
like rnaalifold, phylornaalifold detects pairing columns by evaluating covarying mutations and folds rna structures through an mfe model.
unlike rnaalifold, which does not consider the relative positions of sequences in the phylogeny, phylornaalifold counts the number of covarying mutations on the phylogenetic tree for each pair of columns with a parsimony approach.
what’s more, comparing with petfold, phylornaalifold retains the turner’s model  <cit>  in rnaalifold, which describes rna structures with many thermodynamic parameters derived from physical studies.
with the supports of both energy-based model and evolution-based model, phylornaalifold may detect consensus structures more precisely.
the rest of the article is organized as follows: in the methods section, we discuss the basic mechanism of rnaalifold, its shortcomings, and details of the phylornaalifold algorithm.
in the results section, we describe the benchmark datasets, experimental results, and the effect of parameters and alignment characteristics on our algorithm.
in the discussion and conclusion section, we summarize our existing works and propose directions for future research.
methods
consensus folding energy and covariance score in rnaalifold
the basic approach of rnaalifold  <cit>  is to integrate covarying mutation into the thermodynamic model to predict consensus structures.
first, covariance scores are computed for all pairs of columns to determine possible pairing positions in the consensus structure.
then, based on the mfe model, the minimum average folding energy is computed with dynamic programming.
assume the given alignment is denoted by  , which contains n sequences a={s <dig> s <dig> …,sn}.
each sequence contains l symbols, including nucleotides and gaps, and sik represents the ith symbol  at the kth  rna sequence.
the minimization of free energy is computed by using the following recursive functions:
fi,j=min)ci,j=ϕ2γi,j+min∑sk∈ahmini<p<q<j∑sk∈ai+cp,qmini<p<jfmi,p+fm1p+ <dig> j+mafmi,j=minfmi+ <dig> j+mcmini<p<jci,p+fmp+ <dig> j+mbfm1i,jfm1i,j=minfm1i,j−1+mc,ci,k
where fi,j,ci,j,fmi,j,fm1i,j denote the minimum free energies for the region between ith column and jth column with unconstrained structure, with enclosed structure, with a multi-loop, and with a multi-loop containing a single branch, respectively.
h is the free energy for a hairpin loop enclosed by si and sj, and i is the free energy for an internal loop containing two base-pairs, one is between si and sj and the other is between sp and sq.
ma,mc are penalties for closing bases and non-pairing bases in multi-loops.
mb is the bonus for branch bases in multi-loops.
the recursive functions were derived from the turner’s model  <cit> .
one major change made by rnaalifold for consensus folding is the usage of covariance score γ. it is not only a factor in the computing of free energy, but also determines the possible pairing columns in the alignment.
two parts, one is bonus and the other is penalty, are in this score.
the first part of the covariance score is called the conservation score.
for  and , three levels of confidence for pairing are assessed: base-pairs without mutation, base-pairs with one mutation, and base-pairs with two mutations.
in the latest version of vienna rna package   <cit> , the recursive function for computing conservation score is:
vi,j=1n∑1≤k<l≤nh+hif∈band∈b0otherwise
where h is the hamming distance between base x and base y, and  ={‘au’, ‘ua’, ‘cg’, ‘gc’, ‘gu’, ‘ug’} is the set of all possible base-pairs.
the second part is the penalty score qi,j, which deals with a pair of symbols that cannot form a base-pair:
qi,j=∑1≤k≤n0if∈b <dig> ifsikandsjkare gaps1otherwise
overall, the covariance score is:
γi,j=vi,j−ϕ1×qi,j
where ϕ1=ϕ2= <dig>  a threshold value γt=− <dig> is defined for γi,j.
if γi,j>γt, ith column and jth column are considered to be pairing columns.
in the final output, the minimum average folding energy, including the covariance score, is normalized by dividing n.
phylogenetic-based covarying mutation
rnaalifold incorporates covarying mutations into consensus folding to improve the detection of pairing columns.
from equation , it can be seen that rnaalifold counts the level of covariance by treating all sequences equally and try all possible combinations of base-pairs.
in short, rnaalifold models the relationship of sequences as a complete graph.
as a result, the specific evolutionary relationship among sequences in the phylogenetic history is ignored.
take the rna structural alignment in figure  <dig> as an example.
the red and green columns achieve the same covariance score  in rnaalifold.
however, as described in  <cit> , the conservation evidence in figure  <dig> is stronger than that in figure  <dig> because at least two mutations occur at the green columns while only one is required to form the red ones.
phylornaalifold models the relationship of aligned sequences as a tree by introducing the phylogenetic history of the alignment into the computation of covariance scores.
the level of structural conservation is measured by the number of covarying mutations on the tree.
our assumption is that more covarying mutations on the tree mean stronger evidence of conservation.
in addition, phylornaalifold does not discard the original scoring scheme of rnaalifold, because experimental results showed this scheme can infer significant rna structural aspects with high sensitivity and selectivity  <cit> .
assume mi,j covarying mutations occur between ith and jth columns on the alignment ’s phylogenetic tree and the number of base-pairs on those columns is bi,j.
the value of mi,j depends on the size of the alignment.
since our approach focuses on improving the bonus part of the covariance scores, the number of covarying mutations is normalized with its upper bound: mi,jbi,j− <dig>  a new factor for the conservation score is proposed:
∊i,j=1+β×mi,jbi,j− <dig>
where β is the scale parameter for the normalized covarying mutation numbers.
phylornaalifold computes covariance scores with the following formula:
γi,jp=∊i,j×vi,j−ϕ1×qi,j
all the other parameters and their default values in rnaalifold are retained.
due to the fact that γi,jp≥γi,j , two columns would be marked as pairing in phylornaalifold if their covariance score in rnaalifold is greater than the threshold γt .
thus the advantage of phylornaalifold is to import more potentially pairing positions with high mutation numbers.
computing the number of covarying mutations
given a phylogenetic tree and labels at its leaves, the fitch algorithm can optimize nucleotide assignment of the internal nodes to minimize the number of mutations  <cit> .
if we model solving phylogeny as a maximum parsimony problem, this number can be taken as the actual number of mutations.
the fitch algorithm consists of a forward phase and a backward phase.
in the forward phase, all possible labels at each internal node are inferred.
in addition, the number of mutations is estimated during a bottom-up traversal.
in the backward phase, a top-down pass is performed to find the optimal label at each internal node.
only the forward algorithm is applied to phylornaalifold, since we do not need the exact labels at the internal nodes, but only the number of mutations on the tree.
without loss of generality, we require  to be a rooted binary tree.
r denotes the root of  and v, vl, vr denote a node, left child of v, and right child of v respectively.
f is the set of possible labels at node v, and cost is the number of mutations on the sub-tree which is rooted at v. then the forward phase can be described with the following recursive functions:
f=f∩fiff∩f≠∅f∪fotherwisecost=cost+costiff∩f≠∅cost+cost+1otherwise
for each leaf, f is a base at the corresponding sequence.
after the computation is finished, cost shows the minimum number of mutations on the phylogenetic tree.
the optimization of this algorithm was proved in  <cit> .
in equation  <dig>  the computation of ∊i,j does not depend on non-pairing bases.
therefore, in the revised fitch algorithm non-pairing bases need not to be considered when the number of covarying mutations is computed.
we changed the original fitch algorithm in two ways:  at any leaf node, if ∉b, set = ;  for one internal node v, if the bases at vl is , v will obtain f) as its label.
one example of this algorithm is shown in figure  <dig>  the revised fitch algorithm can be described by using the following functions:
f=f∩fiff∩f≠∅andf≠andf≠fiff=fiff=f∪fotherwisecost=cost+costiff∩f≠∅andf≠andf≠costiff=costiff=cost+cost+1otherwise
it is easy to see that our algorithm is optimal, because it only excludes non-pairing bases from the computation of the original fitch algorithm.
in phylornaalifold, the tree structure is an input variable and the clients can use any phylogenetic tree construction algorithm to build it.
the time complexity of the original rnaalifold algorithm is o  <cit> , where n is the length of the alignment and m is the number of sequences in the alignment.
the extra computation in phylornaalifold is caused by the revised fitch algorithm, whose time complexity ranges from o to o. in addition, phylornaalifold needs to compute ∊i,j for each pair of columns in the alignment.
thus the overall time consumption of the revised fitch algorithm is o or o. neither of them increases the time complexity of rnaalifold.
RESULTS
benchmarking datasets
the  <dig> rfam  <cit>  families used in the cmfinder paper  <cit>  were selected as our first benchmarking dataset.
it captures the diversity of known families by excluding highly conserved ones.
other programs, such as petfold  <cit>  and rnaalifold  <cit> , also adopted it in their experiments.
all the testing families came from rfam version  <dig>  and their seed alignments were used.
in order to evaluate the dependence of our folding algorithm on the alignment quality, we also realigned the seeds with clustalw  <cit>  to generate the second benchmarking dataset.
for this dataset, the predicted structure of the first sequence in each alignment was compared with its real consensus structure to measure the accuracy.
pair-wise identity and the number of sequences in an alignment are two important alignment characteristics.
pair-wise identity is related to the performance of consensus structure folding, while the number of members is important for inferring an accurate evolutionary history.
to analyze these two factors, we generated the third benchmarking dataset which consisted of alignments with different number of sequences and identities.
member sequences were randomly picked from each seed alignment.
for each family, we generated three sets.
each set included  <dig> alignments, and the alignments contained  <dig> sequences,  <dig> sequences and  <dig> sequences respectively.
<dig> families , whose sequences are less than  <dig>  were excluded from this dataset because the diversity of generated alignments was too small.
phylornaalifold requires a phylogenetic tree of the alignment to infer the consensus structural aspects.
in our experiments, dnadist and kitsch in the phylip package  <cit>  were used to generate phylogenies.
first dnadist computed a distance matrix of the sequences.
after that, kitsch estimated a phylogenetic tree from the output matrix of dnadist.
the reason of using kitsch was that it can generate rooted binary trees, which were required by phylornaalifold.
another notable issue in this process is that if two sequences differ in more than 75% of their positions, dnadist would set the distance between them to - <dig>  which represents infinity.
kitsch rejects negative distances.
thus - <dig> was replaced with  <dig> in distance matrices.
we have checked all the positive sequence distances in our experiments.
none of them exceeded  <dig>  so  <dig> is large enough to represent infinity.
the implementation of phylornaalifold was on the top of program rnaalifold in the vienna rna package  <dig> .
<dig>  <cit> .
the major change made by phylornaalifold is to incorporate our fitch module into the scoring scheme of rnaalifold.
to test our idea, matthews correlation coefficient   <cit>  was used to measure the accuracy of consensus structure prediction.
its definition is:
mcc=tp×tn−fp×fn
where tp,tn,fp,fn represent the number of true positives, true negatives, false positives, and false negatives, respectively.
additional predicted base-pairs that are not in the reference structure fall into two categories.
some base-pairs contradict reference, the others are compatible with it.
compatible base-pairs can be inserted into the known consensus structure, while adding contradictory base-pairs breaks the pairing rules.
only contradictory base-pairs were counted as false positive predictions.
five algorithms, rnaalifold, ribosum-based rnaalifold, phylornaalifold, ribosum-based phylornaalifold, and petfold, have been tested on the first two datasets.
the first four have also been benchmarked on the third dataset.
the ribosum scoring scheme  <cit>  is used in the latest version of vienna rna package.
in this scheme, the sum of hamming distance h+h in conservation score was replaced by an entry in the ribosum matrix r: r. the experiment results in  <cit>  showed that ribosum-based rnaalifold outperformed the orignal rnaalifold in most of cases.
in addition, the authors of  <cit>  used ϕ1= <dig>  and ϕ2= <dig>  as the default parameters in their experiments.
we applied their settings to make the comparison fair.
the performance of petfold was tested in our experiments too.
we used the web-server of petfold  <cit>  and its default parameters.
effect of parameter β
in the first experiment, we compared the structure prediction results of phylornaalifold with rnaalifold on the original cmfinder dataset.
default values for ϕ <dig>  ϕ <dig> and γt were used, and β was a variable ranging from  <dig> to  <dig>  figure  <dig> shows that the novel scoring scheme of phylornaalifold improves the performance of rnaalifold in nearly all cases, except β= <dig>  the differences of average mcc in both cases, with or without using ribosum matrix, become larger when β is increased, and they are maximized at β= <dig>  the largest differences are  <dig>  and  <dig>  for ribosum supported and non-ribosum supported algorithms.
after that, the performance of phylornaalifold is not boosted with the increasing of β. in the following experiments, we select  <dig> as a default value for β.
benchmarking with other methods
the mcc on structural alignments of the cmfinder dataset is compared among phylornaalifold, rnaalifold and petfold.
the parameter β of phylornaalifold is  <dig>  best performance on the same family is set to bold.
the mcc on non-structural alignments of the cmfinder dataset is compared between phylornaalifold, rnaalifold and petfold.
the parameter β of phylornaalifold is  <dig>  best performance on the same family is set to bold.
effects of identity and the number of sequences
in this experiment, we try to analyze the correlation of two alignment characteristics, pair-wise identity and the number of sequences, with the performance of phylornaalifold.
figure  <dig> shows the experiment results.
it can be seen that all four algorithms have similar performance when the number of sequences in the alignments is  <dig>  with the increasing of the members in the alignments, the average mcc difference between phylornaalifold and rnaalifold becomes larger.
using more sequences provides a more precise phylogenetic history, so it is reasonable that phylornaalifold achieves its best performance on alignments with  <dig> sequences.
in addition, for experiments on the alignments of  <dig> sequences and  <dig> sequences, the maximum performance difference exists between the pair-wise identities  <dig> and  <dig>  if the pair-wise identity of an alignment is small, the original covariance scoring scheme of rnaalifold works well enough because a large number of different base-pairs at the pairing columns provide substantial conservational signals.
on the other hand, when the alignment’s pair-wise identity is too large, all the symbols at the pairing columns are almost the same.
the effect of our new covariance scoring scheme is reduced due to the lack of evolutionary information.
discussion and
CONCLUSIONS
we have proposed a novel approach, phylornaalifold, to fold rna consensus structures by evaluating the level of conservation in aligned rna sequences.
with an evolution-based covariance scoring scheme, phylornaalifold can detect more potential pairing columns than rnaalifold.
the benchmark testing shows that phylornaalifold can improve the performance of rnaalifold, as well as petfold.
there are two possible directions for further research.
the first direction is to analyze the dependence of phylornaalifold on the phylogenetic tree construction algorithms.
tree structures have great effect on the rna structure prediction of phylornaalifold.
besides dnadist and kitsch, there are other algorithms, such as upgma  <cit> , paup  <cit>  and mrbayes  <cit> , which can construct alternative trees.
finding or design an optimal algorithm for detecting the phylogenetic information in the pairing columns is an open question.
ideally, structure conservation should be considered because it is crucial for evaluating the similarity between two rna sequences.
the second direction deals with incorporating the phylogenetic information of non-pairing bases into the folding algorithm.
only covarying mutations among base-pairs are considered in phylornaalifold.
in probabilistic methods, all the possible mutations, including mutations in loop regions and stack regions, are modeled with hmm.
our goal is to incorporate both types of mutations into phylornaalifold, while still keep the simplicity of the scoring scheme.
availability
the latest version of phylornaalifold can be downloaded at: http://genome.ucf.edu/phylornaalifold.
competing interests
both authors declare that they have no competing interests.
authors’ contributions
sz conceived of the study and designed the algorithm.
pg implemented the algorithm and carried out the benchmarking tests.
both authors wrote and approved the manuscript.

 the discovery of novel non-coding rna families expanded our understanding of rnas, which not only carry genetic codes for protein synthesis but also participate in other functions, especially the regulatory processes, such as localization, replication, translation and degradation. in mammals, a substantial amount of transcripts are non-protein-coding, and most of them are functional. what’s more, the non-coding regions in the human genome are crucially important. for example, microrna is used as a marker to differ normal tissues from tumors; long non-coding rna also contributes to human disease etiology. these findings fuel the research of rna and also pose new challenges. unlike protein-coding genes, whose primary sequences can be applied for accurate functional prediction with statistical signals, rnas’ functions depend on their secondary structures. many computational methods have been proposed to fold rna structures. one type of popular algorithms adopts minimum free energy model to fold a single rna sequence, which has been implemented in mfold and rnafold. however, the structure prediction accuracy of this approach is limited. one major reason is that the precise energy parameters are hard to obtain experimentally; on the other hand, the functional rna structure may not be the one with the minimum energy. what’s more, single sequence folding may not be applied to discover new rna families even if the predicted structures are correct, because the statistical signals in an rna secondary structure are not strong enough to distinguish itself from the stable structures folding from random sequences. comparative methods can solve these problems by folding a consensus structure from multiple sequences, which not only improve the structure prediction accuracy, but also provide additional signals to discover novel rnas. the idea of this approach is that rna secondary structures are conserved through evolution. therefore, a consensus structure detected by comparing related rna sequences should be more accurate and significant than the structure folded from a single sequence. with a consistent consensus structure, the specific structure of each sequence in the alignment can be obtained by constraint folding. a classic comparative method is the sankoff algorithm. because constructing a precise structural alignment of rna sequences is also a challenging problem, the sankoff algorithm computes alignment and fold structure simultaneously. excessive computational resources ) are required by the sankoff algorithm for a large-scale problem. some implementations of this approach, such as dynalign, foldalign, locarna and conan, attempt to restrict its solution space by limiting the number of possible sub-structures. however these methods are still computationally expensive ). to reduce the computation complexity, comparative methods may align related sequences first and then detect conserved signals in the alignment to infer a consensus structure. one type of these methods extends the energy-based model from single sequences to alignments. based on the assumption that high covariance of two aligned columns implies the conservation of pairing, all potential pairing columns in an alignment can be determined. after that the optimal consensus structure with minimum average free energy can be folded just as a single sequence structure. an example of covariance scoring scheme is mutual information, which can measure the dependence of two columns in the alignments. rnaalifold adopts the basic idea of mi scoring and imports the pairing rules of rna into the measurement of covariance. another type of comparative methods is evolution-based. in these methods, no thermodynamic parameters but statistical learning algorithms are used. the evolutionary history of the aligned sequences is reformed with probability theories, and the rna secondary structures are modeled as stochastic context-free grammar. both strategies have their own strengths and weaknesses. some methods try to integrate both approaches. for example, petfold extends pfold, an evolution-based algorithm, to consider the energetically favorable base-pairs. however, petfold utilizes a nussinov style model, which does not make full use of the energy parameters. rnaalifold also tested two other covariance scoring schemes to incorporate evolutionary information, but neither of them yielded a better result. in this article, we propose a novel method called phylornaalifold. it improves rnaalifold by explicitly incorporating the phylogenetic tree of the aligned sequences into the computation of covariance scores. like rnaalifold, phylornaalifold detects pairing columns by evaluating covarying mutations and folds rna structures through an mfe model. unlike rnaalifold, which does not consider the relative positions of sequences in the phylogeny, phylornaalifold counts the number of covarying mutations on the phylogenetic tree for each pair of columns with a parsimony approach. what’s more, comparing with petfold, phylornaalifold retains the turner’s model in rnaalifold, which describes rna structures with many thermodynamic parameters derived from physical studies. with the supports of both energy-based model and evolution-based model, phylornaalifold may detect consensus structures more precisely. the rest of the article is organized as follows: in the methods section, we discuss the basic mechanism of rnaalifold, its shortcomings, and details of the phylornaalifold algorithm. in the results section, we describe the benchmark datasets, experimental results, and the effect of parameters and alignment characteristics on our algorithm. in the discussion and conclusion section, we summarize our existing works and propose directions for future research. methods consensus folding energy and covariance score in rnaalifold the basic approach of rnaalifold is to integrate covarying mutation into the thermodynamic model to predict consensus structures. first, covariance scores are computed for all pairs of columns to determine possible pairing positions in the consensus structure. then, based on the mfe model, the minimum average folding energy is computed with dynamic programming. assume the given alignment is denoted by, which contains n sequences a={s s …,sn}. each sequence contains l symbols, including nucleotides and gaps, and sik represents the ith symbol at the kth rna sequence. the minimization of free energy is computed by using the following recursive functions: fi,j=min)ci,j=ϕ2γi,j+min∑sk∈ahmini<p<q<j∑sk∈ai+cp,qmini<p<jfmi,p+fm1p+ j+mafmi,j=minfmi+ j+mcmini<p<jci,p+fmp+ j+mbfm1i,jfm1i,j=minfm1i,j−1+mc,ci,k where fi,j,ci,j,fmi,j,fm1i,j denote the minimum free energies for the region between ith column and jth column with unconstrained structure, with enclosed structure, with a multi-loop, and with a multi-loop containing a single branch, respectively. h is the free energy for a hairpin loop enclosed by si and sj, and i is the free energy for an internal loop containing two base-pairs, one is between si and sj and the other is between sp and sq. ma,mc are penalties for closing bases and non-pairing bases in multi-loops. mb is the bonus for branch bases in multi-loops. the recursive functions were derived from the turner’s model. one major change made by rnaalifold for consensus folding is the usage of covariance score γ. it is not only a factor in the computing of free energy, but also determines the possible pairing columns in the alignment. two parts, one is bonus and the other is penalty, are in this score. the first part of the covariance score is called the conservation score. for and, three levels of confidence for pairing are assessed: base-pairs without mutation, base-pairs with one mutation, and base-pairs with two mutations. in the latest version of vienna rna package, the recursive function for computing conservation score is: vi,j=1n∑1≤k<l≤nh+hif∈band∈b0otherwise where h is the hamming distance between base x and base y, and ={‘au’, ‘ua’, ‘cg’, ‘gc’, ‘gu’, ‘ug’} is the set of all possible base-pairs. the second part is the penalty score qi,j, which deals with a pair of symbols that cannot form a base-pair: qi,j=∑1≤k≤n0if∈b ifsikandsjkare gaps1otherwise overall, the covariance score is: γi,j=vi,j−ϕ1×qi,j where ϕ1=ϕ2= a threshold value γt=− is defined for γi,j. if γi,j>γt, ith column and jth column are considered to be pairing columns. in the final output, the minimum average folding energy, including the covariance score, is normalized by dividing n. phylogenetic-based covarying mutation rnaalifold incorporates covarying mutations into consensus folding to improve the detection of pairing columns. from equation, it can be seen that rnaalifold counts the level of covariance by treating all sequences equally and try all possible combinations of base-pairs. in short, rnaalifold models the relationship of sequences as a complete graph. as a result, the specific evolutionary relationship among sequences in the phylogenetic history is ignored. take the rna structural alignment in figure as an example. the red and green columns achieve the same covariance score in rnaalifold. however, as described in, the conservation evidence in figure is stronger than that in figure because at least two mutations occur at the green columns while only one is required to form the red ones. phylornaalifold models the relationship of aligned sequences as a tree by introducing the phylogenetic history of the alignment into the computation of covariance scores. the level of structural conservation is measured by the number of covarying mutations on the tree. our assumption is that more covarying mutations on the tree mean stronger evidence of conservation. in addition, phylornaalifold does not discard the original scoring scheme of rnaalifold, because experimental results showed this scheme can infer significant rna structural aspects with high sensitivity and selectivity. assume mi,j covarying mutations occur between ith and jth columns on the alignment ’s phylogenetic tree and the number of base-pairs on those columns is bi,j. the value of mi,j depends on the size of the alignment. since our approach focuses on improving the bonus part of the covariance scores, the number of covarying mutations is normalized with its upper bound: mi,jbi,j− a new factor for the conservation score is proposed: ∊i,j=1+β×mi,jbi,j− where β is the scale parameter for the normalized covarying mutation numbers. phylornaalifold computes covariance scores with the following formula: γi,jp=∊i,j×vi,j−ϕ1×qi,j all the other parameters and their default values in rnaalifold are retained. due to the fact that γi,jp≥γi,j, two columns would be marked as pairing in phylornaalifold if their covariance score in rnaalifold is greater than the threshold γt. thus the advantage of phylornaalifold is to import more potentially pairing positions with high mutation numbers. computing the number of covarying mutations given a phylogenetic tree and labels at its leaves, the fitch algorithm can optimize nucleotide assignment of the internal nodes to minimize the number of mutations. if we model solving phylogeny as a maximum parsimony problem, this number can be taken as the actual number of mutations. the fitch algorithm consists of a forward phase and a backward phase. in the forward phase, all possible labels at each internal node are inferred. in addition, the number of mutations is estimated during a bottom-up traversal. in the backward phase, a top-down pass is performed to find the optimal label at each internal node. only the forward algorithm is applied to phylornaalifold, since we do not need the exact labels at the internal nodes, but only the number of mutations on the tree. without loss of generality, we require to be a rooted binary tree. r denotes the root of and v, vl, vr denote a node, left child of v, and right child of v respectively. f is the set of possible labels at node v, and cost is the number of mutations on the sub-tree which is rooted at v. then the forward phase can be described with the following recursive functions: f=f∩fiff∩f≠∅f∪fotherwisecost=cost+costiff∩f≠∅cost+cost+1otherwise for each leaf, f is a base at the corresponding sequence. after the computation is finished, cost shows the minimum number of mutations on the phylogenetic tree. the optimization of this algorithm was proved in. in equation the computation of ∊i,j does not depend on non-pairing bases. therefore, in the revised fitch algorithm non-pairing bases need not to be considered when the number of covarying mutations is computed. we changed the original fitch algorithm in two ways: at any leaf node, if ∉b, set =; for one internal node v, if the bases at vl is, v will obtain f) as its label. one example of this algorithm is shown in figure the revised fitch algorithm can be described by using the following functions: f=f∩fiff∩f≠∅andf≠andf≠fiff=fiff=f∪fotherwisecost=cost+costiff∩f≠∅andf≠andf≠costiff=costiff=cost+cost+1otherwise it is easy to see that our algorithm is optimal, because it only excludes non-pairing bases from the computation of the original fitch algorithm. in phylornaalifold, the tree structure is an input variable and the clients can use any phylogenetic tree construction algorithm to build it. the time complexity of the original rnaalifold algorithm is o, where n is the length of the alignment and m is the number of sequences in the alignment. the extra computation in phylornaalifold is caused by the revised fitch algorithm, whose time complexity ranges from o to o. in addition, phylornaalifold needs to compute ∊i,j for each pair of columns in the alignment. thus the overall time consumption of the revised fitch algorithm is o or o. neither of them increases the time complexity of rnaalifold.  benchmarking datasets the rfam families used in the cmfinder paper were selected as our first benchmarking dataset. it captures the diversity of known families by excluding highly conserved ones. other programs, such as petfold and rnaalifold, also adopted it in their experiments. all the testing families came from rfam version and their seed alignments were used. in order to evaluate the dependence of our folding algorithm on the alignment quality, we also realigned the seeds with clustalw to generate the second benchmarking dataset. for this dataset, the predicted structure of the first sequence in each alignment was compared with its real consensus structure to measure the accuracy. pair-wise identity and the number of sequences in an alignment are two important alignment characteristics. pair-wise identity is related to the performance of consensus structure folding, while the number of members is important for inferring an accurate evolutionary history. to analyze these two factors, we generated the third benchmarking dataset which consisted of alignments with different number of sequences and identities. member sequences were randomly picked from each seed alignment. for each family, we generated three sets. each set included alignments, and the alignments contained sequences, sequences and sequences respectively. families, whose sequences are less than were excluded from this dataset because the diversity of generated alignments was too small. phylornaalifold requires a phylogenetic tree of the alignment to infer the consensus structural aspects. in our experiments, dnadist and kitsch in the phylip package were used to generate phylogenies. first dnadist computed a distance matrix of the sequences. after that, kitsch estimated a phylogenetic tree from the output matrix of dnadist. the reason of using kitsch was that it can generate rooted binary trees, which were required by phylornaalifold. another notable issue in this process is that if two sequences differ in more than 75% of their positions, dnadist would set the distance between them to - which represents infinity. kitsch rejects negative distances. thus - was replaced with in distance matrices. we have checked all the positive sequence distances in our experiments. none of them exceeded so is large enough to represent infinity. the implementation of phylornaalifold was on the top of program rnaalifold in the vienna rna package.. the major change made by phylornaalifold is to incorporate our fitch module into the scoring scheme of rnaalifold. to test our idea, matthews correlation coefficient was used to measure the accuracy of consensus structure prediction. its definition is: mcc=tp×tn−fp×fn where tp,tn,fp,fn represent the number of true positives, true negatives, false positives, and false negatives, respectively. additional predicted base-pairs that are not in the reference structure fall into two categories. some base-pairs contradict reference, the others are compatible with it. compatible base-pairs can be inserted into the known consensus structure, while adding contradictory base-pairs breaks the pairing rules. only contradictory base-pairs were counted as false positive predictions. five algorithms, rnaalifold, ribosum-based rnaalifold, phylornaalifold, ribosum-based phylornaalifold, and petfold, have been tested on the first two datasets. the first four have also been benchmarked on the third dataset. the ribosum scoring scheme is used in the latest version of vienna rna package. in this scheme, the sum of hamming distance h+h in conservation score was replaced by an entry in the ribosum matrix r: r. the experiment results in showed that ribosum-based rnaalifold outperformed the orignal rnaalifold in most of cases. in addition, the authors of used ϕ1= and ϕ2= as the default parameters in their experiments. we applied their settings to make the comparison fair. the performance of petfold was tested in our experiments too. we used the web-server of petfold and its default parameters. effect of parameter β in the first experiment, we compared the structure prediction results of phylornaalifold with rnaalifold on the original cmfinder dataset. default values for ϕ ϕ and γt were used, and β was a variable ranging from to figure shows that the novel scoring scheme of phylornaalifold improves the performance of rnaalifold in nearly all cases, except β= the differences of average mcc in both cases, with or without using ribosum matrix, become larger when β is increased, and they are maximized at β= the largest differences are and for ribosum supported and non-ribosum supported algorithms. after that, the performance of phylornaalifold is not boosted with the increasing of β. in the following experiments, we select as a default value for β. benchmarking with other methods the mcc on structural alignments of the cmfinder dataset is compared among phylornaalifold, rnaalifold and petfold. the parameter β of phylornaalifold is best performance on the same family is set to bold. the mcc on non-structural alignments of the cmfinder dataset is compared between phylornaalifold, rnaalifold and petfold. the parameter β of phylornaalifold is best performance on the same family is set to bold. effects of identity and the number of sequences in this experiment, we try to analyze the correlation of two alignment characteristics, pair-wise identity and the number of sequences, with the performance of phylornaalifold. figure shows the experiment results. it can be seen that all four algorithms have similar performance when the number of sequences in the alignments is with the increasing of the members in the alignments, the average mcc difference between phylornaalifold and rnaalifold becomes larger. using more sequences provides a more precise phylogenetic history, so it is reasonable that phylornaalifold achieves its best performance on alignments with sequences. in addition, for experiments on the alignments of sequences and sequences, the maximum performance difference exists between the pair-wise identities and if the pair-wise identity of an alignment is small, the original covariance scoring scheme of rnaalifold works well enough because a large number of different base-pairs at the pairing columns provide substantial conservational signals. on the other hand, when the alignment’s pair-wise identity is too large, all the symbols at the pairing columns are almost the same. the effect of our new covariance scoring scheme is reduced due to the lack of evolutionary information. discussion and  we have proposed a novel approach, phylornaalifold, to fold rna consensus structures by evaluating the level of conservation in aligned rna sequences. with an evolution-based covariance scoring scheme, phylornaalifold can detect more potential pairing columns than rnaalifold. the benchmark testing shows that phylornaalifold can improve the performance of rnaalifold, as well as petfold. there are two possible directions for further research. the first direction is to analyze the dependence of phylornaalifold on the phylogenetic tree construction algorithms. tree structures have great effect on the rna structure prediction of phylornaalifold. besides dnadist and kitsch, there are other algorithms, such as upgma, paup and mrbayes, which can construct alternative trees. finding or design an optimal algorithm for detecting the phylogenetic information in the pairing columns is an open question. ideally, structure conservation should be considered because it is crucial for evaluating the similarity between two rna sequences. the second direction deals with incorporating the phylogenetic information of non-pairing bases into the folding algorithm. only covarying mutations among base-pairs are considered in phylornaalifold. in probabilistic methods, all the possible mutations, including mutations in loop regions and stack regions, are modeled with hmm. our goal is to incorporate both types of mutations into phylornaalifold, while still keep the simplicity of the scoring scheme. availability the latest version of phylornaalifold can be downloaded at: http://genome.ucf.edu/phylornaalifold. competing interests both authors declare that they have no competing interests. authors’ contributions sz conceived of the study and designed the algorithm. pg implemented the algorithm and carried out the benchmarking tests. both authors wrote and approved the manuscript. 
it incorporates the number of covarying mutations on the phylogenetic tree of the aligned sequences into the covariance scoring of rnaalifold. this scoring scheme performs better than some other approaches, such as mutual information. rnaalifold, a popular computational method for rna consensus structure prediction, incorporates covarying mutations into a thermodynamic model to fold the aligned rna sequences. in this article, in order to improve the accuracy of consensus structure folding, we propose a novel approach named phylornaalifold. the benchmarking results show that the new scoring scheme of phylornaalifold can improve the consensus structure detection of rnaalifold. incorporating additional phylogenetic information of aligned sequences into the covariance scoring of rnaalifold can improve its performance of consensus structures folding. this improvement is correlated with alignment characteristics, such as pair-wise identity and the number of sequences in the alignment. however it ignores the phylogenetic history of the aligned sequences, which is an important criterion to evaluate the level of sequence covariance.
 rnaalifold, a popular computational method for rna consensus structure prediction, incorporates covarying mutations into a thermodynamic model to fold the aligned rna sequences. when quantifying covariance, it evaluates conserved signals of two aligned columns with base-pairing rules. this scoring scheme performs better than some other approaches, such as mutual information. however it ignores the phylogenetic history of the aligned sequences, which is an important criterion to evaluate the level of sequence covariance.  in this article, in order to improve the accuracy of consensus structure folding, we propose a novel approach named phylornaalifold. it incorporates the number of covarying mutations on the phylogenetic tree of the aligned sequences into the covariance scoring of rnaalifold. the benchmarking results show that the new scoring scheme of phylornaalifold can improve the consensus structure detection of rnaalifold.  incorporating additional phylogenetic information of aligned sequences into the covariance scoring of rnaalifold can improve its performance of consensus structures folding. this improvement is correlated with alignment characteristics, such as pair-wise identity and the number of sequences in the alignment. 