# RNA Accessibility in cubic time

- Stephan H Bernhart
^{1}Email author, - Ullrike Mückstein^
^{1}and - Ivo L Hofacker
^{1}

**6**:3

https://doi.org/10.1186/1748-7188-6-3

© Bernhart et al; licensee BioMed Central Ltd. 2011

**Received: **22 November 2010

**Accepted: **9 March 2011

**Published: **9 March 2011

## Abstract

### Background

The accessibility of RNA binding motifs controls the efficacy of many biological processes. Examples are the binding of miRNA, siRNA or bacterial sRNA to their respective targets. Similarly, the accessibility of the Shine-Dalgarno sequence is essential for translation to start in prokaryotes. Furthermore, many classes of RNA binding proteins require the binding site to be single-stranded.

### Results

We introduce a way to compute the accessibility of all intervals within an RNA sequence in
(*n*^{3}) time. This improves on previous implementations where only intervals of one defined length were computed in the same time. While the algorithm is in the same efficiency class as sampling approaches, the results, especially if the probabilities get small, are much more exact.

### Conclusions

Our algorithm significantly speeds up methods for the prediction of RNA-RNA interactions and other applications that require the accessibility of RNA molecules. The algorithm is already available in the program RNAplfold of the ViennaRNA package.

## Background

The importance of RNA within living cells has been realized in the last two decades. RNA provides a layer of regulation in eukaryotes, e.g. via miRNA, but also in prokaryotes via small RNAs (sRNAs) and riboswitches. Many of these regulatory functions are mediated by RNA interactions. These interactions are mainly realized through Watson-Crick or wobble base pairing between two RNA molecules. For the initialization of these interactions, a part of the interacting molecules has to be single-stranded. The tendency to be single-stranded is thus also important for the quality of putative target sites of miRNAs [1], siRNAs [2] and most probably sRNAs. Furthermore, the accessibilities of the Shine-Dalgarno sequence and the start codons are indicators of translational efficacy [3]. In addition, RNA accessibility will also influence the efficacy of single-strand binding proteins like *HuR*[4]. As it is not known how big exactly a putative target site is, and where it is located, it is best to know the accessibilities of all possible intervals within a RNA molecule. In particular, programs like RNAup [5, 6] or IntaRNA [7] predict RNA-RNA interactions by computing a total binding energy *δG*_{tot} = *δG*_{int} + *δG*_{open}, composed of a stabilizing energy for the intermolecular duplex *δG*_{int} and the cost of opening the binding sites *δG*_{open}. The opening energy can be computed from the accessibility, defined as the probability *p*^{
u
} that the binding site is unpaired in equilibrium, via *δG*_{open} = -*RT* ln(*p*^{
u
} ).

The most naive approach to compute the accessibility of a certain stretch of bases is to use a constrained folding where no base pairs are allowed within a certain stretch of bases and dividing the respective restricted partition function by the unrestricted one. This is done for example in the miRNA target predictor PITA [8]. However, doing this for all *n*^{2} possible intervals requires
(*n*^{5}) time. Ding and Lawrence [9] proposed to compute accessibilities by stochastically sampling structures from the Boltzmann ensemble. Sampling structures can be done in
(*n*^{3}), but necessarily introduces sampling errors which become large if the accessibilities get small, as is necessarily the case for longer regions. In [10], we introduced an algorithm that computes the accessibilities of all intervals of a given length *l* in cubic time. This leads to a
(*n*^{4}) algorithm when applied to intervals of all possible lengths. In addition, the algorithm could be used as a scanning algorithm that considers only local structures of a maximum length *L* and runs in
(*nL*^{2}*l*).

Here we introduce an algorithm to compute the accessibilities or single-strandedness of all intervals of an RNA molecule in
(*n*^{3}) time and
(*n*^{2}) memory. This is the same complexity as the algorithm to compute the partition function, which is underlying the sampling approaches, like sfold [11], commonly used for this task. However, the probabilities to be accessible for different intervals are not independent. Therefore, if one is interested in more complex questions, e.g. the joint probability that two intervals are accessible, this is no way around sampling the structures of the molecules.

