I am trying to understand the Zuker Algorithm.

What is happening during initialisation? I know in Nussinov the diagonal is filled with 0s. Are the diagonals filled with infinite energy during Zuker´s initialisation?

Also, what is happening during recursion?

I know unlike Nussinov, Zuker pays attention to stacking energies and loop structures, not individual basepairs. But how? How does the algorithm calculate the energies for stacking and loop structures at position 1 if there is no info about its neighbors yet?

I understand there are 2 matrices - V and W. Is it correct that V is part of W? And is it correct that V keeps information about stack interactions and how much energy a stack of base pairs contributes - like keeping score on a multiplier?

Is there a code or example (I would prefer R), which demonstrates how the algorithm goes over a sequence? Like a demonstration. I thought of one myself, but I am not sure if its correct:

sequence <- c(1, 2, 3, 4, 5,6,7,8,9,10,11,12,13,14,15)

n <- length(sequence)

for (l in 2:n) {
   for (i in 1:(n - l + 1)) {
      j <- i + l - 1
      cat("i =", i, "j =", j, "\n")
  • 2
    $\begingroup$ Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. $\endgroup$
    – Community Bot
    Sep 2, 2023 at 0:04
  • $\begingroup$ I am using RNAFold (rna.tbi.univie.ac.at/cgi-bin/RNAWebSuite/RNAfold.cgi). I am suppose to write a shor text after my work and I am having diffuculties understanding certain espects of Zuker`s Algorithm. Nussinov is easy to understand and visualize on paper. And i was wondering how would implement Zuker in R or Python for example or how one would fill a dotplot using Zuker. $\endgroup$
    – Serij
    Sep 2, 2023 at 8:03
  • $\begingroup$ May i ask.. Whats the graph theory code in Python. I found some Python code on Github which is suppose to simulate Zuker, but if its not the correct Zuker Algorithm, then I would like to know. $\endgroup$
    – Serij
    Sep 2, 2023 at 14:30
  • $\begingroup$ Graph theory code for RNA structure is a separate question. This question is about Zuker's code - I don't know it - I thought Zuker used graph theory (which I know) but used matrix algebra instead. It's easy to get hold of the code just download the src for MFold and especially RNAfold. RNAfold is in C. $\endgroup$
    – M__
    Sep 3, 2023 at 20:30


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.