)))))--To evaluate the significance of base pair similarity scores instead of the raw score, one has to find out what the underlying probability distribution is. Similar to the case of ungapped local sequence alignments (Karlin and Altschul, 1990) , it is assumed here that the base pair similarity scores follow an extreme value distribution. However, the main difference is that a comparison between fixed-length stem fragments is made. It is important to remember that parameters and K describe the extreme value distribution of optimal local alignment scores in the asymptotic limit of long sequences (Altschul et al., 2001) . Here, the parameters for the generalized extreme value distribution are pre-calculated using maximum Fig. 1 . For two unaligned RNA sequences Seq x and Seq y , DotKnot-PW produces structure element dictionaries derived from the probability dot plot. Similarity scores and P-values are computed to detect conserved elements likelihood fitting of a distribution to the histogram of a large sample of random base pair similarity scores. The maximum likelihood fitting was performed using the ismev package of the R statistical language for a range of stem lengths (see Supplementary Material). The P-value is defined as the probability to obtain a score greater than or equal to the observed score strictly by chance. A stem s i (x) in sequence Seq x and a stem s j (x) in sequence Seq y are a significant pair if the score sim[s i (x), s j (y)] has an estimated P-value less than . Stem pairs with a P-value larger than are not considered in the following.