Skip to main content

Stable stem enabled Shannon entropies distinguish non-coding RNAs from random backgrounds



The computational identification of RNAs in genomic sequences requires the identification of signals of RNA sequences. Shannon base pairing entropy is an indicator for RNA secondary structure fold certainty in detection of structural, non-coding RNAs (ncRNAs). Under the Boltzmann ensemble of secondary structures, the probability of a base pair is estimated from its frequency across all the alternative equilibrium structures. However, such an entropy has yet to deliver the desired performance for distinguishing ncRNAs from random sequences. Developing novel methods to improve the entropy measure performance may result in more effective ncRNA gene finding based on structure detection.


This paper shows that the measuring performance of base pairing entropy can be significantly improved with a constrained secondary structure ensemble in which only canonical base pairs are assumed to occur in energetically stable stems in a fold. This constraint actually reduces the space of the secondary structure and may lower the probabilities of base pairs unfavorable to the native fold. Indeed, base pairing entropies computed with this constrained model demonstrate substantially narrowed gaps of Z-scores between ncRNAs, as well as drastic increases in the Z-score for all 13 tested ncRNA sets, compared to shuffled sequences.


These results suggest the viability of developing effective structure-based ncRNA gene finding methods by investigating secondary structure ensembles of ncRNAs.


Statistical signals in primary sequences for non-coding RNA (ncRNA) genes have been evasive [13]. Because single strand RNA folds into a structure, the most exploitable feature for structural ncRNA gene finding has been the secondary structure [46]. The possibility that folded secondary structure may lead to successful ab initio ncRNA gene prediction methods has energized leading groups to independently develop structure-based ncRNA gene finding methods [7, 8]. The core of such a program is its secondary structure prediction mechanism, for example, based on computing the minimum free energy for the query sequence under some thermodynamic energy model [912]. The hypothesis is that the ncRNAs' secondary structure is thermodynamically stable. Nonetheless, stability measures have not performed as well as one might hope [13]; there is evidence that the measures may not be effective on all categories of ncRNAs [14].

A predicted secondary structure can be characterized for its fold certainty, using the Shannon base pairing entropy [15, 16]. The entropy ∑p i,j log p i,j of base pairings between all bases i and j can be calculated based on the partition function for the Boltzmann secondary structure ensemble, which is the space of all alternative secondary structures of a given sequence; the probability p i,j is calculated as the total of Boltzmann factors over all equilibrium alternative structures that contain the base pair (i, j) [17]. As an uncertainty measure, the base pairing Shannon entropy is maximized when base pairing probabilities are uniformly distributed. A structural RNA sequence is assumed to have a low base pairing Shannon entropy, since the distribution of its base pairing probabilities is far from uniform. The entropy measure has been scrutinized with real ncRNA data revealing a strong correlation between entropy and free energy [18, 19]. However, there has been mixed success in discerning structural ncRNAs from their randomly shuffled counterparts. Both measures perform impressively on precursor miRNAs but not as well on tRNAs and some rRNAs [14, 18].

The diverse results of the entropy measuring on different ncRNAs suggest that the canonical RNA secondary structure ensemble has yet to capture all ncRNAs structural characteristics. For example, a Boltzmann ensemble enhanced with weighted equilibrium alternative structures has also resulted in higher accuracy in secondary structure prediction [19]. There is strong evidence that the thermodynamic energy model can improve its structure prediction accuracy by considering energy contributions in addition to those from the canonical free energy model [20, 21]. Therefore, developing ncRNA structure models that can more effectively account for critical structural characteristics may become necessary for accurate measurement of RNA fold certainty.

In this paper, we present work that computes Shannon base pairing entropies based on a constrained secondary structure model. The results show substantial improvements in the Z-score of base pairing Shannon entropies on 13 ncRNA datasets [18] over the Z-score of entropies computed by existing software (e.g., NUPACK [23] and RNAfold [12, 29]) with the canonical (Boltzmann) secondary structure ensemble and the associated partition function [22]. Our limited constraint to the secondary structure space is to require only canonical base pairs to occur in stable stems. The constrained secondary structure model is defined with a stochastic context-free grammar (SCFG) and entropies are computed with the Inside and Outside algorithms. Our results suggest that incorporating more constraints may further improve the effectiveness of the fold certainty measure, offering improved ab initio ncRNA gene finding.


We implemented the algorithm for Shannon base pairing entropy calculation into a program named TRIPLE. We tested it on ncRNA datasets and compared its performance on these ncRNAs with the performance achieved by the software NUPACK [23] and RNAfold [12, 29] developed under the Boltzmann standard secondary structure ensemble [17, 22].

Data preparation

We downloaded the 13 ncRNA datasets previously investigated in Table 1 of [18]. They are of diverse functions, including pre-cursor microRNAs, group I and II introns, RNase P and MRP, bacterial and eukaryotic signal recognition particle (SRP), ribosomal RNAs, small nuclear spliceosomal RNAs, riboswitches, tmRNAs, regulatory RNAs, tRNAs, telomerase RNAs, small nucleolar RNAs, and Hammerhead ribozymes.

