## Abstract

### Background

RNA inverse folding is the problem of finding one or more sequences that fold into a user-specified target structure *s*
_{0}, i.e. whose minimum free energy secondary structure is identical to the target *s*
_{0}. Here we consider the ensemble of all RNA sequences that have low free energy with respect to a given target *s*
_{0}.

### Results

We introduce the program RNAdualPF, which computes the *dual partition function*
*Z*
^{∗}, defined as the sum of Boltzmann factors exp(−*E*(**a,s**
_{0})/*RT*) of all RNA nucleotide sequences **a** compatible with target structure *s*
_{0}. Using RNAdualPF, we efficiently sample RNA sequences that approximately fold into *s*
_{0}, where additionally the user can specify IUPAC sequence constraints at certain positions, and whether to include dangles (energy terms for stacked, single-stranded nucleotides). Moreover, since we also compute the *dual partition function*
*Z*
^{∗}(*k*) over all sequences having GC-content *k*, the user can require that all sampled sequences have a precise, specified GC-content.

Using *Z*
^{∗}, we compute the *dual expected energy* 〈*E*
^{∗}〉, and use it to show that natural RNAs from the Rfam 12.0 database have *higher* minimum free energy than expected, thus suggesting that functional RNAs are under evolutionary pressure to be only marginally thermodynamically stable.

We show that *C. elegans* precursor microRNA (pre-miRNA) is significantly *non-robust* with respect to mutations, by comparing the robustness of each wild type pre-miRNA sequence with 2000 [resp. 500] sequences of the same GC-content generated by RNAdualPF, which approximately [resp. exactly] fold into the wild type target structure. We confirm and strengthen earlier findings that precursor microRNAs and bacterial small noncoding RNAs display plasticity, a measure of structural diversity.

### Conclusion

We describe RNAdualPF, which rapidly computes the *dual partition function*
*Z*
^{∗} and samples sequences having low energy with respect to a target structure, allowing sequence constraints and specified GC-content. Using different inverse folding software, another group had earlier shown that pre-miRNA is mutationally robust, even controlling for compositional bias. Our opposite conclusion suggests a cautionary note that computationally based insights into molecular evolution may heavily depend on the software used.

C/C++-software for RNAdualPF is available at http://bioinformatics.bc.edu/clotelab/RNAdualPF.