ViennaRNA / ViennaRNA

The ViennaRNA Package
Other
296 stars 76 forks source link

Speeding up RNAup #203

Open MFamyfuerza opened 1 year ago

MFamyfuerza commented 1 year ago

Hi!

I am looking for the "Opening energy for the longer sequence" for multiple RNA/RNA duplexes, and the "Opening energy for the shorter sequence" is a nice to have. My Python script takes a longer RNA sequence --> copies a target and reverse compliments it as the smaller sequence --> inputs both sequences in RNAup (the terminal program) --> adds both opening energies to an array/list --> and repeats these steps for the next target/small sequence. This works fine for smaller sequences, but I have one very long sequence which also tests about 700 target sequences which would take my PC ~30 hours to run. So, I only need the opening energies when the smaller sequence binds at its specific target location on the longer sequence, and I am looking to reduce any other calculations that ViennaRNA might do that aren't relevant to this task.

Does the RNAup.c file contain any excess calculations, such as maybe looping over the long sequence multiple times to find the optimum target, which I maybe can remove or replace it with a specific location?

Or is there a paper which outlines the calculations done in this program so that I can recreate it with the ViennaRNA Python API?

Any advice is appreciated!

With kind regards, Martijn

MFamyfuerza commented 12 months ago

Never mind, I've found a solution. Initially, my code was generating a new instance of RNAup for each duplex. However, since RNAup retains certain calculations from the first duplex, it's more efficient to employ a single RNAup instance and continuously provide it with shorter sequences to assess alongside the longer one.