The results from using these datasets were analyzed with 6 different types of measures, including Z-score and p-value of minimal free energy (MFE), and Shannon base pairing entropy [18], in comparisons with random sequences. The six measures correlate to varying degrees, hence using MFE Z-score and Shannon base pairing entropy may be sufficient to cover the other measures. However, these two measures, as the respective indicators for the fold stability and fold certainty of ncRNA secondary structure, have varying performances on the 13 ncRNA datasets.

For our tests, we also generated random sequences as control data. For every ncRNA sequence, we randomly shuffled it to produce two sets of 100 random sequences each; one set was based upon single nucleotide shuffling, the other was based upon di-nucleotide shuffling. In addition, all ncRNA sequences containing nucleotides other than A, C, G, T, and U were removed for the reason that NUPACK [23] doesn't accept sequences containing wildcard symbols.

Shannon entropy distribution of random sequences

Two energy model based softwares, NUPACK (with the pseudoknot function turned off) and RNAfold, and our program TRIPLE computed base pairing probabilities on ncRNA sequences and on random sequences. In particular, for every ncRNA sequence x and its associated randomly shuffled sequence set S x , the Shannon entropies of these sequences were computed.

A Kolmogorov-Smirnov test (KS test) [24] was applied to verify the normality of the entropy distributions from all randomly shuffled sequence sets. The results show that for 99% of the sequence sets we fail to reject the hypothesis that entropies are normally distributed with 95% confidence level. This indicates that we may use a Z-score to measure performance.

Z-score scores and comparisons

For each ncRNA, the average and standard deviation of Shannon entropies of the randomly shuffled sequences were estimated. The Z-score of the Shannon entropy Q(x) of ncRNA sequence x is defined as follows:

Z ( x ) = μ ( Q ( S x ))– Q ( x ) σ ( Q ( S x ))

where μ(Q(S x )) and σ(Q(S x )) respectively denote the average and standard deviation of the Shannon entropies of the random sequences in set S x . The Z-Score measures how well entropies may distinguish the real ncRNA sequence x from their corresponding randomly shuffled sequences in S x . Figure 1 compares the averages of the Z-scores of Shannon base pairing entropies computed by NUPACK, RNAfold, and TRIPLE on each of the 13 ncRNA datasets. It shows that TRIPLE significantly improved the Z-scores over NUPACK and RNAfold across all the 13 datasets.

Figure 1
figure 1

Comparisons of averaged Z-score of Shannon base pairing entropies. Comparisons of averaged Z-score of Shannon base pairing entropies computed by NUPACK, RNAfold, and TRIPLE for each of the 13 ncRNA datasets downloaded from [18].

To examine how the Z-scores might have been improved by TRIPLE, we designated four thresholds for Z-scores, which are 2, 1.5, 1, and 0.5. The percentages of sequences of each dataset with Z-score greater than or equal to the thresholds were computed.

Table 1 shows details of the Z-score improvements over NUPACK when di-nucleotide shuffling was used. With a threshold 2 or 1.5, our method performed better than NUPACK in all datasets. With the threshold 1 and 0.5, our method improved upon NUPACK in 12 and 10 datasets, respectively. The results of TRIPLE and NUPACK using a single nucleotide random shuffling are given in Table 2, which shows that our method also performs better than NUPACK in the majority of datasets. In particular, TRIPLE performed better than NUPACK in all datasets with threshold of 2; with threshold equal to 1.5 or 1, our method had better results than NUPACK in 12 datasets and in 9 datasets with threshold equal of 0.5.

Table 1 Comparisons of TRIPLE and NUPACK by the percentages of sequences falling in each category of a Z-score range.
Table 2 Comparisons of TRIPLE and NUPACK by the percentages of sequences falling in each category of a Z-score range.

The results of RNAfold using the default setting are given in Table 3 and 4. Table 3 shows results on di-nucleotide shuffling datasets. TRIPLE works better in the majority of datasets. It outperforms RNAfold in all datasets with threshold equal to 2 and 1.5. With threshold of 1 and 0.5, TRIPLE wins 12 (tie 1) and 8 (tie 1) datasets, respectively. In Table 4, TRIPLE shows similar performance on single nucleotide shuffling datasets. It has better scores than RNAfold in 13, 13, 11, and 7 (tie 1) datasets with threshold of 2, 1.5, 1, and 0.5, respectively. In addition, RNAfold was tested with the available program options (tables not shown). With option "noLP" on RNAfold, TRIPLE performs better in 13, 13, 11 (tie 1), and 9 di-nucleotide shuffling datasets in terms of threshold of 2, 1.5, 1, and 0.5, respectively. In single nucleotide shuffling datasets, TRIPLE wins 13, 13, 12 and 8 datasets separately with threshold of 2, 1.5, 1, and 0.5.

