|
Algorithm 1 Knotify_V2.0—The variation of Knotify+ Algorithm for the inclusion of Hairpin loops |
-
Require:
RNA sequence S, Tuning parameters P
-
Ensure:
Predicted structure R, Free energy E, Execution time D
-
1:
# Initialization and Inputs
-
2:
input RNA sequence
-
3:
tuning parameters
-
4:
-
5:
# Stage 1: Detect Core Stems
-
6:
Parse S using Earley Grammar
-
7:
Candidate positions for core stems in S
-
8:
-
9:
# Stage 2: Annotate Core Stems
-
10:
for each candidate c in C do
-
11:
Annotate c with core stems, considering bulges and/or internal loops
-
12:
end for
-
13:
Annotated candidates
-
14:
-
15:
# Stage 3: Apply Criteria
-
16:
Max stems in A
-
17:
Filter A by stems
-
18:
Compute MFE and sort in a ascending order
-
19:
-
20:
# Stage 4: Identify Hairpins
-
21:
for each candidate a in do
-
22:
Identify hairpins in a
-
23:
Generate variants V with/without hairpins in the loops
-
24:
end for
-
25:
-
26:
# Stage 5: Final Selection
-
27:
Reapply max stems and MFE criteria on V
-
28:
-
29:
Candidate with min MFE in V, and its energy value
-
30:
Calculate execution time
-
31:
-
32:
# Final outputs
-
33:
return
|