The first predecessor of our algorithm, not yet fully
(*n*^{3}), has been used in RNAup [5]. The RNAplfold program of the ViennaRNA package [12] originally used the algorithm introduced in [10], but has been rewritten to use the efficient version of the algorithm presented below.

*Q*(

*i*,

*j*) of a sequence interval

*i*,

*j*is split into a part where

*i*is unpaired and a part where

*i*is paired:

*Q*

^{ B }(

*i*,

*j*) is the partition function for a stretch between

*i*,

*j*given that (

*i*,

*j*) form a base pair and

*Q*(

*a*,

*b*) = 1 if

*a*≥

*b*. A base pair can either close a hairpin loop, an interior loop (including bulge loops and stacks) or a multi(branch) loop.

*i*,

*j*): ( , with ), stands for the Boltzmann factor of the interior loop enclosed by the base pairs (

*i*,

*j*) and (

*k*,

*l*). For the multi loop contributions,

*Q*

^{ M }(

*i*,

*j*) holds the partition function for a part of a multi loop, and

*Q*

^{M 1}(

*i*,

*j*) are multi loop contributions that contain exactly one stem, where

*i*belongs to the outermost base pair of this stem.

*Q*

^{M 1}(

*i*,

*j*) is needed to keep the multi loop decomposition unambiguous. The factors

*a*,

*b*and

*c*are Boltzmann weighted contributions for closing a multi loop, adding a base pair or an unpaired base to the multi loop, respectively. Note that here, the size of the interior loops is limited to keep the algorithm cubic in time. See Figure 1 for a graphical representation of the recursion.

*n*, that is the quotient between the partition function of all states containing the base pair,

*Q*

^{ bp }(

*i*,

*j*) and the total partition function is computed.

*Q*

^{ bp }(

*i*,

*j*) is decomposed into an outer ( ) and an inner (

*Q*

^{ B }(

*i*,

*j*)) partition function. The computation of the outer partition function of a base pair is split into two cases: The trivial case where no base pair is enclosing the base pair (

*i*,

*j*), and the case where there exists at least one base pair (

*k*,

*l*) with

*k*<

*i*<

*j*<

*l*.

## Algorithm

*p*

^{ u }(

*x*,

*x*+

*L*) that a sequence interval

*x*...

*x*+

*L*contains no paired bases. As can be seen in Figure 3, an unpaired stretch

*x*...

*x*+

*L*is either not enclosed by a base pair, which again is the trivial case, or there is a base pair (

*i*,

*j*) enclosing the unpaired region such that

*i*<

*x*<

*x*+

*L*<

*j*(we call the sum of these contributions

*Q*

^{ ub }(

*x*,

*x*+

*L*)).

*i*- 1 ≤

*x*- 1, then the 3' end of the pair,

*j*, has to be downstream of the unpaired region, i.e. at least at position

*x*+

*L*+ 1. This gives rise to a contribution

*Q*

^{ H }(

*i*,

*x*+

*L*). Summing over

*i*yields the complete partition function for the hairpin case:

*Q*

^{I 5}(

*i*,

*k*) (

*Q*

^{I 3}(

*l*,

*j*)) over all structures in which

*i*...

*k*(

*l*...

*j*) forms the 5' (3') side of an interior loop (see Figure 3 row 3):

*Q*

^{ H }in the hairpin case,

*Q*

^{ I }(

*x*,

*x*+

*L*) sums over all cases where the position

*x*- 1 preceding our region is paired. The final summation takes care of the cases where the interior loop starts before

*x*- 1:

*x*- 1 is paired with some

*g*<

*x*- 1, closing a multi loop component (i.e. (

*g*,

*x*- 1) is one of the interior pairs of the multi loop). The multi loop is closed by a pair (

*i*,

*j*), where