Table 3 Comparisons of TRIPLE and RNAfold by the percentages of sequences falling in each category of a Z-score range.
Table 4 Comparisons of TRIPLE and RNAfold by the percentages of sequences falling in each category of a Z-score range.

When we specify "noLP" and "noCloseGU" on RNAfold, TRIPLE beats RNAfold in 13, 13, 12, and 11 di-nucleotide shuffling datasets, and 13, 13, 13, and 11 single nucleotide shuffling datasets with threshold 2, 1.5, 1, and 0.5, respectively. If we specify "noLP" and "noGU" on RNAfold, our method performs better on all di-nucleotide shuffling and single nucleotide shuffling datasets with all four thresholds.

We also compared TRIPLE, NUPACK, and RNAfold on some real genome background tests. Several genome sequences from bacteria, archaea, and eukaryotes were retrieved from the NCBI database. Using these genome sequences, we created genome backgrounds for the 13 ncRNA data sets. In particular, for each RNA sequence from 13 ncRNA data sets, 100 sequence segments of the same length were sampled from each genome sequence and used to test against the RNA sequence to calculate base pairing entropies and Z-score. With such genome backgrounds, the overall performance of TRIPLE on the 13 ncRNA data sets is mixed and is close to that of NUPACK and RNAfold (data not shown). This performance of TRIPLE on real genomes indicates that there is still a gap between the ability of our method and successful ncRNA gene finding. Nevertheless, the test results reveal that the constrained "triple base pairs" model is necessary but still not sufficient enough. This suggests incorporating further structural constraints will improve the effectiveness for ncRNA search on real genomes.

To roughly evaluate the speed of the three tools, the running time for 101 sequences, including 1 real miRNA sequence and its 100 single nucleotide shuffled sequences, was measured on a Linux machine with an Intel dual-core CPU (E7500 2.93 GHz). Each sequence has 100 nucleotides. TRIPLE, NUPACK, and RNAfold spent 20.7 seconds, 36.2 seconds and 3.4 seconds, respectively. We point out that TRIPLE has the potential to be optimized for each specific grammar to improves its efficiency.


This work introduced a modified ensemble of ncRNA secondary structures with the constraint of requiring only canonical base pairs to only occur and that stems must be energetically stable in all the alternative structures. The comparisons of performances between our program TRIPLE and energy model based software (NUPACK and RNAfold) implemented based on the canonical structure ensemble have demonstrated a significant improvement in the entropy measure for ncRNA fold certainty by our model. In particular, an improvement of the entropy Z-scores was shown across almost all 13 tested ncRNAs datasets previously used to test various ncRNA measures [18].

We note that there is only one exceptional case observed from Table 1, 2, 3, 4: SRP whose entropy Z-score performance was not improved (as much as other ncRNAs) when Z < 1.5. The problem might have been caused by the implementation technique rather than the methodology. Most of the tested SRP RNA sequences (Eukaryotic and archaeal 7S RNAs) are of length around 300 and contain about a dozen stems. In many of them, consecutive base pairs are broken by internal loops into small stem pieces, some having only two consecutive canonical pairs; whereas, in our SCFG implementation we simply required three consecutive base pairs as a must in a stem, possibly missing the secondary structure of many of these sequences. This issue with the SCFG can be easily fixed, e.g., by replacing the SCFG with one that better represents the constrained Boltzmann ensemble in which stems are all energetically stable.

To ensure that the performance difference between TRIPLE and energy model based software (NUPACK and RNAfold) was not due to the difference in the thermodynamic energy model (Boltzmann ensemble) and the simple statistical model (SCFG) with stacking rules, we also constructed two additional SCFG models, one for unconstrained base pairs and another requiring at least two consecutive canonical base pairs in stems. Tests on these two models over the 13 ncRNA data set resulted in entropy Z-scores (data not shown) comparable to those obtained by NUPACK and RNAfold but inferior to the performance of TRIPLE. We attribute the impressive performance by TRIPLE to the constraint of "triple base pairs" satisfied by real ncRNA sequences but which is hard to achieve for random sequences.

Since the entropy Z-score improvement by our method was not uniform across the 13 ncRNAs, one may want to look into additional other factors that might have contributed to the under-performance of certain ncRNAs. For example, the averaged GC contents are different in these 13 datasets, with SRP RNAs having 58% GC and standard deviation of 10.4%. A sequence with a high GC content is more likely to produce more spurious, alternative structures, possibly resulting in a higher base pairing entropy. However, since randomly shuffled sequences would also have the same GC content, it becomes very difficult to determine if the entropies of these sequences have been considerably affected by the GC bias. Indeed, previous investigations [25] have revealed that, while the base composition of a ncRNA is related to the phylogenetic branches on which the specific ncRNA may be placed, it may not fully explain the diverse performances of structure measures on various ncRNAs. Notably it has been discovered that base compositions are distinct in different parts of rRNA secondary structure (stems, loops, bulges, and junctions) [26], suggesting that an averaged base composition may not suitably represent the global structural behavior of an ncRNA sequence.

