Consecutive Window Rna Folding
1
0
Entering edit mode
11.2 years ago
MarkR • 0

I wish to use a library to give me all consecutive folded windows of an RNA. It seems like RNALfold from the ViennaRNA suite cherry picks a few structures and displays them. What I want is the whole set of windows, from index 0..end-windowSize. Is there any library that can provide this? Or a way I can make RNALfold give me this information?

rna secondary structure • 2.2k views
ADD COMMENT
0
Entering edit mode
4.9 years ago
jtimmons ▴ 30

Hello. Reviving another close-for-a-bit BioStars thread to share that I made a DNA/RNA folding library that has a function for something like this. The library, seqfold, is based on the same algo as mfold/unafold, etc, and returns comparable minimum free energies (see: examples). seqfold.dg_cache is the function that generates a cache that could be used for window querying.

Documentation

https://github.com/Lattice-Automation/seqfold

Examples

https://github.com/Lattice-Automation/seqfold/tree/master/examples

Python

The example below includes dg_cache which is the function for generating a 2D matrix for querying windows, as you asked about in your question.

from seqfold import dg, dg_cache

# just returns minimum free energy
dg("GGGAGGTCGTTACATCTGGGTAACACCGGTACTGATCCGGTGACCTCCC", temp = 37.0)  # -12.94

# `dg_cache` returns a 2D array where each (i,j) combination returns the MFE from i to j inclusive
cache: List[List[float]] = dg_cache("GGGAGGTCGTTACATCTGGGTAACACCGGTACTGATCCGGTGACCTCCC")

CLI

seqfold has a CLI but I can't think of an intuitive way to expose this 2D matrix other than to write it to a CSV externally. If anyone wants a windows/cache function exposed through a CLI let me know and I'll add something like CSV export (so this is available through the CLI in addition to the Python interface).

ADD COMMENT

Login before adding your answer.

Traffic: 1593 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6