RNA secondary structure

Folds a short RNA by maximising base pairs (Nussinov) and writes the dot-bracket notation. Not a free energy prediction.

Structure

The fold comes from the Nussinov and Jacobson algorithm of 1980, which returns a structure with the largest possible number of base pairs and the smallest hairpin loop you set. It uses no stacking energies, no loop penalties and no dangling ends, so it is a combinatorial answer, not a thermodynamic one: several different structures usually share the same pair count, and the one shown is whichever the traceback reaches first. Treat it as a sketch of what can pair, and use RNAfold, mfold or RNAstructure when the energy matters.

What is RNA secondary structure and dot-bracket notation?

A single strand of RNA folds back on itself and pairs with itself. The set of base pairs it forms, without saying anything about where the atoms sit in space, is its secondary structure: hairpins, stems, internal loops, bulges and multiloops. The usual way to write it down is dot-bracket notation, one character per base, the same length as the sequence.

GGGCGC AAA GCGCCC
((((((...))))))  a hairpin: 6 pairs around a 3 nt loop

A dot is an unpaired base. An opening bracket pairs with the matching closing bracket, counted the way brackets are matched in arithmetic. The notation is what RNAfold, Forna, VARNA, R2R and most other drawing and comparison programs expect, so the string this page writes can be pasted straight into them.

What the Nussinov algorithm does, and what it does not

Nussinov and Jacobson published the first dynamic programming fold in 1980. It asks one question: what is the largest number of base pairs this sequence can form, given that pairs must not cross and a hairpin loop needs at least three unpaired bases? The table is filled over every subsequence from short to long.

M(i, j) = max of
  M(i+1, j)  base i is unpaired
  M(i+1, j−1) + 1  i pairs with j, allowed when j − i − 1 ≥ 3
  M(i, k) + M(k+1, j)  for every k between i and j

What it leaves out is what actually decides an RNA fold. Stability comes from stacking between neighbouring pairs, not from the pairs themselves, and loops, bulges and multiloops cost energy. A single isolated pair is worth nothing in reality but counts as one here. That is why the answer is reported as a number of base pairs and never as a free energy: quoting a kcal/mol figure for a base-pair-maximal structure would be inventing a number. A real prediction uses the Turner nearest-neighbour parameters, as RNAfold in the ViennaRNA package, mfold and RNAstructure do.

Worked example

"Try an example" loads a 46 nt designed RNA with two stem-loops. With the smallest hairpin loop at 3 and G·U pairs allowed, the fold has 18 base pairs: 12 G·C, 5 A·U and 1 G·U, leaving 10 of the 46 bases unpaired.

AGGCUGCUGCAAGCUUCGCUUGCAGCAGCCUAAAGGUGAUUUCGCC
((((((((((((((...))))))))))))))...((((....))))

The first 14 brackets close on the last bases of a 14 bp stem around a 3 nt loop, then three unpaired bases separate it from a second hairpin of 4 bp around a 4 nt loop. Turn G·U off and the fold loses the wobble pair and drops to 17, with a less tidy stem, which shows how much a single allowed pair type can move a base-pair-maximal answer around.

Reading the result

  • The headline is the number of base pairs, the quantity the algorithm maximises.
  • The arc diagram draws one arc per pair over the sequence line: nested arcs are a stem, a wide arc over many small ones is a multiloop.
  • The base pair table under Details lists every pair with its two positions and the number of bases it encloses.
  • Copy gives the header, the sequence and the dot-bracket string on three lines, which is the format folding and drawing tools read.
  • DNA is accepted and read as RNA, so T is treated as U. Characters that are not A, C, G, U or T stay in the sequence but never pair.

To transcribe a gene first, use DNA to RNA. For the base composition of the same sequence, see GC and AT content, and for self-complementary stretches in a primer, theprimer dimer checker.

Frequently asked questions

How do I get the dot-bracket notation of an RNA sequence?

Paste the RNA, or DNA, and the structure appears under the sequence in monospace: a dot is an unpaired base, and a matching pair of round brackets is a base pair. Copy gives the sequence and the dot-bracket string one under the other, which is the format RNAfold, Forna and most drawing programs read.

Is this the minimum free energy structure?

No, and the page never calls it one. The Nussinov algorithm maximises the number of base pairs. It knows nothing about stacking energies, loop penalties, dangling ends or coaxial stacking, all of which decide the real structure, so a base-pair-maximal fold is usually not the minimum free energy fold. For an energy prediction use RNAfold, mfold or RNAstructure.

What are G·U wobble pairs?

Besides the Watson-Crick pairs A·U and G·C, RNA readily forms G·U, a wobble pair that is nearly as stable as A·U and is common in real helices, including the acceptor stem of tRNA. It is allowed by default. Turning it off gives a more conservative structure with fewer pairs.

Why is the minimum hairpin loop 3?

A chain of RNA cannot bend back on itself sharply enough to close a loop of fewer than three unpaired bases, so pairs closer than that are forbidden in every folding program. Raising the minimum to 4 or 5 removes the tightest and least plausible hairpins.

Why is the sequence length capped?

The algorithm fills a table of every subsequence, so the work grows with the cube of the length: doubling the sequence makes it eight times slower. At 500 nt the fold still finishes in a fraction of a second in a browser tab, which is where the cap sits.