Technically the TRIPLE program was implemented with an SCFG that assumes stems to have at least three consecutive canonical base pairs. Yet, as we pointed out earlier, the performance results should hold for a constrained Boltzmann ensemble in which stems are required to be energetically stable. This constraint of stable stems was intended to capture the energetic stability of helical structures in the native tertiary fold [27, 28]. Since the ultimate distinction between a ncRNA and a random sequence lies in its function (thus tertiary structure); additional, critical tertiary characteristics may be incorporated into the structure ensemble to further improve the fold certainty measure. In our testing of stem stability (see section "Energetically stable stems"), ncRNA sequences from the 51 datasets demonstrated certain sequential properties that may characterize tertiary interactions, e.g., coaxial stacking of helices. However, to computationally model tertiary interactions, a model beyond a context-free system would be necessary; thus it would be difficult to use an SCFG or a Boltzmann ensemble for this purpose. We need to develop methods to identify tertiary contributions critical to the Shannon base pairing entropy measure and to model such contributions. Although this method and technique have been developed with reference to non-coding RNAs, it is possible that protein-coding mRNAs would display similar properties, when sufficient structural information about them has been gathered.


We present work developing structure measures that can effectively distinguish ncRNAs from random sequences. We compute Shannon base pairing entropies based on a constrained secondary structure model that favors tertiary folding. Experimental results indicate that our approach significantly improves the Z-score of base pairing Shannon entropies on 13 ncRNA datasets [18] in comparison to that computed by NUPACK [23] and RNAfold [12, 29]. These results shows that investigating secondary structure ensembles of ncRNAs is helpful for developing effective structure-based ncRNA gene finding methods.

Method and model

Our method to distinguish ncRNAs from random sequences is based on measuring of the base pairing Shannon entropy [15, 16] under a new RNA secondary structure model. The building blocks of this model are stems arranged in parallel and nested patterns connected by unpaired strand segments, similar to those permitted by a standard ensemble [11, 17, 29]. The new model is constrained, however, to contain a smaller space of equilibrium alternative structures, requiring there are only energetically stable stems (e.g., of free energy levels under a threshold) to occur in the structures. The constraint is basically to consider the effect of energetically stable stems on tertiary folding and to remove spurious structures that may not correspond to a tertiary fold. According to the RNA folding pathway theory and the hierarchical folding model [27, 28, 30], building block helices are first stabilized by canonical base pairings before being arranged to interact with each other or with unpaired strands through tertiary motifs (non-canonical nucleotide interactions). A typical example is the multi-loop junctions in which one or more pairs of coaxially stacked helices bring three or more regions together, further stabilized by the tertiary motifs at the junctions [31, 32]. The helices involved are stable before the junction is formed or any possible nucleotide interaction modifications are made to the helical base pairs at the junction [33].

Energetically stable stems

A stem is the atomic, structural unit of the new secondary structure space. To identify the energy levels of stems suitable to be included in this model, we conducted a survey on the 51 sets of ncRNA seed alignments, representatives of the ncRNAs in Rfam [34], which had been used with the software Infernal [35] as benchmarks. From each ncRNA seed structural alignment, we computed the thermodynamic free energy of every instance of a stem in the alignment data using various functions of the Vienna Package [12, 29] as follows. RNAduplex was first applied to the two strands of the stem marked by the annotation to predict the optimal base pairings within the stem, then, the minimum free energy of the predicted stem structure, with overhangs removed, was computed with RNAeval. Figures 2 and 3 respectively show plots of the percentages and cumulative percentages of free energy levels of stems in these 51 ncRNA seed alignments.

Figure 2
figure 2

Percentages of free-energy of stems. Percentages of free-energy of stems from 51 Rfam datasets (percentages of stems with free-energy less than -12 are not given in this figure).

Figure 3
figure 3

Cumulative percentages of free-energy of stems. Cumulative percentages of free-energy of stems from 51 Rfam datasets (cumulative percentages of stems with free-energy less than -12 are not given in this figure). Note the step at -3.4.

The peaks (with relatively high percentages) on the percentage curve of Figure 2 indicate concentrations of certain types of stems at energies levels around -4.5, -3.3, and -2.4 kcal/mol. Since a G-U pair is counted weakly towards the free energy contribution (by the Vienna package), we identified the peak value -4.5 kcal/mol to be the free energy of stems of three base pairs, with two G-C pairs and one A-U in the middle or two A-U pairs and one G-C in the middle. The value -3.3 kcal/mol is the free energy of stems containing exactly two G-C pairs or stems with one G-C pair followed by two A-U pairs. Values around -2.4 kcal/mol are stems containing one G-C and an A-U pair or simply four A-U pairs.

