Nussinov algorithm

From HandWiki
Short description: Nucleic acid structure prediction algorithm
ClassNucleic acid structure prediction
Worst-case performance[math]\displaystyle{ O(n^3) }[/math]
Worst-case space complexity[math]\displaystyle{ O(n^2) }[/math]

The Nussinov algorithm is a nucleic acid structure prediction algorithm used in computational biology to predict the folding of an RNA molecule that makes use of dynamic programming principles.[1] The algorithm was developed by Ruth Nussinov in the late 1970s.

Background

RNA origami occurs when an RNA molecule "folds" and binds to itself. This folding often determines the function of the RNA molecule. RNA folds at different levels, this algorithm predicts the secondary structure of the RNA.

Algorithm

Scoring

We score a solution by counting the total number of paired bases. Thus, attempting to maximize the score that maximizes the total number of bonds between bases.

Motivation

Consider an RNA sequence [math]\displaystyle{ S }[/math] whose elements are taken from the set [math]\displaystyle{ \{A, U, C, G\} }[/math]. Let us imagine we have an optimal solution to the subproblem of folding [math]\displaystyle{ S_i }[/math] to [math]\displaystyle{ S_{j-1} }[/math], and an optimal solution for folding [math]\displaystyle{ S_u }[/math] to [math]\displaystyle{ S_v }[/math] [math]\displaystyle{ i\leq u\leq v\leq j-1 }[/math] . Now, to align [math]\displaystyle{ S_i }[/math] to [math]\displaystyle{ S_{j} }[/math], we have two options:

  1. Leave [math]\displaystyle{ S_{j} }[/math] unpaired, and keep the structure of [math]\displaystyle{ S_i }[/math] to [math]\displaystyle{ S_{j-1} }[/math]. The score for this alignment will be equal to the score of the alignment of [math]\displaystyle{ S_i }[/math] to [math]\displaystyle{ S_{j-1} }[/math], as no new base pairs were created.
  2. Pair [math]\displaystyle{ S_{j} }[/math] with [math]\displaystyle{ S_{k} }[/math], where [math]\displaystyle{ i\leq k\lt j }[/math]. The score for this alignment will be the score of the base pairing, plus the score of the best alignment of [math]\displaystyle{ S_i }[/math] to [math]\displaystyle{ S_{k-1} }[/math] and [math]\displaystyle{ S_{k+1} }[/math] to [math]\displaystyle{ S_{j-1} }[/math].

Algorithm

Consider an RNA sequence [math]\displaystyle{ S }[/math] of length [math]\displaystyle{ n }[/math] such that [math]\displaystyle{ S_i\in \{A, U, C, G\} }[/math].

Construct an [math]\displaystyle{ n\times n }[/math] matrix [math]\displaystyle{ M }[/math]. Initialize [math]\displaystyle{ M }[/math] such that

[math]\displaystyle{ M(i, i)=0 }[/math]

[math]\displaystyle{ M(i, i-1) = 0 }[/math]

for [math]\displaystyle{ 1\leq i\leq n }[/math].

[math]\displaystyle{ M(i,j) }[/math] will contain the maximum score for the subsequence [math]\displaystyle{ S_i...S_j }[/math]. Now, fill in entries of [math]\displaystyle{ M }[/math] up and to the right, so that

[math]\displaystyle{ M(i,j) = \max_{i\leq k\lt j}\begin{cases}M(i, k-1)+M(k+1, j-1)+\text{Score}(S_k,S_j) \\ M(i, j-1)\end{cases} }[/math]

where [math]\displaystyle{ \text{Score}(S_k,S_j)=\begin{cases}1,&S_k\text{ and }S_j \text{ complementary}\\ 0,&\text{otherwise.}\end{cases} }[/math]

After this step, we have a matrix [math]\displaystyle{ M }[/math] where [math]\displaystyle{ M(i,j) }[/math] represents the optimal score of the folding of [math]\displaystyle{ S_i...S_j }[/math].

To determine the structure of the folded RNA by traceback, we first create an empty list of pairs [math]\displaystyle{ P }[/math]. We initialize with [math]\displaystyle{ i=1,j=n }[/math]. Then, we follow one of three scenarios.

  1. If [math]\displaystyle{ j\leq i }[/math], the procedure stops.
  2. If [math]\displaystyle{ M(i,j)=M(i,j-1) }[/math], then set [math]\displaystyle{ i=i,j=j-1 }[/math] and continue.
  3. Otherwise, for all [math]\displaystyle{ k: i\leq k\lt j }[/math], if[math]\displaystyle{ S_k }[/math] and [math]\displaystyle{ S_j }[/math] are complementary and [math]\displaystyle{ M(i,j)=M(i,k-1)+M(k+1,j-1)+1 }[/math], append [math]\displaystyle{ (k,j) }[/math] to [math]\displaystyle{ P }[/math], then traceback both with [math]\displaystyle{ i=i,j=k-1 }[/math] and [math]\displaystyle{ i=k+1,j=j-1 }[/math].

When the traceback finishes, [math]\displaystyle{ P }[/math] contains all of the paired bases.

Limitations

The Nussinov algorithm does not account for the three-dimensional shape of RNA, nor predict RNA pseudoknots.[2] Furthermore, in its basic form, it does not account for a minimum stem loop size. However, it is still useful as a fast algorithm for basic prediction of secondary structure.

References