<p>Ok, the answer was right <a href="https://www.tbi.univie.ac.at/RNA/RNAdistance.1.html" rel="nofollow noreferrer">here</a> and I missed it, posting it in case anyone else will do the same mistake as me in the future.</p>
<pre><code>U = unpaired
P = paired
H = hairpin
B = bulge
I = internal loop
M = multiloop
S = stem (or stack)
E = external loop
</code></pre>

CC BY-SA 4.0
2021-03-30T18:18:24.413Z
2021-03-30T18:18:24.413Z
Eli Zatlawy
<p>I'm trying to compare the output of 2 different algorithms of RNA structure prediction
(my implementation of Nussinov vs RNA-mfold algorithm) using the <a href="https://www.tbi.univie.ac.at/RNA/RNAdistance.1.html" rel="nofollow noreferrer">RNAdistance</a> algorithm that is part of <a href="https://www.tbi.univie.ac.at/RNA/" rel="nofollow noreferrer">ViennaRNA</a> package.
I'm getting a distance score of 38 between Nussinov prediction and the actual NMR structure, and a score of 14 between the m-fold algorithm and the NMR structure and I'm trying to understand whether it is a big difference.</p>
<p>In order to do that I have to look at the scoring table that is used by RNAdistance and found the following <code>score table</code> in the <a href="https://github.com/ViennaRNA/ViennaRNA/blob/ea2e71f98c3a6a98310fa5f25e9626e970f112d9/src/ViennaRNA/edit_cost.h" rel="nofollow noreferrer">source code</a>:</p>
<pre><code>RIVATE CostMatrix  UsualCost =
{

/*    Null,       U,        P,        H,        B,        I,        M,        S,        E,        R     */

   {        0,        1,        2,        2,        2,        2,        2,        1,        1, DIST_INF},   /* Null replaced */
   {        1,        0,        1, DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF},   /* U    replaced */
   {        2,        1,        0, DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF},   /* P    replaced */
   {        2, DIST_INF, DIST_INF,        0,        2,        2,        2, DIST_INF, DIST_INF, DIST_INF},   /* H    replaced */
   {        2, DIST_INF, DIST_INF,        2,        0,        1,        2, DIST_INF, DIST_INF, DIST_INF},   /* B    replaced */
   {        2, DIST_INF, DIST_INF,        2,        1,        0,        2, DIST_INF, DIST_INF, DIST_INF},   /* I    replaced */
   {        2, DIST_INF, DIST_INF,        2,        2,        2,        0, DIST_INF, DIST_INF, DIST_INF},   /* M    replaced */
   {        1, DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF,        0, DIST_INF, DIST_INF},   /* S    replaced */
   {        1, DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF,        0, DIST_INF},   /* E    replaced */
   { DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF,        0},   /* R    replaced */

};
</code></pre>
<p>I also found the <a href="https://www.tbi.univie.ac.at/RNA/ViennaRNA/doc/html/distance_measures.html" rel="nofollow noreferrer">enter link description here</a>following explanation, but <strong>I do not understand what is the meaning of the table letters: U,P,H,B,I,MS,E,R ?</strong></p>
<p>What is the meaning of the score of [H,B] = 2 for example?
If anyone can explain the table it will be a great help in my project, thank you!</p>

<phylogenetics><rna><rna-alignment><rna-structure>
Understanding ViennaRNA RNAdistance scoring table
# Understanding ViennaRNA RNAdistance scoring table

(Asked by: username_0 on 2021-03-30)

I'm trying to compare the output of 2 different algorithms of RNA structure prediction
(my implementation of Nussinov vs RNA-mfold algorithm) using the RNAdistance algorithm that is part of ViennaRNA package.
I'm getting a distance score of 38 between Nussinov prediction and the actual NMR structure, and a score of 14 between the m-fold algorithm and the NMR structure and I'm trying to understand whether it is a big difference.
In order to do that I have to look at the scoring table that is used by RNAdistance and found the following score table in the source code:
RIVATE CostMatrix  UsualCost =
{

/*    Null,       U,        P,        H,        B,        I,        M,        S,        E,        R     */

   {        0,        1,        2,        2,        2,        2,        2,        1,        1, DIST_INF},   /* Null replaced */
   {        1,        0,        1, DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF},   /* U    replaced */
   {        2,        1,        0, DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF},   /* P    replaced */
   {        2, DIST_INF, DIST_INF,        0,        2,        2,        2, DIST_INF, DIST_INF, DIST_INF},   /* H    replaced */
   {        2, DIST_INF, DIST_INF,        2,        0,        1,        2, DIST_INF, DIST_INF, DIST_INF},   /* B    replaced */
   {        2, DIST_INF, DIST_INF,        2,        1,        0,        2, DIST_INF, DIST_INF, DIST_INF},   /* I    replaced */
   {        2, DIST_INF, DIST_INF,        2,        2,        2,        0, DIST_INF, DIST_INF, DIST_INF},   /* M    replaced */
   {        1, DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF,        0, DIST_INF, DIST_INF},   /* S    replaced */
   {        1, DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF,        0, DIST_INF},   /* E    replaced */
   { DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF, DIST_INF,        0},   /* R    replaced */

};

I also found the enter link description herefollowing explanation, but I do not understand what is the meaning of the table letters: U,P,H,B,I,MS,E,R ?
What is the meaning of the score of [H,B] = 2 for example?
If anyone can explain the table it will be a great help in my project, thank you!

**Tags:** phylogenetics, rna, rna-alignment, rna-structure

---

## 1 answers

### Answer by username_0 on 2021-03-30. Score: 2

Ok, the answer was right here and I missed it, posting it in case anyone else will do the same mistake as me in the future.
U = unpaired
P = paired
H = hairpin
B = bulge
I = internal loop
M = multiloop
S = stem (or stack)
E = external loop


---