Based on this survey, we were able to identify two energy thresholds: -3.4 and -4.6 kcal/mol for semi-stable stems and stable stems respectively. Both require at least three base pairs of which at least one is G-C pair. We further observed the difference between these two categories of stems on the 51 ncRNA datasets. In general, although levels of energy appear to be somewhat uniformly distributed (see Figure 3), an overwhelmingly large percentage of stems in both categories are located in the vicinity of other stems. In particular, 79.6% of stable stems (with a free energy -4.6 kcal/mol or lower) have 0 (number of nucleotides) distance from their closest neighbor stem and 16.5% of stable stems have distance 1 from their closest neighbors. For semi-stable stems, the group having zero distance to other stems is 85.6% of the total while the group having distance 1 is 10.6%. Since zero distance between two stems may reflect a contiguous strand connecting two coaxially stacked helices in tertiary structure, our survey suggests a semi-stable stem interacts with another stem to maintain even its own local stability. In the rest of this work, we do not distinguish between stable and semi-stable stems. In conducting this survey, we did not directly use the stem structures annotated in the seed alignments to compute their energies. Due to evolution, substantial structural variation may occur across species; one stem may be present in one sequence and absent in another but a structural alignment algorithm may try to align all sequences to the consensus stem, giving rise to "misalignments" which we have observed [36]. Most of such "malformed stems" mistakenly aligned to the consensus often contain bulges or internal loops and have higher free energies greater than the threshold -3.4 kcal/mol.

The RNA secondary structure model

In the present study, a secondary structure model is defined with a Stochastic Context Free Grammar (SCFG) [37]. Our model requires there are at least three consecutive base pairs in every stem; the constraint is described with the following seven generic production rules:

  1. (1)

    Xa (2) XaX (3) XaHb

  2. (4)

    XaHbX (5) HaHb (6) HaYb

  3. (7)


where capital letters are non-terminal symbols that define substructures and low case letters are terminals, each being one of the four nucleotides A, C, G, and U.

The starting non-terminal, X, can generate an unpaired nucleotide or a base pair with the first three rules. The fourth rule generates two parallel substructures. Non-terminal H is used to generate consecutive base pairs with non-terminal Y to generate the closing base pair. Essentially, the process of generating a stem needs to recursively call production rules with the left-hand-side non-terminals X, H and Y each at least once. This constraint guarantees that every stem has at least three consecutive base pairs, as required by our secondary structure model.

Probability parameter calculation

There are two sets of probability parameters associated with the induced SCFG. First, we used a simple scheme of probability settings for the unpaired bases and base pairs, with a uniform 0.25 probability for every base. The probability distribution of {0.25, 0.25, 0.17, 0.17, 0.08, 0.08} is given to the six canonical base pairs G-C, C-G, A-U, U-A, G-U, and U-G; a probability of zero is given to all non-canonical base pairs. Alternatively, probabilities for unpaired bases and base pairs may be estimated from available RNA datasets with known secondary structures [34], as has been done in some of the previously work with SCFGs [38, 39].

Second, we computed the probabilities for the production rules of the model as follows. To allow our method to be applicable to all structural ncRNAs, we did not estimate the probabilities based on a training data set. In fact, we believe that the probability parameter setting of an SCFG for the fold certainty measure should be different from that for fold stability measure (i.e., folding). Based on the principle of maximum entropy, we developed the following approach to calculate the probabilities for the rules in our SCFG model.

Let p i be the probability associated with the production rule i, for i = 1, 2,...,7, respectively. Since the summation of probabilities of rules with the same non-terminal on the left-hand-side is required to be 1, we can establish the following equations:

p 1 + p 2 + p 3 + p 4 = 1 p 5 + p 6 = 1 p 7 = 1


q b p = 0 . 25 × 0 . 25 × 0 . 17 × 0 . 17 × 0 . 08 × 0 . 08 6

be the geometric average of the six base pair probabilities. According to the principle of maximum entropy, given we have no prior knowledge of a probability distribution, the assumption of a distribution with the maximum entropy is the best choice, since it will take the smallest risk [40]. If we apply this principle to our problem, the probability contribution from a base pair should be close to the contribution from unpaired bases. Rule probabilities can be estimated to satisfy following equations:

p 1 = p 2 p 3 = p 4 ( q b p ) 3 × p 3 × p 6 × p 7 = ( 0 . 25 × p 1 ) 6 ( q b p ) 4 × p 3 × p 5 × p 6 × p 7 = ( 0 . 25 × p 1 ) 8

From above equations, it follows that

p 1 = 0 . 499 p 2 = 0 . 499 p 3 = 0 . 001 p 4 = 0 . 001 p 5 = 0 . 103 p 6 = 0 . 897 p 7 = 1

Computing base pairing Shannon entropy

