One has to keep in mind that base pair probabilities are not independent. Therefore, stem probabilities can never be calculated by simply multiplying the base pair probabilities. However, the average probability of participating base pairs in a stem can be used as a confidence indicator (54) . In our approach, we calculate the confidence c for a stem as the average stack probabilities. For each stem, an absolute weight is introduced in addition. The confidence c is based on the energy model for secondary structures, excluding pseudoknots. Therefore, pseudoknot stems tend to have low average probabilities especially for longer sequences, which does not necessarily correspond to their dominance in native RNA structures. We assign two additional weights for a stem based on a local energy evaluation. The simple stacking model employs the favourable base pair stacking parameters in a stem; however, it excludes the destabilizing energy contributed by the hairpin loop. The more sophisticated free energy model includes all entropy and enthalpy parameters derived by the Turner group (8) . The tool RNAeval is used to evaluate the local free energies of the stem candidates according to the two energy models introduced above, taking into account dangling ends on both sides (11) . DotKnot stores two stem weights w stack ðs i Þ (simple stacking model) and wðs i Þ (free energy model) for a stem s i . Only stems s i satisfying the following conditions are kept: w stack ðs i Þ < 0:0 kcal/mol and wðs i Þ < 4:0 kcal/mol. The resulting stems are stored in a stem dictionary D s ¼ s 1 ,s 2 , . . . , s n f g . Each stem s i has a unique key a i ,b i ð Þ, where a i is the start position and b i the end position of the stem in sequence S. For each stem s i , we store its length and the following values in the stem dictionary: cðs i Þ,w stack ðs i Þ and wðs i Þ.