*i*<

*g*. The region between

*x*...

*j*- 1 is a part of the multi loop not yet determined. In the case of ,

*x*...

*j*- 1 has to contain at least one other multi loop component. In , at least one other multi loop component exists between

*g*and

*i*, so that no additional multi loop component is needed.

## Implementation

*Q*

^{I 5}and

*Q*

^{I 3}are saved during the computation of the base pair probabilities in Eqn 4. The multi loop terms and are also computed during the computation of the pair probabilities in Eqn 5, while

*Q*

^{M 2}is saved during the forward recursion Eqn 2. The computation of the accessibilities is thus conveniently performed after the outside recursion. Some of the matrices needed for the computation of

*Q*

^{ ub }can be computed recursively:

and thus require negligible additional computational costs. Due to the layout of this algorithm, it is easily possible to split the terms and e.g. find the probability of an interval to be within a hairpin loop or an interior loop. This can be useful if special types of RNA interactions, for example kissing hairpin interactions, are to be considered.

### Minimum free energy version

*x*...

*x*+

*L*for every single interval

*x*...

*x*+

*L*. In principle, the computation of the optimal energy and the backtracking procedure of its structure are similar to the partition function version described above. Because ambiguity is of no concern, only one matrix for multi loop contributions has to be filled. Thus, after computing the "usual" matrices for RNA minimum free energy prediction (the minimum free energy

*F*(

*i*,

*j*), the minimum energy given that

*i*and

*j*form a base pair

*C*(

*i*,

*j*), and the minimum free energy for multi loop segments

*M*(

*i*,

*j*)), we need to fill the following matrices:

*f*

_{ a }(

*x*,

*x*+

*L*) with an accessible interval between

*x*and

*x*+

*L*is then:

In our current implementation, computation of the structure on the outside of a base pair is done by doubling the sequence, doing a simple cofolding and backtracking *j*, *i* + *n* for the base pair (*i*, *j*). This leaves room for improvement, as the memory consumption is twice as high as is strictly necessary. Backtracking the *f*_{
a
} (*i*, *j*)s gives the secondary structures to the energies.

*f*

_{ a }(

*i*,

*n*) subset of the secondary structures can be viewed as the minimum free energy structures during transcription of a RNA molecule. The unpaired interval in this case is regarded as the part of the molecule that is not yet transcribed. As an example, we show the ydhL Adenine riboswitch in Figure 4.

### Application

*W*, the contribution of to the computation of ,

*k*<

*i*<

*j*<

*l*, would be:

The are subsequently also used in the computation of the accessibilities. This makes the program applicable to even the largest sequences, such as complete chromosomes or all mRNAs of an organism. Several programs, like RNAxs [2], IntaRNA [7], and RNAplex [15] are already using the accessibility computations implemented in RNAplfold with great success to rapidly predict accessibilities of putative target sites on mRNAs.

## Declarations

### Acknowledgements

This work was funded, in part, by the austrian GEN-AU projects "regulatory non coding RNA" and "Bioinformatics Integration Network III". The authors want to thank Ronny Lorenz for thoroughly checking the indices.

## Authors’ Affiliations

## References