Based on the new RNA secondary structure model, we can compute the fold certainty of any given RNA sequence, which is defined as the Shannon entropy measured on base pairings formed by the sequence over the specified secondary structure space Ω. Specifically, let the sequence be x = x1x2 ... x n of n nucleotides. For indexes i < j, the probability P i,j of base pairing between bases x i and x j is computed with

P i , j ( x ) = s Ω p ( s , x ) δ ( x ) i , j s

where p(s, x) is the probability of x being folded into to the structure s in the space Ω and δ ( x ) i , j s is a binary value indicator for the occurrence of base pair (x i , x j ) in structure s. The Shannon entropy of P i,j (x) is computed as [15, 16]

Q ( x ) = - 1 n i < j P i , j ( x ) log P i , j ( x )

To compute the expected frequency of the base pairing, P i,j (x), with formula (2), we take advantage of the Inside and Outside algorithms developed for SCFG [37]. Given any nonterminal symbol S in the grammar, the inside probability is defined as

α ( S , i , j , x ) = P r o b ( S * x i x i + 1 x j )

i.e., the total probability for the sequence segment x i x i +1 ... x j to adopt alternative substructures specified by S. Assume S0 to be the initial nonterminal symbol for the SCFG model. Then α(S0, 1, n, x) is the total probability of the sequence x's folding under the model.

The outside probability is defined as

β ( S , i , j , x ) = P r o b ( S 0 * x 1 x i - 1 S x j + 1 x n )

i.e., the total probability for the whole sequence x1 ... x n to adopt all alternative substructures that allow the sequence segment from position i to position j to adopt any substructure specified by S (see Figure 4 for illustration).

Figure 4
figure 4

Illustration of the application of the generic production rule. Illustration of the application of the generic production rule SaRbT that produces a base pair between positions i and j for the query sequence x, provided that the start non-terminal S0 derives x1x2 ... x i -1Sx k +1 ... x n . Note that given i and j, the position of k can vary.

P i,j (x) then can be computed as the normalized probability of the base pair (x i , x j ) occurring in all valid alternative secondary structures of x:

S a R b T P r o b ( S a R b T , a = x i , b = x j ) γ ( R , S , T , i , j , x ) α ( S 0 , 1 , n , x )


γ ( R , S , T , i , j , x ) = j < k n α ( R , i + 1 , j - 1 , x ) × β ( S , i , k , x ) × α ( T , j + 1 , k , x )

in which variables S, R, T are for non-terminals and variable production SaRbT represents rules (3)~(7) which involve base pair generations. For rules where T is empty, the summation and term α(T, j + 1, k, x) do not exist and k is fixed as j.

