RNA structure prediction with ViennaRNA
The tutorials on this site on RNA secondary structure prediction with the ViennaRNA Package, in reading order: reading RNAfold output, folding with SHAPE and chemical probing data, what deep learning predictors learn, and the background papers.
This page collects the posts on this site that explain how to predict the secondary structure of an RNA with the ViennaRNA Package and how far such a prediction can be trusted, in the order in which I would read them. They are written for researchers who use structure predictions in their own work, i.e. for experimentalists and computational biologists alike. Each tutorial works through a complete example with all commands included, so that the results can be reproduced on any computer with ViennaRNA installed.
Tutorials
- RNAfold tutorial: MFE, pair probabilities and ensemble output. What RNAfold writes to the terminal and to its output files, i.e. the minimum free energy (MFE) structure, the pair probabilities and the dot plot, the centroid and MEA structures, and the suboptimal structures from RNAsubopt. The example is yeast tRNA-Phe, and the question throughout is how to tell whether the MFE structure is a robust prediction or one of many that the sequence could form.
- SHAPE and chemical probing tutorial: folding with reactivities in RNAfold. How SHAPE reactivities go into RNAfold, the input format, what the three methods in ViennaRNA (Deigan, Zarringhalam and Washietl) do with the data, and what probing data change in a prediction and what they do not. Same tRNA, so the two tutorials can be read side by side.
- RNAplfold tutorial: accessibility in long RNAs. How to compute the probability that a region is unpaired, which is what decides whether an siRNA, an antisense oligo or a probe can reach its target, how to read the
_lunpfile, and how to choose the base pair span and the window size. The example is the Zika virus genome, because the question only arises for sequences too long to fold as a whole, and the border effect at an artificial sequence end is measured on it.
Before the tutorials
- What a wrong RNA structure costs (November 2026). Written for the person who signs the timesheet rather than the one running the program: seven ways a prediction gets acted on that did not say what it was taken to say, what each costs in months and experiments, and the one thing that prevents each. The MFE structure of the first 400 nucleotides of a real viral genome has a probability of 0.015 percent in its own ensemble. The five stem-loops that probing experiments established are all in it. The gap between those two statements is the whole argument.
The package itself
- ViennaRNA 2.8.0: cross-linking data, global probabilities, modified RNA (November 2026). What the release adds, i.e. interval pairs from cross-linking experiments as probing input, equilibrium probabilities for base pairs, unpaired stretches and whole helices without a sliding window, and parameter files for pseudouridine and N1-methylpseudouridine inside the library. It also lists the fixes that change results for G-quadruplexes, modified bases and Wuchty-style
RNAsubopt. - The package's own documentation, rebuilt as a stand-alone site in November 2026, with the man pages, the API reference and tutorials for eleven of the programs.
Background
- AI for RNA structure prediction: what deep learning models learn. What neural networks trained on known structures compute, why the usual benchmarks overstate their accuracy, what a test on synthetic data revealed about their outputs, and what has changed since 2022.
- Caveats to deep learning approaches to RNA secondary structure prediction (Flamm et al., Front Bioinform 2022). The paper behind the explainer, with the synthetic data experiments.
- Predicting RNA secondary structures from sequence and probing data (Lorenz et al., Methods 2016). The methods paper for the probing data support in ViennaRNA that the SHAPE tutorial uses.
- SHAPE directed RNA folding (Lorenz et al., Bioinformatics 2016). The comparison of the three methods on a set of RNAs with known structures.
Which ViennaRNA paper to cite
For the package itself, i.e. for RNAfold, RNAsubopt, RNAplfold and the other programs, the reference is the paper that describes version 2.0:
ViennaRNA Package 2.0
Ronny Lorenz, Stephan H. Bernhart, Christian Höner zu Siederdissen, Hakim Tafer, Christoph Flamm, Peter F. Stadler, Ivo L. Hofacker
Algorithms Mol. Biol. 6:26 (2011) | doi:10.1186/1748-7188-6-26
Three later papers describe features that the package gained afterwards, and a paper that uses one of those features should cite it in addition. For folding with probing data as soft constraints, which is what the SHAPE tutorial above does, that is Predicting RNA secondary structures from sequence and probing data (Lorenz et al., Methods 103:86–98, 2016, doi:10.1016/j.ymeth.2016.04.004), which introduces the three conversion methods and their parameters. The comparison of those methods on RNAs with known structures is SHAPE directed RNA folding (Lorenz et al., Bioinformatics 32:145–47, 2016, doi:10.1093/bioinformatics/btv523). For folding during transcription with a ligand present, the reference is Efficient computation of cotranscriptional RNA-ligand interaction dynamics (Wolfinger et al., Methods 143:70–76, 2018, doi:10.1016/j.ymeth.2018.04.036).
The energy parameters are a separate citation, since a prediction depends on them as much as on the program. ViennaRNA 2.x uses the Turner 2004 parameters by default, and a paper that compares predictions across parameter sets should say which set was used.
Reference
The glossary defines the terms used in the tutorials, e.g. MFE, partition function, dot-bracket notation and soft constraints. Every entry has its own address and can be linked directly.
Questions and further tutorials
Each tutorial ends with a short form for questions that the text left open, and those questions decide what gets written next. Further tutorials are in preparation on reading dot plots and dot-bracket strings, on accessibility with RNAplfold, on consensus structures from alignments with RNAalifold, and on comparing predicted structures. A series of hands-on ViennaRNA training modules and workshops is planned for 2027.