- Kertesz M, Iovino N, Unnerstall U, Gaul U, Segal E: The role of site accessibility in microRNA target recognition. Nat Genet. 2007, 39 (10): 1278-84. 10.1038/ng2135PubMedView ArticleGoogle Scholar
- Tafer H, Ameres S, Obernosterer G, Gebeshuber C, Schroeder R, Martinez J, Hofacker I: The impact of target site accessibility on the design of effective siRNAs. Nat Biotechnol. 2008, 26 (5): 578-83. 10.1038/nbt1404PubMedView ArticleGoogle Scholar
- Wikström P, Lind L, Berg D, Björk G: Importance of mRNA folding and start codon accessibility in the expression of genes in a ribosomal protein operon of Escherichia coli. J Mol Biol. 1992, 224 (4): 949-66.PubMedView ArticleGoogle Scholar
- Hackermüller J, Meisner N, Auer M, Jaritz M, Stadler P: The effect of RNA secondary structures on RNA-ligand binding and the modifier RNA mechanism: a quantitative model. Gene. 2005, 345: 3-12.PubMedView ArticleGoogle Scholar
- Mückstein U, Tafer H, Hackermüller J, Bernhart S, Stadler P, Hofacker I: Thermodynamics of RNA-RNA binding. Bioinformatics. 2006, 22 (10): 1177-82.PubMedView ArticleGoogle Scholar
- Mückstein U, Tafer H, Bernhart SH, Hernandez-Rosales M, Vogel J, Stadler PF, Hofacker IL: Translational Control by RNA-RNA Interaction: Improved Computation of RNA-RNA Binding Thermodynamics. Bioinformatics Research and Development, Volume 13 of Communications in Computer and Information Science. Edited by: Elloumi M, Küng J, Linial M, Murphy R, Schneider K, Toma C. 2008, 114-127. Springer,Google Scholar
- Busch A, Richter A, Backofen R: IntaRNA: efficient prediction of bacterial sRNA targets incorporating target site accessibility and seed regions. Bioinformatics. 2008, 24 (24): 2849-56. 10.1093/bioinformatics/btn544PubMedPubMed CentralView ArticleGoogle Scholar
- Kertesz M, Iovino N, Unnerstall U, Gaul U, Segal E: The role of site accessibility in microRNA target recognition. Nat Genet. 2007, 39 (10): 1278-84. 10.1038/ng2135PubMedView ArticleGoogle Scholar
- Ding Y, Lawrence CE: Statistical prediction of single-stranded regions in RNA secondary structure and application to predicting effective antisense target sites and beyond. Nucleic Acids Res. 2001, 29 (5): 1034-46. 10.1093/nar/29.5.1034PubMedPubMed CentralView ArticleGoogle Scholar
- Bompfünewerer A, Backofen R, Bernhart S, Hertel J, Hofacker I, Stadler P, Will S: Variations on RNA folding and alignment: lessons from Benasque. J Math Biol. 2008, 56 (1-2): 129-44.PubMedView ArticleGoogle Scholar
- Ding Y, Lawrence C: A statistical sampling algorithm for RNA secondary structure prediction. Nucleic Acids Res. 2003, 31 (24): 7280-301. 10.1093/nar/gkg938PubMedPubMed CentralView ArticleGoogle Scholar
- Hofacker IL, Fontana W, Stadler PF, Bonhoeffer S, Tacker M, Schuster P: Fast Folding and Comparison of RNA Secondary Structures. Monatsh Chemie. 1994, 125 (2): 167-188. 10.1007/BF00818163View ArticleGoogle Scholar
- McCaskill JS: The Equilibrium Partition Function and Base Pair Binding Probabilities for RNA Secondary Structure. Biopolymers. 1990, 29: 1105-1119. 10.1002/bip.360290621PubMedView ArticleGoogle Scholar
- Turner DH, Mathews DH: NNDB: the nearest neighbor parameter database for predicting stability of nucleic acid secondary structure. Nucleic Acids Res. 2010, D280-2. 38 Database,Google Scholar
- Tafer H, Amman F, Eggenhofer F, Stadler PF, Hofacker IL: Fast Accessibility-Based Prediction of RNA-RNA Interactions. Bioinformatics. 2011, ,Google Scholar
- Serganov A, Yuan YR, Pikovskaya O, Polonskaia A, Malinina L, Phan AT, Hobartner C, Micura R, Breaker RR, Patel DJ: Structural basis for discriminative regulation of gene expression by adenine- and guanine-sensing mRNAs. Chem Biol. 2004, 11 (12): 1729-1741. http://www.hubmed.org/display.cgi?uids=15610857 10.1016/j.chembiol.2004.11.018PubMedView ArticleGoogle Scholar

## Copyright

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 (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.