The efficiency to compute P i,j (x) mostly depends on computing the Inside and Outside probabilities, which can be accomplished with dynamic programming and has the time complexity O(mn3) for a model of m nonterminals and rules and sequence length n.


  1. Eddy S: Non-coding RNA genes and the modern RNA world. Nature Reviews Genetics 2001, 2(12):919–929. 10.1038/35103511

    Article  CAS  PubMed  Google Scholar 

  2. Schattner P: Computational gene-finding for noncoding RNAs. In Noncoding RNAs: Molecular Biology and Molecular Medicine. Edited by: Barciszewski, Erdmann. Springer; 2003:33–48.

    Google Scholar 

  3. Griffiths-Jones S: Annotating noncoding RNA genes. Annu Rev Genomics Hum Genet 2007, 8: 279–298. 10.1146/annurev.genom.8.080706.092419

    Article  CAS  PubMed  Google Scholar 

  4. Eddy S: Computational genomics of noncoding RNA genes. Cell 2002, 109(2):137–140. 10.1016/S0092-8674(02)00727-4

    Article  CAS  PubMed  Google Scholar 

  5. Uzilov AV, Keegan JM, Mathews DH: Detection of non-coding RNAs on the basis of predicted secondary structure formation free energy change. BMC Bioinformatics 2006, 7: 173. 10.1186/1471-2105-7-173

    Article  PubMed Central  PubMed  Google Scholar 

  6. Machado-Lima A, del Portillo HA, AM D: Computational methods in noncoding RNA research. Journal of Mathematical Biology 2008, 56(1–2):15–49.

    Article  PubMed  Google Scholar 

  7. Washietl S, Hofacker IL, Stadler PF: Fast and reliable prediction of noncoding RNAs. Proc Natl Acad Sci USA 2005, 102(7):2454–2459. 10.1073/pnas.0409169102

    Article  PubMed Central  CAS  PubMed  Google Scholar 

  8. Pedersen J, Bejerano G, Siepel A, Rosenbloom K, Lindblad-Toh K, Lander E, Rogers J, Kent J, Miller W, Haussler D: Identification and classification of conserved RNA secondary structures in the human genome. PLoS Computational Biology 2006, 2(4):e33. 10.1371/journal.pcbi.0020033

    Article  PubMed Central  CAS  PubMed  Google Scholar 

  9. Turner D, Sugimoto N, Kierzek R, Dreiker S: Free energy increments for bydrogene bounds in nucleic acid base pairs. Journal of Am Chem Soc 1987, 109: 3783–3785. 10.1021/ja00246a047

    Article  CAS  Google Scholar 

  10. Turner DH, Sugimoto N, Freier SM: RNA structure prediction. Annu Rev Biophys Biophys Chem 1988, 17: 167–192. 10.1146/

    Article  CAS  PubMed  Google Scholar 

  11. Zuker M, Steigler P: Optimal computer folding of larger RNA sequences using thermodynamics and auxiliary information. Nucleic Acids Res 1981, 9: 133–148. 10.1093/nar/9.1.133

    Article  PubMed Central  CAS  PubMed  Google Scholar 

  12. Hofacker I, Fontana W, Stadler P, Bonhoeffer L, tacker M, Schuster P: Fast folding and comparison of RNA sequence structures. Monatsh Chem 1994, 125: 167–168. 10.1007/BF00818163

    Article  CAS  Google Scholar 

  13. Moulton V: Tracking down noncoding RNAs. Proc Natl Acad Sci USA 2005, 102(7):2269–2270. 10.1073/pnas.0500129102

    Article  PubMed Central  CAS  PubMed  Google Scholar 

  14. Bonnet E, Wuyts J, Rouzé P, Van de Peer Y: Evidence that microRNA precursors, unlike other non-coding RNAs, have lower folding free energies than random sequences. Bioinformatics 2004, 20(17):2911–2917. 10.1093/bioinformatics/bth374

    Article  CAS  PubMed  Google Scholar 

  15. Mathews D: Using an RNA secondary structure partition function to determine confidence in base pairs predicted by free energy minimization. RNA 2004, 10(8):1178–1190. 10.1261/rna.7650904

    Article  PubMed Central  CAS  PubMed  Google Scholar 

  16. Huynen M, Gutell R, Konings D: Assessing the reliability of RNA folding using statistical mechanics. Journal of Molecular Biology 1997, 267: 1104–1112. 10.1006/jmbi.1997.0889

    Article  CAS  PubMed  Google Scholar 

  17. McCaskill J: The equilibrium partition function and base pair probabilities for RNA secondary structure. Biopolymers 1990, 29(6–7):1105–1119. 10.1002/bip.360290621

    Article  CAS  PubMed  Google Scholar 

  18. Freyhult E, Gardner P, Moulton V: A comparison of RNA folding measures. BMC Bioinformatics 2005., 6(241):

  19. Ding Y, Lawrence C: A statistical sampling algorithm for RNA secondary structure prediction. Nucl Acids Res 2003, 31(24):7280–7301. 10.1093/nar/gkg938

    Article  PubMed Central  CAS  PubMed  Google Scholar 

  20. Walter A, Turner D, Kim J, Matthew H, Muller P, Mathews D, Zuker M: Coaxial stacking of helices enhances binding of oligoribonucleotides and improves predictions of RNA folding. Proc Natl Acad Sci USA 1994, 91(20):9218–9222. 10.1073/pnas.91.20.9218

    Article  PubMed Central  CAS  PubMed  Google Scholar 

  21. Tyagi R, Mathews D: Predicting helical coaxial stacking in RNA multibranch loops. RNA 2007, 13(7):939–951. 10.1261/rna.305307

    Article  PubMed Central  CAS  PubMed  Google Scholar 

  22. Dirks R, Pierce N: An algorithm for computing nucleic acid base-pairing probabilities including pseudoknots. J Comput Chem 2004, 25: 1295–1304. 10.1002/jcc.20057

    Article  CAS  PubMed  Google Scholar 

  23. Dirks R, Bois J, Schaeffer J, Winfree E, Pierce N: Thermodynamic analysis of interacting nucleic acid strands. SIAM Rev 2007, 49: 65–88. 10.1137/060651100

    Article  Google Scholar 

  24. Kolmogorov A: Sulla determinazione empirica di una legge di distribuzione. G Inst Ital Attuari 1933, 4: 83–91.

    Google Scholar 

  25. Schultes E, Hraber P, LaBean T: Estimating the contributions of selection and self-organization in secondary structure. Journal of Molecular Evolution 1999, 49: 76–83. 10.1007/PL00006536

    Article  CAS  PubMed  Google Scholar 

  26. Smit S, Yarus M, Knight B: Natural selection is not required to explain universal compositional patterns in rRNA secondary structure categories. RNA 2006, 12: 1–14. 10.1261/rna.2183806

    Article  PubMed Central  CAS  PubMed  Google Scholar 

  27. Masquida B, Westhof E: A modular and hierarchical approach for all-atom RNA modeling. In The RNA World. 3rd edition. Edited by: Gesteland RF, Cech TR, Atkins JF. Cold Spring Harbor Laboratory Press; 2006:659–681.

    Google Scholar 

  28. Tinoco I, Bustamante C: How RNA folds. Journal of Molecular Biology 1999, 293(2):271–281. 10.1006/jmbi.1999.3001

    Article  CAS  PubMed  Google Scholar 

  29. Hofacker IL: Vienna RNA secondary structure server. Nucleic Acids Research 2003, 31(13):3429–3431. 10.1093/nar/gkg599

    Article  PubMed Central  CAS  PubMed  Google Scholar 

  30. Batey RT, Rambo RP, Doudna JA: Tertiary motifs in RNA structure and folding. Angew Chem Int Ed Engl 1999, 38: 2326–2343. 10.1002/(SICI)1521-3773(19990816)38:16<2326::AID-ANIE2326>3.0.CO;2-3

    Article  PubMed  Google Scholar 

  31. Lescoute A, Westhof E: Topology of three-way junctions in folded RNAs. RNA 2006, 12: 83–93. 10.1261/rna.2208106

    Article  PubMed Central  CAS  PubMed  Google Scholar 

  32. Laing C, T S: Analysis of four-way junctions in RNA structures. J Mol Biol 2009, 390(3):547–559. 10.1016/j.jmb.2009.04.084

    Article  PubMed Central  CAS  PubMed  Google Scholar 

  33. Thirumalai D: Native secondary structure formation in RNA may be a slave to tertiary folding. Proc Natl Acad Sci USA 1998, 95(20):11506–11508. 10.1073/pnas.95.20.11506

    Article  PubMed Central  CAS  PubMed  Google Scholar 

  34. Griffiths-Jones S, Moxon S, Marshall M, Khanna A, Eddy S, Bateman A: Rfam: Annotating Non-Coding RNAs in Complete Genomes. Nucleic Acids Research 2005, 33: D121-D141.

    Article  PubMed Central  CAS  PubMed  Google Scholar 

  35. Nawrocki E, Kolbe D, Eddy S: Infernal 1.0: inference of RNA alignments. Bioinformatics 2009, 25(10):1335–1337. 10.1093/bioinformatics/btp157

    Article  PubMed Central  CAS  PubMed  Google Scholar 

  36. Huang Z, M M, Malmberg R, Cai L: RNAv: Non-coding RNA secondary structure variation search via graph Homomorphism. Proceedings of Computational Systems Bioinformatics; Stanford 2010, 56–68.

    Google Scholar 

  37. Durbin R, Eddy S, Krogh A, Mitchison GJ: Biological Sequence Analysis: Probabilistic Models of Proteins and Nucleic Acids. Cambridge, UK: Cambridge University Press; 1998.

    Book  Google Scholar 

  38. Klein RJ, Eddy SR: RSEARCH: finding homologs of single structured RNA sequences. BMC Bioinformatics 2003, 4: 44. 10.1186/1471-2105-4-44

    Article  PubMed Central  PubMed  Google Scholar 

  39. Knudsen B, Hein J: Pfold: RNA secondary structure prediction using stochastic context-free grammars. Nucl Acids Res 2003, 31(13):3423–3428. 10.1093/nar/gkg614

    Article  PubMed Central  CAS  PubMed  Google Scholar 

  40. Jaynes ET: Prior probabilities. IEEE Transactions on Systems Science and Cybernetics 1968, 4(3):227–241.

    Article  Google Scholar 

Download references


This research project was supported in part by NSF MRI 0821263, NIH BISTI R01GM072080-01A1 grant, NIH ARRA Administrative Supplement to NIH BISTI R01GM072080-01A1, and NSF IIS grant of award No: 0916250.

This article has been published as part of BMC Bioinformatics Volume 13 Supplement 5, 2012: Selected articles from the First IEEE International Conference on Computational Advances in Bio and medical Sciences (ICCABS 2011): Bioinformatics. The full contents of the supplement are available online at

Author information

Authors and Affiliations


Corresponding authors

Correspondence to Yingfeng Wang or Liming Cai.

Additional information

Competing interests

The authors declare that they have no competing interests.

Authors' contributions

YW contributed to grammar design, algorithm development, program implementation, data acquisition, tests, result analysis, and manuscript drafting. AM contributed to algorithm design and program implementation. PS and TIS contributed to data acquisition and tests. YWL participated in model discussion. RLM contributed to the supervision, data acquisition, results analyses, biological insights, and manuscript drafting. LC conceived the overall model and algorithm and drafted the manuscript. All authors read and approved the manuscript.

Rights and permissions

This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Reprints and permissions

About this article

Cite this article

Wang, Y., Manzour, A., Shareghi, P. et al. Stable stem enabled Shannon entropies distinguish non-coding RNAs from random backgrounds. BMC Bioinformatics 13 (Suppl 5), S1 (2012).

Download citation

  • Published:

  • DOI: