</script>

</head>

<script type="text/javascript">
  var sampleCT = "# Sample CT file (.ct)\n\
# Hybrid RNA-DNA interactions\n\
# \"128\": Bases, \"3\": Strands, \"1\": Start index of 1st strand, \"44\": Start of 2nd strand, \"66\": Start of 3rd strand.\n\
128 3   1 44 66 \n\
    1 t     0     2     0     1\n\
    2 t     1     3     0     2\n\
    3 t     2     4     0     3\n\
    4 g     3     5     0     4\n\
    5 t     4     6     0     5\n\
    6 t     5     7     0     6\n\
    7 c     6     8     0     7\n\
    8 g     7     9     0     8\n\
    9 t     8    10     0     9\n\
   10 t     9    11     0    10\n\
   11 t    10    12   102    11\n\
   12 c    11    13   101    12\n\
   13 a    12    14   100    13\n\
   14 t    13    15    99    14\n\
   15 t    14    16    98    15\n\
   16 g    15    17    97    16\n\
   17 c    16    18    96    17\n\
   18 a    17    19    95    18\n\
   19 c    18    20    94    19\n\
   20 t    19    21    93    20\n\
   21 g    20    22    92    21\n\
   22 t    21    23    91    22\n\
   23 a    22    24    90    23\n\
   24 c    23    25    89    24\n\
   25 t    24    26    88    25\n\
   26 c    25    27    87    26\n\
   27 c    26    28    86    27\n\
   28 t    27    29    85    28\n\
   29 c    28    30    84    29\n\
   30 t    29    31    83    30\n\
   31 t    30    32    82    31\n\
   32 g    31    33     0    32\n\
   33 g    32    34     0    33\n\
   34 c    33    35     0    34\n\
   35 t    34    36     0    35\n\
   36 c    35    37     0    36\n\
   37 g    36    38     0    37\n\
   38 c    37    39     0    38\n\
   39 t    38    40     0    39\n\
   40 g    39    41     0    40\n\
   41 t    40    42     0    41\n\
   42 g    41    43     0    42\n\
   43 a    42     0     0    43\n\
   44 U     0    45     0    44\n\
   45 C    44    46     0    45\n\
   46 A    45    47     0    46\n\
   47 C    46    48     0    47\n\
   48 G    47    49     0    48\n\
   49 C    48    50     0    49\n\
   50 G    49    51     0    50\n\
   51 A    50    52     0    51\n\
   52 G    51    53     0    52\n\
   53 C    52    54     0    53\n\
   54 C    53    55     0    54\n\
   55 G    54    56     0    55\n\
   56 A    55    57     0    56\n\
   57 A    56    58     0    57\n\
   58 C    57    59     0    58\n\
   59 G    58    60     0    59\n\
   60 A    59    61     0    60\n\
   61 A    60    62     0    61\n\
   62 C    61    63     0    62\n\
   63 A    62    64     0    63\n\
   64 A    63    65     0    64\n\
   65 A    64     0     0    65\n\
   66 C     0    67     0    66\n\
   67 U    66    68     0    67\n\
   68 C    67    69     0    68\n\
   69 G    68    70    81    69\n\
   70 A    69    71    80    70\n\
   71 C    70    72    79    71\n\
   72 A    71    73     0    72\n\
   73 C    72    74     0    73\n\
   74 A    73    75     0    74\n\
   75 G    74    76     0    75\n\
   76 C    75    77     0    76\n\
   77 A    76    78     0    77\n\
   78 G    77    79     0    78\n\
   79 G    78    80    71    79\n\
   80 U    79    81    70    80\n\
   81 C    80    82    69    81\n\
   82 A    81    83    31    82\n\
   83 A    82    84    30    83\n\
   84 G    83    85    29    84\n\
   85 A    84    86    28    85\n\
   86 G    85    87    27    86\n\
   87 G    86    88    26    87\n\
   88 A    87    89    25    88\n\
   89 G    88    90    24    89\n\
   90 U    89    91    23    90\n\
   91 A    90    92    22    91\n\
   92 C    91    93    21    92\n\
   93 A    92    94    20    93\n\
   94 G    93    95    19    94\n\
   95 U    94    96    18    95\n\
   96 G    95    97    17    96\n\
   97 C    96    98    16    97\n\
   98 A    97    99    15    98\n\
   99 A    98   100    14    99\n\
  100 U    99   101    13   100\n\
  101 G   100   102    12   101\n\
  102 A   101   103    11   102\n\
  103 G   102   104     0   103\n\
  104 G   103   105     0   104\n\
  105 G   104   106     0   105\n\
  106 A   105   107     0   106\n\
  107 C   106   108     0   107\n\
  108 C   107   109   123   108\n\
  109 A   108   110   122   109\n\
  110 G   109   111   121   110\n\
  111 U   110   112   120   111\n\
  112 A   111   113     0   112\n\
  113 C   112   114     0   113\n\
  114 A   113   115     0   114\n\
  115 U   114   116     0   115\n\
  116 G   115   117     0   116\n\
  117 A   116   118     0   117\n\
  118 G   117   119     0   118\n\
  119 G   118   120     0   119\n\
  120 A   119   121   111   120\n\
  121 C   120   122   110   121\n\
  122 U   121   123   109   122\n\
  123 G   122   124   108   123\n\
  124 G   123   125     0   124\n\
  125 G   124   126     0   125\n\
  126 G   125   127     0   126\n\
  127 A   126   128     0   127\n\
  128 G   127   129     0   128\n";

var sampleBPSEQ = "# Sample BPSEQ file (.bpseq)\n\
# 105: Bases, 1: Strand, 1: Start index of 1st strand\n\
105 1 1\n\
1 C 0\n\
2 A 0\n\
3 G 103\n\
4 C 102\n\
5 A 101\n\
6 C 100\n\
7 G 99\n\
8 A 0\n\
9 C 0\n\
10 A 0\n\
11 C 95\n\
12 U 94\n\
13 A 93\n\
14 G 92\n\
15 C 91\n\
16 A 0\n\
17 G 0\n\
18 U 0\n\
19 C 49\n\
20 A 48\n\
21 G 47\n\
22 U 46\n\
23 G 45\n\
24 U 0\n\
25 C 0\n\
26 A 0\n\
27 G 41\n\
28 A 40\n\
29 C 39\n\
30 U 38\n\
31 G 37\n\
32 C 0\n\
33 A 0\n\
34 I 0\n\
35 A 0\n\
36 C 0\n\
37 A 31\n\
38 G 30\n\
39 C 29\n\
40 A 28\n\
41 C 27\n\
42 G 0\n\
43 A 0\n\
44 C 0\n\
45 A 23\n\
46 C 22\n\
47 U 21\n\
48 A 20\n\
49 G 19\n\
50 C 0\n\
51 A 0\n\
52 G 0\n\
53 U 0\n\
54 C 0\n\
55 A 85\n\
56 G 84\n\
57 U 83\n\
58 G 82\n\
59 U 81\n\
60 C 0\n\
61 A 0\n\
62 G 0\n\
63 A 77\n\
64 C 76\n\
65 U 75\n\
66 G 74\n\
67 C 73\n\
68 A 0\n\
69 I 0\n\
70 A 0\n\
71 C 0\n\
72 A 0\n\
73 G 67\n\
74 C 66\n\
75 A 65\n\
76 C 64\n\
77 G 63\n\
78 A 0\n\
79 C 0\n\
80 A 0\n\
81 C 59\n\
82 U 58\n\
83 A 57\n\
84 G 56\n\
85 C 55\n\
86 A 0\n\
87 G 0\n\
88 U 0\n\
89 C 0\n\
90 A 0\n\
91 G 15\n\
92 U 14\n\
93 G 13\n\
94 U 12\n\
95 C 11\n\
96 A 0\n\
97 G 0\n\
98 A 0\n\
99 C 7\n\
100 U 6\n\
101 G 5\n\
102 C 4\n\
103 A 3\n\
104 I 0\n\
105 A 0\n";

var sampleDBN = "# Sample Dot-Bracket Notation file (.dbn)\n\
# S. Typhimurium\n\
GUAUUCAGCGCGGCGCGAAUGCUGGCCGGGAUUACAUCUUUCCCGAUGCGUAUCAUCCCGGCUAUGAAUUUGUCGCGCAACGCUGAAGGCA\n\
...(((((((..((((((....((((((((((..((((......))))......))))))))))........))))))..)))))))....";

var sampleRS1 = "# Sample Save file (.rs)\n\
# 5EAQ Hammerhead Ribozyme\n\
sequences=GGGUACUUAAGCCCACUGAUGAGUCGCUGGGAUGCGACGAAACGCCCA; GGGCGUCUGGGCAGUACCCA\n\
starts=0,48\n\
positions=97,367,0; 88,328,0; 100,286,0; 133,257,0; 173,252,0; 213,268,0; 240,292,0; 254,253,0; 286,234,0; 326,241,0; 344,274,0; 392,273,0; 440,273,0; 488,273,0; 536,273,0; 569,259,0; 583,226,0; 620,190,0; 671,209,0; 703,239,0; 719,282,0; 756,269,0; 798,245,0; 840,222,0; 882,198,0; 924,175,0; 966,151,0; 994,118,0; 1008,74,0; 1051,58,0; 1075,100,0; 1072,141,0; 1041,177,0; 999,210,0; 957,234,0; 915,257,0; 873,281,0; 831,304,0; 789,328,0; 721,348,0; 656,395,0; 655,433,0; 655,481,0; 655,530,0; 654,578,0; 654,626,0; 654,674,0; 677,715,0; 587,673,0; 587,625,0; 587,577,0; 587,529,0; 587,481,0; 587,433,0; 579,368,0; 537,341,0; 488,341,0; 440,341,0; 392,341,0; 344,342,0; 305,348,0; 302,383,0; 281,414,0; 252,434,0; 214,455,0; 168,454,0; 137,435,0; 113,400,0\n\
radius=13.413793063369292\n\
backbone_distance=47.862069738836134\n\
basepair_distance=67.65517134450631\n\
color_scheme=1\n\
outline=true\n\
movement=false\n\
labels=true\n\
rigid_helices=true\n\
rigid_loops=true\n\
rigid_hairpins=true\n\
relaxed_ids=28\n\
display_order=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67\n\
pair_table=-1,-1,-1,-1,-1,-1,60,-1,-1,28,59,58,57,56,55,-1,18,40,16,-1,-1,38,37,36,35,34,33,31,9,-1,-1,27,-1,26,25,24,23,22,21,54,17,53,52,51,50,49,48,-1,46,45,44,43,42,41,39,14,13,12,11,10,6,-1,-1,-1,-1,-1,-1,-1\n\
non_canonicals=40 54 cHH, 39 54 tHW, 21 38 tHS, 17 54 tWS, 27 31 tWH, 9 28 tWS, 16 18 tSH, 6 60 tWH, 17 40 cSW\n\
base_colors=0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0";

var sampleRS1Bonds = "6 60 tWH, 9 28 tWS, 16 18 tSH, 17 40 cSW, 17 54 tWS, 21 38 tHS, 27 31 tWH, 39 54 tHW, 40 54 cSW";

var sampleRS2 = "# Sample Save file (.rs)\n\
# rRNA, E. coli with SHAPE coloring input\n\
sequences=GGAAAGCAAUUCGAGUAGAAUUGGAAAGGGAAAGAAAUGCCUGGCGGCCGUAGCGCGGUGGUCCCACCUGACCCCAUGCCGAACUCAGAAGUGAAACGCCGUAGCGCCGAUGGUAGUGUGGGGUCUCCCCAUGCGAGAGUAGGGAACUGCCAGGCAUAAAACAGUUAAGGAGUACUUAACAAAC\n\
starts=0\n\
positions=43,272,0; 69,287,0; 98,292,0; 129,289,0; 159,286,0; 186,280,0; 201,257,0; 182,245,0; 163,232,0; 144,220,0; 125,207,0; 106,195,0; 76,195,0; 57,172,0; 61,143,0; 86,127,0; 115,136,0; 127,163,0; 146,176,0; 165,188,0; 184,201,0; 203,213,0; 222,225,0; 234,201,0; 236,163,0; 250,128,0; 275,100,0; 308,81,0; 345,74,0; 383,79,0; 416,97,0; 442,125,0; 457,160,0; 460,197,0; 451,234,0; 430,266,0; 399,288,0; 363,300,0; 363,328,0; 385,328,0; 408,328,0; 431,328,0; 454,329,0; 476,329,0; 499,329,0; 522,329,0; 545,329,0; 554,311,0; 568,297,0; 586,289,0; 605,286,0; 625,289,0; 645,300,0; 666,291,0; 701,276,0; 722,267,0; 743,258,0; 764,249,0; 785,240,0; 806,231,0; 812,208,0; 827,190,0; 848,183,0; 870,185,0; 889,196,0; 911,187,0; 931,179,0; 966,164,0; 986,155,0; 1007,145,0; 1029,136,0; 1031,108,0; 1043,85,0; 1063,67,0; 1090,59,0; 1117,63,0; 1140,76,0; 1157,100,0; 1162,125,0; 1157,153,0; 1142,175,0; 1119,190,0; 1092,194,0; 1065,187,0; 1043,171,0; 1023,180,0; 1002,189,0; 982,199,0; 984,226,0; 961,236,0; 946,214,0; 924,222,0; 903,231,0; 896,258,0; 875,276,0; 846,279,0; 821,266,0; 800,275,0; 779,284,0; 758,293,0; 737,301,0; 716,311,0; 705,334,0; 680,326,0; 660,335,0; 666,359,0; 654,386,0; 667,404,0; 693,399,0; 719,403,0; 742,414,0; 760,433,0; 772,457,0; 774,482,0; 769,507,0; 755,529,0; 768,548,0; 782,566,0; 795,585,0; 808,604,0; 821,622,0; 834,641,0; 847,659,0; 872,681,0; 861,711,0; 828,712,0; 816,681,0; 803,663,0; 790,644,0; 777,625,0; 764,607,0; 751,588,0; 737,570,0; 724,551,0; 699,557,0; 674,554,0; 650,542,0; 632,524,0; 620,501,0; 617,475,0; 623,449,0; 636,426,0; 623,408,0; 599,410,0; 575,404,0; 556,388,0; 545,367,0; 522,367,0; 499,367,0; 476,367,0; 454,367,0; 431,366,0; 408,366,0; 385,366,0; 362,366,0; 363,394,0; 388,422,0; 393,460,0; 376,494,0; 343,512,0; 305,509,0; 276,485,0; 265,449,0; 251,424,0; 232,437,0; 213,449,0; 194,462,0; 175,475,0; 156,487,0; 145,515,0; 116,524,0; 91,508,0; 86,479,0; 105,456,0; 135,456,0; 154,443,0; 173,430,0; 192,418,0; 211,405,0; 230,393,0; 215,367,0; 184,358,0; 152,359,0; 122,369,0\n\
current_basepairs=6,22 7,21 8,20 9,19 10,18 11,17 38,154 39,153 40,152 41,151 42,150 43,149 44,148 45,147 46,146 52,104 53,103 54,101 55,100 56,99 57,98 58,97 59,96 64,92 65,91 66,90 67,87 68,86 69,85 70,84 106,142 107,141 115,133 116,132 117,131 118,130 119,129 120,128 121,127 122,126 163,179 164,178 165,177 166,176 167,175 168,174\n\
radius=9.046186591239044\n\
backbone_distance=28.359795228755367\n\
basepair_distance=37.925648911326604\n\
color_scheme=9\n\
outline=true\n\
movement=false\n\
labels=true\n\
rigid_helices=true\n\
rigid_loops=true\n\
rigid_hairpins=true\n\
relaxed_ids=\n\
display_order=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183\n\
pair_table=-1,-1,-1,-1,-1,-1,22,21,20,19,18,17,-1,-1,-1,-1,-1,11,10,9,8,7,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,154,153,152,151,150,149,148,147,146,-1,-1,-1,-1,-1,104,103,101,100,99,98,97,96,-1,-1,-1,-1,92,91,90,87,86,85,84,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,70,69,68,67,-1,-1,66,65,64,-1,-1,-1,59,58,57,56,55,54,-1,53,52,-1,142,141,-1,-1,-1,-1,-1,-1,-1,133,132,131,130,129,128,127,126,-1,-1,-1,122,121,120,119,118,117,116,115,-1,-1,-1,-1,-1,-1,-1,107,106,-1,-1,-1,46,45,44,43,42,41,40,39,38,-1,-1,-1,-1,-1,-1,-1,-1,179,178,177,176,175,174,-1,-1,-1,-1,-1,168,167,166,165,164,163,-1,-1,-1,-1\n\
non_canonicals=\n\
base_colors=0.0,0.0,0.046075422,0.31854132,0.3860532,0.053133782,0.044637606,0.048885696,0.040977713,0.041500557,0.044049412,0.053133782,0.07881838,0.4499706,0.10894713,0.117051184,1.0,0.20430037,0.171296,0.14979413,0.073589966,0.072740346,0.091497295,0.090255536,0.60322857,0.7879224,0.7685772,0.1769819,0.080060124,0.075746685,0.7657669,0.92137766,0.7257042,0.16626364,0.5857134,0.66067576,0.07803412,0.06796941,0.10587543,0.084504284,0.064440235,0.065093786,0.06136854,0.059081107,0.060257502,0.06313313,0.056336187,0.080060124,0.070256844,0.060845695,0.08077904,0.12404418,0.08718385,0.081890084,0.077641994,0.06561663,0.067838706,0.060192145,0.056662966,0.0583622,0.06306777,0.19743808,0.16894321,0.06751193,0.10587543,0.16482583,0.08901379,0.081955425,0.0646363,0.06280635,0.13476244,0.20475785,0.11914254,0.073655315,0.08731455,0.22475655,0.07901444,0.06496307,0.19645774,0.09221619,0.053133782,0.7252467,0.48918372,0.28690934,0.08999412,0.080190845,0.120253585,0.100058824,0.65257174,0.5394419,0.09718319,0.06587805,0.06411346,0.5119927,0.16221163,0.40461412,0.19070649,0.060976412,0.100647025,0.081563294,0.06104176,0.07738057,0.52316844,0.08293576,0.069603294,0.07803412,0.065943405,0.062283512,0.081890084,0.78021044,0.3271028,0.07077969,0.06476701,0.07966799,0.8289654,0.086791724,0.057708647,0.052676298,0.05058493,0.07156395,0.055813346,0.07626952,0.080452256,0.061303183,0.08548461,0.055290505,0.0878374,0.06600876,0.06104176,0.06587805,0.11737795,0.084504284,0.06365597,0.067642644,0.070387565,0.6774067,0.15325795,0.34638262,0.08711849,0.120318934,0.9753611,0.12254101,0.081694014,0.08613816,0.72086793,0.7268152,0.09881707,0.07626952,0.059800014,0.055421215,0.050454218,0.10143128,0.06038821,0.112607025,0.08326253,0.12829226,0.109208554,0.5706163,0.7694268,0.70328736,0.702111,0.7417162,0.69642514,0.1386184,0.07973335,0.0709104,0.16417228,0.09156264,0.06261029,0.19266714,0.57610613,0.100647025,0.09881707,0.8298804,0.09992811,0.061172474,0.073001765,0.18920332,0.15783282,0.10587543,0.76910007,0.3823933,0.732109,0.5393765\n";

var sampleRS2Color = "-0.0813 -0.0813 -0.0108 0.4061 0.5094 0.0000 -0.0130 -0.0065 -0.0186 -0.0178 -0.0139 0.0000 0.0393 0.6072 0.0854 0.0978 1.4488 0.2313 0.1808 0.1479 0.0313 0.0300 0.0587 0.0568 0.8417 1.1243 1.0947 0.1895 0.0412 0.0346 1.0904 1.3285 1.0291 0.1731 0.8149 0.9296 0.0381 0.0227 0.0807 0.0480 0.0173 0.0183 0.0126 0.0091 0.0109 0.0153 0.0049 0.0412 0.0262 0.0118 0.0423 0.1085 0.0521 0.0440 0.0375 0.0191 0.0225 0.0108 0.0054 0.0080 0.0152 0.2208 0.1772 0.0220 0.0807 0.1709 0.0549 0.0441 0.0176 0.0148 0.1249 0.2320 0.1010 0.0314 0.0523 0.2626 0.0396 0.0181 0.2193 0.0598 0.0000 1.0284 0.6672 0.3577 0.0564 0.0414 0.1027 0.0718 0.9172 0.7441 0.0674 0.0195 0.0168 0.7021 0.1669 0.5378 0.2105 0.0120 0.0727 0.0435 0.0121 0.0371 0.7192 0.0456 0.0252 0.0381 0.0196 0.0140 0.0440 1.1125 0.4192 0.0270 0.0178 0.0406 1.1871 0.0515 0.0070 -0.0007 -0.0039 0.0282 0.0041 0.0354 0.0418 0.0125 0.0495 0.0033 0.0531 0.0197 0.0121 0.0195 0.0983 0.0480 0.0161 0.0222 0.0264 0.9552 0.1532 0.4487 0.0520 0.1028 1.4111 0.1062 0.0437 0.0505 1.0217 1.0308 0.0699 0.0354 0.0102 0.0035 -0.0041 0.0739 0.0111 0.0910 0.0461 0.1150 0.0858 0.7918 1.0960 0.9948 0.9930 1.0536 0.9843 0.1308 0.0407 0.0272 0.1699 0.0588 0.0145 0.2135 0.8002 0.0727 0.0699 1.1885 0.0716 0.0123 0.0304 0.2082 0.1602 0.0807 1.0955 0.5038 1.0389 0.7440";

var sampleNTS = '# Sample Table file generated by R from JSON\n\
# 4NLF Sarcin-Ricin Loop\n\
NTS:\n\
"index" "index_chain" "chain_name" "nt_resnum" "nt_name" "nt_code" "nt_id"\n\
"1" 1 1 "A" 2647 "U" "U" "A.U2647"\n\
"2" 2 2 "A" 2648 "G" "G" "A.G2648"\n\
"3" 3 3 "A" 2649 "C" "C" "A.C2649"\n\
"4" 4 4 "A" 2650 "U" "U" "A.U2650"\n\
"5" 5 5 "A" 2651 "C" "C" "A.C2651"\n\
"6" 6 6 "A" 2652 "C" "C" "A.C2652"\n\
"7" 7 7 "A" 2653 "U" "U" "A.U2653"\n\
"8" 8 8 "A" 2654 "A" "A" "A.A2654"\n\
"9" 9 9 "A" 2655 "G" "G" "A.G2655"\n\
"10" 10 10 "A" 2656 "U" "U" "A.U2656"\n\
"11" 11 11 "A" 2657 "A" "A" "A.A2657"\n\
"12" 12 12 "A" 2658 "C" "C" "A.C2658"\n\
"13" 13 13 "A" 2659 "G" "G" "A.G2659"\n\
"14" 14 14 "A" 2660 "A" "A" "A.A2660"\n\
"15" 15 15 "A" 2661 "G" "G" "A.G2661"\n\
"16" 16 16 "A" 2662 "A" "A" "A.A2662"\n\
"17" 17 17 "A" 2663 "G" "G" "A.G2663"\n\
"18" 18 18 "A" 2664 "G" "G" "A.G2664"\n\
"19" 19 19 "A" 2665 "A" "A" "A.A2665"\n\
"20" 20 20 "A" 2666 "C" "C" "A.C2666"\n\
"21" 21 21 "A" 2667 "6FC" "C" "A.6FC2667"\n\
"22" 22 22 "A" 2668 "G" "G" "A.G2668"\n\
"23" 23 23 "A" 2669 "G" "G" "A.G2669"\n\
"24" 24 24 "A" 2670 "A" "A" "A.A2670"\n\
"25" 25 25 "A" 2671 "G" "G" "A.G2671"\n\
"26" 26 26 "A" 2672 "U" "U" "A.U2672"\n\
"27" 27 27 "A" 2673 "G" "G" "A.G2673"\n\
\n\
PAIRS:\n\
"index" "nt1" "nt2" "bp" "name" "Saenger" "LW" "DSSR"\n\
"1" 1 "A.G2648" "A.U2672" "G-U" "Wobble" "28-XXVIII" "cWW" "cW-W"\n\
"2" 2 "A.C2649" "A.G2671" "C-G" "WC" "19-XIX" "cWW" "cW-W"\n\
"3" 3 "A.U2650" "A.A2670" "U-A" "WC" "20-XX" "cWW" "cW-W"\n\
"4" 4 "A.C2651" "A.G2669" "C-G" "WC" "19-XIX" "cWW" "cW-W"\n\
"5" 5 "A.C2652" "A.G2668" "C-G" "WC" "19-XIX" "cWW" "cW-W"\n\
"6" 6 "A.U2653" "A.6FC2667" "U-c" "--" "n/a" "cWW" "cW-W"\n\
"7" 7 "A.A2654" "A.C2666" "A+C" "--" "n/a" "tHH" "tM+M"\n\
"8" 8 "A.G2655" "A.U2656" "G+U" "Platform" "n/a" "cSH" "cm+M"\n\
"9" 9 "A.U2656" "A.A2665" "U-A" "rHoogsteen" "24-XXIV" "tWH" "tW-M"\n\
"10" 10 "A.A2657" "A.G2664" "A-G" "Sheared" "11-XI" "tHS" "tM-m"\n\
"11" 11 "A.C2658" "A.G2663" "C-G" "WC" "19-XIX" "cWW" "cW-W"\n\
"12" 12 "A.G2659" "A.A2662" "G-A" "Sheared" "11-XI" "tSH" "tm-M"\n';

var sampleNTSBonds = "7 19 tHH, 8 9 cSH, 9 18 tWH, 10 17 tHS, 12 15 tSH"

var sampleCubeEdit = '# 6-Stranded RNA cube. The shown graphical layout is generated with manual editing after starting with Circule Layout followed by Simulation Mode (Afonin et al., Nature Nanotechn. 2010)\n\
sequences=GGCAACUUUGAUCCCUCGGUUUAGCGCCGGCCUUUUCUCCCACACUUUCACG; GGGAAAUUUCGUGGUAGGUUUUGUUGCCCGUGUUUCUACGAUUACUUUGGUC; GGACAUUUUCGAGACAGCAUUUUUUCCCGACCUUUGCGGAUUGUAUUUUAGG; GGCGCUUUUGACCUUCUGCUUUAUGUCCCCUAUUUCUUAAUGACUUUUGGCC; GGGAGAUUUAGUCAUUAAGUUUUACAAUCCGCUUUGUAAUCGUAGUUUGUGU; GGGAUCUUUACCUACCACGUUUUGCUGUCUCGUUUGCAGAAGGUCUUUCCGA\n\
starts=0,52,104,156,208,260\n\
positions=512,274,0; 498,261,0; 484,248,0; 471,235,0; 457,222,0; 443,209,0; 430,193,0; 416,182,0; 404,152,0; 421,142,0; 437,142,0; 453,142,0; 468,142,0; 484,142,0; 500,142,0; 515,143,0; 531,144,0; 547,143,0; 562,143,0; 592,143,0; 617,145,0; 644,149,0; 668,155,0; 680,166,0; 692,178,0; 704,189,0; 716,200,0; 728,211,0; 740,223,0; 753,236,0; 766,248,0; 780,260,0; 794,274,0; 804,288,0; 805,307,0; 781,325,0; 765,325,0; 748,325,0; 732,325,0; 715,325,0; 699,324,0; 681,324,0; 664,324,0; 648,324,0; 631,324,0; 617,325,0; 594,325,0; 567,322,0; 554,312,0; 544,303,0; 534,294,0; 524,284,0; 460,493,0; 444,479,0; 428,465,0; 413,452,0; 397,439,0; 382,425,0; 367,413,0; 354,399,0; 338,383,0; 336,363,0; 336,349,0; 336,334,0; 336,320,0; 335,305,0; 335,291,0; 335,276,0; 335,261,0; 335,247,0; 335,232,0; 343,209,0; 379,210,0; 404,216,0; 425,228,0; 439,241,0; 453,254,0; 466,267,0; 480,280,0; 493,293,0; 506,304,0; 516,314,0; 526,323,0; 536,332,0; 550,343,0; 561,356,0; 566,371,0; 577,394,0; 577,410,0; 577,425,0; 577,440,0; 577,456,0; 577,471,0; 577,487,0; 577,502,0; 578,517,0; 578,533,0; 573,548,0; 562,559,0; 543,562,0; 527,551,0; 511,537,0; 493,521,0; 477,507,0; 706,501,0; 692,488,0; 678,476,0; 664,463,0; 651,450,0; 637,437,0; 624,425,0; 591,417,0; 572,415,0; 556,415,0; 540,415,0; 524,415,0; 508,415,0; 492,415,0; 476,415,0; 461,415,0; 445,415,0; 429,415,0; 413,415,0; 392,417,0; 366,428,0; 366,445,0; 382,457,0; 398,471,0; 412,484,0; 428,497,0; 444,511,0; 461,525,0; 478,540,0; 494,554,0; 510,568,0; 527,583,0; 550,597,0; 579,607,0; 607,611,0; 629,610,0; 645,610,0; 662,610,0; 678,610,0; 695,610,0; 711,610,0; 727,610,0; 744,610,0; 760,610,0; 777,610,0; 796,600,0; 784,574,0; 773,563,0; 762,552,0; 748,540,0; 734,527,0; 720,514,0; 727,244,0; 715,233,0; 703,222,0; 692,211,0; 680,200,0; 668,189,0; 652,182,0; 634,187,0; 615,196,0; 609,213,0; 609,229,0; 609,244,0; 609,260,0; 609,276,0; 608,291,0; 608,307,0; 608,323,0; 608,338,0; 608,354,0; 619,380,0; 630,394,0; 642,407,0; 655,418,0; 669,430,0; 682,443,0; 696,456,0; 710,469,0; 724,482,0; 738,494,0; 752,507,0; 766,520,0; 780,533,0; 791,544,0; 808,550,0; 819,537,0; 820,521,0; 820,505,0; 820,488,0; 820,472,0; 820,456,0; 820,439,0; 820,423,0; 820,407,0; 820,390,0; 820,374,0; 809,340,0; 801,323,0; 789,306,0; 779,293,0; 766,281,0; 753,268,0; 740,256,0; 717,353,0; 733,353,0; 750,353,0; 766,353,0; 783,353,0; 799,353,0; 816,354,0; 833,363,0; 841,377,0; 842,392,0; 842,408,0; 842,425,0; 842,441,0; 842,457,0; 842,474,0; 842,490,0; 842,506,0; 842,523,0; 842,539,0; 841,558,0; 830,571,0; 814,581,0; 795,584,0; 778,584,0; 762,584,0; 746,584,0; 729,584,0; 713,584,0; 696,584,0; 680,584,0; 663,584,0; 647,584,0; 628,583,0; 612,569,0; 604,551,0; 604,533,0; 604,517,0; 604,502,0; 603,486,0; 603,471,0; 603,456,0; 603,440,0; 603,425,0; 603,409,0; 603,394,0; 603,378,0; 615,364,0; 632,353,0; 649,353,0; 666,353,0; 682,353,0; 699,353,0; 482,169,0; 466,169,0; 450,168,0; 434,168,0; 419,168,0; 403,168,0; 383,172,0; 370,182,0; 358,197,0; 358,215,0; 358,230,0; 358,244,0; 358,259,0; 358,273,0; 358,288,0; 359,303,0; 359,317,0; 359,332,0; 359,346,0; 358,364,0; 365,374,0; 380,383,0; 395,388,0; 411,388,0; 427,388,0; 443,388,0; 459,388,0; 475,389,0; 490,389,0; 506,389,0; 522,389,0; 538,389,0; 556,389,0; 574,384,0; 580,371,0; 581,354,0; 581,338,0; 582,322,0; 582,307,0; 582,291,0; 582,275,0; 582,260,0; 582,244,0; 583,228,0; 583,213,0; 582,197,0; 574,180,0; 561,172,0; 545,168,0; 530,168,0; 514,169,0; 498,169,0\n\
radius=6.000000074505811\n\
backbone_distance=8.896551725165601\n\
basepair_distance=15.931034741730532\n\
color_scheme=1\n\
outline=true\n\
movement=false\n\
labels=true\n\
rigid_helices=true\n\
rigid_loops=false\n\
rigid_hairpins=false\n\
relaxed_ids=\n\
display_order=123,124,111,165,166,167,168,169,170,171,172,173,174,295,296,297,298,299,300,301,302,303,304,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,45,46,47,52,53,54,55,56,57,61,62,63,64,65,66,67,68,69,70,72,73,100,101,102,103,104,105,106,107,108,109,110,112,113,114,115,116,117,118,119,120,121,122,125,126,127,128,129,130,131,132,133,134,135,136,137,138,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,201,202,203,204,205,206,207,253,254,255,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,305,306,307,308,309,310,311,87,88,89,90,91,92,93,94,95,96,243,244,245,246,247,248,249,250,251,252,35,36,37,38,39,40,41,42,43,44,256,257,258,259,191,192,193,194,195,196,197,198,199,200,214,215,216,208,209,210,211,212,213,217,218,219,220,221,222,223,224,225,226,227,228,229,139,140,141,142,143,144,145,146,147,148,230,231,232,233,234,235,236,237,238,239,240,241,242,84,85,86,97,98,99,0,1,2,3,4,5,48,49,50,51,74,75,76,77,78,79,80,81,82,83,58,59,60,71,6,7,8\n\
pair_table=79,78,77,76,75,74,-1,-1,-1,265,264,263,262,261,260,311,310,309,308,-1,-1,-1,161,160,159,158,157,156,207,206,205,204,-1,-1,-1,213,212,211,210,209,208,259,258,257,256,-1,-1,-1,83,82,81,80,131,130,129,128,127,126,-1,-1,-1,278,277,276,275,274,273,272,271,270,269,-1,-1,-1,5,4,3,2,1,0,51,50,49,48,-1,-1,-1,252,251,250,249,248,247,246,245,244,243,-1,-1,-1,135,134,133,132,183,182,181,180,179,178,-1,-1,-1,291,290,289,288,287,286,285,284,283,282,-1,-1,-1,57,56,55,54,53,52,103,102,101,100,-1,-1,-1,239,238,237,236,235,234,233,232,231,230,-1,-1,-1,187,186,185,184,27,26,25,24,23,22,-1,-1,-1,304,303,302,301,300,299,298,297,296,295,-1,-1,-1,109,108,107,106,105,104,155,154,153,152,-1,-1,-1,226,225,224,223,222,221,220,219,218,217,-1,-1,-1,31,30,29,28,40,39,38,37,36,35,-1,-1,-1,200,199,198,197,196,195,194,193,192,191,-1,-1,-1,148,147,146,145,144,143,142,141,140,139,-1,-1,-1,96,95,94,93,92,91,90,89,88,87,-1,-1,-1,44,43,42,41,14,13,12,11,10,9,-1,-1,-1,70,69,68,67,66,65,64,63,62,61,-1,-1,-1,122,121,120,119,118,117,116,115,114,113,-1,-1,-1,174,173,172,171,170,169,168,167,166,165,-1,-1,-1,18,17,16,15\n\
non_canonical\n\
base_colors=0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0\n';

var sampleCubeRaw = '# 6-Stranded RNA cube. The shown graphical layout is generated without editing starting with Circule Layout followed by Simulation Mode (Afonin et al., Nature Nanotechn. 2010)\n\
sequences=GGCAACUUUGAUCCCUCGGUUUAGCGCCGGCCUUUUCUCCCACACUUUCACG; GGGAAAUUUCGUGGUAGGUUUUGUUGCCCGUGUUUCUACGAUUACUUUGGUC; GGACAUUUUCGAGACAGCAUUUUUUCCCGACCUUUGCGGAUUGUAUUUUAGG; GGCGCUUUUGACCUUCUGCUUUAUGUCCCCUAUUUCUUAAUGACUUUUGGCC; GGGAGAUUUAGUCAUUAAGUUUUACAAUCCGCUUUGUAAUCGUAGUUUGUGU; GGGAUCUUUACCUACCACGUUUUGCUGUCUCGUUUGCAGAAGGUCUUUCCGA\n\
starts=0,52,104,156,208,260\n\
positions=539,262,0; 524,252,0; 509,242,0; 494,232,0; 479,222,0; 464,212,0; 456,195,0; 446,179,0; 438,164,0; 452,154,0; 470,148,0; 488,143,0; 506,138,0; 524,133,0; 542,128,0; 563,124,0; 582,124,0; 601,124,0; 620,123,0; 640,126,0; 660,131,0; 680,138,0; 698,148,0; 714,158,0; 730,169,0; 745,179,0; 761,190,0; 777,200,0; 793,213,0; 807,226,0; 821,238,0; 835,251,0; 853,251,0; 868,261,0; 866,278,0; 852,290,0; 834,292,0; 815,295,0; 797,298,0; 779,300,0; 760,303,0; 740,305,0; 721,305,0; 702,306,0; 684,306,0; 663,303,0; 642,302,0; 621,302,0; 601,298,0; 585,289,0; 569,280,0; 553,271,0; 508,538,0; 493,526,0; 478,513,0; 464,501,0; 449,489,0; 434,477,0; 421,461,0; 408,443,0; 398,425,0; 392,405,0; 392,387,0; 391,368,0; 391,349,0; 390,331,0; 390,312,0; 389,293,0; 389,275,0; 388,256,0; 388,237,0; 398,224,0; 416,227,0; 433,230,0; 451,231,0; 466,241,0; 481,251,0; 496,261,0; 511,271,0; 526,281,0; 542,291,0; 558,300,0; 574,309,0; 590,318,0; 587,336,0; 590,353,0; 600,368,0; 614,381,0; 614,399,0; 614,416,0; 615,434,0; 615,451,0; 615,469,0; 616,486,0; 616,504,0; 617,521,0; 617,539,0; 608,553,0; 601,570,0; 589,581,0; 572,578,0; 556,568,0; 539,559,0; 523,549,0; 737,498,0; 723,488,0; 709,477,0; 694,467,0; 680,456,0; 666,446,0; 647,445,0; 627,444,0; 608,443,0; 590,439,0; 572,439,0; 555,439,0; 537,439,0; 520,439,0; 503,439,0; 485,440,0; 468,440,0; 450,440,0; 433,440,0; 418,451,0; 407,465,0; 406,483,0; 419,494,0; 434,507,0; 449,519,0; 464,531,0; 479,543,0; 493,556,0; 511,568,0; 528,578,0; 544,588,0; 561,598,0; 580,606,0; 601,613,0; 621,617,0; 642,618,0; 661,616,0; 681,613,0; 700,611,0; 719,608,0; 738,606,0; 757,604,0; 776,601,0; 795,599,0; 814,596,0; 825,583,0; 818,566,0; 805,554,0; 792,542,0; 778,531,0; 765,519,0; 751,508,0; 764,219,0; 748,209,0; 733,198,0; 717,188,0; 701,177,0; 685,167,0; 669,164,0; 655,174,0; 649,190,0; 640,205,0; 642,223,0; 643,240,0; 645,257,0; 646,275,0; 648,292,0; 649,310,0; 651,327,0; 652,344,0; 654,362,0; 667,376,0; 676,392,0; 680,409,0; 680,427,0; 694,437,0; 708,448,0; 723,458,0; 737,469,0; 751,479,0; 766,490,0; 779,502,0; 793,513,0; 806,524,0; 822,531,0; 836,541,0; 850,533,0; 845,517,0; 846,498,0; 846,479,0; 846,461,0; 847,442,0; 847,423,0; 848,404,0; 848,385,0; 849,366,0; 849,348,0; 843,327,0; 836,306,0; 828,287,0; 820,268,0; 806,256,0; 792,243,0; 778,230,0; 764,326,0; 782,323,0; 800,321,0; 819,318,0; 837,315,0; 856,312,0; 874,315,0; 889,323,0; 888,340,0; 872,348,0; 872,367,0; 871,386,0; 871,405,0; 870,423,0; 870,442,0; 870,461,0; 869,480,0; 869,499,0; 868,518,0; 861,537,0; 848,553,0; 830,565,0; 811,574,0; 792,576,0; 773,579,0; 754,581,0; 735,583,0; 716,586,0; 697,588,0; 678,591,0; 659,593,0; 640,596,0; 634,581,0; 646,569,0; 651,552,0; 641,538,0; 640,521,0; 640,503,0; 639,486,0; 639,468,0; 639,451,0; 638,433,0; 638,416,0; 638,398,0; 637,381,0; 654,373,0; 668,361,0; 679,346,0; 684,329,0; 703,329,0; 722,328,0; 740,328,0; 548,150,0; 530,155,0; 512,160,0; 494,165,0; 476,171,0; 458,176,0; 441,187,0; 427,201,0; 416,217,0; 411,237,0; 411,255,0; 412,274,0; 412,293,0; 412,311,0; 413,330,0; 413,349,0; 414,367,0; 414,386,0; 415,405,0; 426,392,0; 440,382,0; 439,400,0; 433,416,0; 450,416,0; 468,416,0; 485,416,0; 502,416,0; 520,416,0; 537,416,0; 555,416,0; 572,416,0; 589,416,0; 591,398,0; 599,382,0; 614,371,0; 631,364,0; 629,347,0; 627,329,0; 626,312,0; 624,294,0; 623,277,0; 621,259,0; 620,242,0; 618,225,0; 617,207,0; 607,193,0; 609,176,0; 621,163,0; 620,146,0; 601,146,0; 582,147,0; 564,147,0\n\
radius=6.600000225007542\n\
backbone_distance=16.827586710453033\n\
basepair_distance=22.655171781778336\n\
color_scheme=1\n\
outline=true\n\
movement=false\n\
labels=true\n\
rigid_helices=true\n\
rigid_loops=false\n\
rigid_hairpins=false\n\
relaxed_ids=\n\
display_order=111,165,166,167,168,169,170,171,172,173,174,295,296,297,298,299,300,301,302,303,304,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,45,46,47,52,53,54,55,56,57,61,62,63,64,65,66,67,68,69,70,72,73,100,101,102,103,104,105,106,107,108,109,110,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,201,202,203,204,205,206,207,253,254,255,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,305,306,307,308,309,310,311,87,88,89,90,91,92,93,94,95,96,243,244,245,246,247,248,249,250,251,252,35,36,37,38,39,40,41,42,43,44,256,257,258,259,191,192,193,194,195,196,197,198,199,200,214,215,216,208,209,210,211,212,213,217,218,219,220,221,222,223,224,225,226,227,228,229,139,140,141,142,143,144,145,146,147,148,230,231,232,233,234,235,236,237,238,239,240,241,242,84,85,86,97,98,99,0,1,2,3,4,5,48,49,50,51,74,75,76,77,78,79,80,81,82,83,58,59,60,71,6,7,8\n\
pair_table=79,78,77,76,75,74,-1,-1,-1,265,264,263,262,261,260,311,310,309,308,-1,-1,-1,161,160,159,158,157,156,207,206,205,204,-1,-1,-1,213,212,211,210,209,208,259,258,257,256,-1,-1,-1,83,82,81,80,131,130,129,128,127,126,-1,-1,-1,278,277,276,275,274,273,272,271,270,269,-1,-1,-1,5,4,3,2,1,0,51,50,49,48,-1,-1,-1,252,251,250,249,248,247,246,245,244,243,-1,-1,-1,135,134,133,132,183,182,181,180,179,178,-1,-1,-1,291,290,289,288,287,286,285,284,283,282,-1,-1,-1,57,56,55,54,53,52,103,102,101,100,-1,-1,-1,239,238,237,236,235,234,233,232,231,230,-1,-1,-1,187,186,185,184,27,26,25,24,23,22,-1,-1,-1,304,303,302,301,300,299,298,297,296,295,-1,-1,-1,109,108,107,106,105,104,155,154,153,152,-1,-1,-1,226,225,224,223,222,221,220,219,218,217,-1,-1,-1,31,30,29,28,40,39,38,37,36,35,-1,-1,-1,200,199,198,197,196,195,194,193,192,191,-1,-1,-1,148,147,146,145,144,143,142,141,140,139,-1,-1,-1,96,95,94,93,92,91,90,89,88,87,-1,-1,-1,44,43,42,41,14,13,12,11,10,9,-1,-1,-1,70,69,68,67,66,65,64,63,62,61,-1,-1,-1,122,121,120,119,118,117,116,115,114,113,-1,-1,-1,174,173,172,171,170,169,168,167,166,165,-1,-1,-1,18,17,16,15\n\
non_canonical\n\
base_colors=0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0\n';

var examples = [[sampleCT, "ct"], [sampleRS1, "rs", sampleRS1Bonds], [sampleDBN, "dbn"], [sampleRS2, "rs", null, sampleRS2Color], [sampleBPSEQ, "bpseq"], [sampleNTS, "nts", sampleNTSBonds], [sampleCubeEdit, "rs"], [sampleCubeRaw, "rs"] ];
</script>

<!-- ========== The HTML Form ========== -->
<body>
  <div>
    <h1 style="margin-bottom:8;">RiboSketch</h1>
    <h2 style="text-align:center; font-size:30px; color:black; margin-top:0; margin-bottom:4;">RNA and DNA Secondary Structure Image Production</h2>
    <br/>
  </div>
  
  <canvas id="mysketch" style="border:1px solid #000000;"> </canvas>
  <br />
  <div id="allBody">
    <a id="a-save-png" href="#"><button>Save PNG Image</button></a>&nbsp
    <label for="input-fileName">Enter file name for download:</label>
    <input type="text" class="form-control" id="input-fileName" value="ribosketch_snapshot" placeholder="Enter file name" size="80">
    <hr>

    <h2>Secondary Structure Input:</h2>
    <p>
      <button onclick="loadBrowser()">Load</button>
      <button onclick="clearTextInput('inputtext')">Clear Input</button>
      <button onclick="showExample()">Show Next Example</button>
      <form>
        <input type="radio" name="fileType" id="ct" value="ct" checked> <b>ct </b> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp(Connect)<br />
        <input type="radio" name="fileType" id="dbn" value="dbn"> <b>dbn </b> &nbsp&nbsp&nbsp&nbsp&nbsp(Bracket)<br />
        <input type="radio" name="fileType" id="bpseq" value="bpseq"> <b>bpseq </b> &nbsp(Column)<br />
        <input type="radio" name="fileType" id="rs" value="rs"> <b>rs </b> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp(Save file)<br />
        <input type="radio" name="fileType" id="nts" value="nts"> <b>nts </b> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp(From json)<br />
      </form>
    </p>

    <p>Paste your secondary structure input into the text area below:</p>
          <!-- <textarea id="inputtext" rows="35" cols="40" placeholder="Paste your secondary structure input here..."></textarea>  -->
    <textarea id="inputtext" rows="26" cols="120"></textarea>

    <hr>
    <h2>Save File Output:</h2>
    <p><button onclick="saveButtonClicked()">Save</button> &nbsp Command/Ctrl-a to select all, then copy and paste to a local file for future use</p>
    <textarea id="textOutput" rows="25" cols="120" placeholder="Save state data will be output here" spellcheck="false"></textarea>

    <hr>
    <h2>Add Bonds:</h2>
    <p><button onclick="loadBondsBrowser()">Load Bonds</button> &nbsp Enter a comma separated list of bonds, formatted with the Leontis and Westhof nomenclature</p>
    <textarea id="inputbonds" rows="8" cols="120" placeholder="Example: 2 10 cWW, 3 9 tHS, 4 8 cWS" spellcheck="false"></textarea>

    <hr>
    <h2>Color Input:</h2>
    <p><button onclick="loadColorBrowser()">Load Color</button> &nbsp Enter a space separated list of numbers to color bases on a gradient</p>
    <textarea id="inputcolor" rows="8" cols="120" placeholder="Paste color data here (list of numbers corresponding to each nucleotide)" spellcheck="false"></textarea>

    <hr style="margin-top:48px;">
    <h4 style="margin-bottom:0px;">
      NOTE:
    </h4>
    <h5 style="margin-top:0px; margin-bottom:0px;">
      <ul>
        <li style="margin-bottom:8px;">The program must be activated (canvas outlined in blue) to use. Click within the box to activate the program.</li>
        <li style="margin-bottom:8px;">Make sure the view-zoom of the browser window is set to 100%, or default. The program will be out of focus if you are zoomed in or out.</li>
        <li style="margin-bottom:8px;">If this online version gives you issues, try downloading the program from our homepage.</li>
        <li>Please cite our <a class="link1" href="https://academic.oup.com/bioinformatics/advance-article/doi/10.1093/bioinformatics/bty468/5038458?guestAccessKey=b87dfa10-4d79-4a79-a3a8-31a92f553392" target="_blank">publication</a> if you use RiboSketch for your work.</li>
      </ul>
    </h5>

    <hr style="margin-bottom:48px;">
    
    <div style="text-align:center;">
      <a class="link1" style="font-size: 32px;" href="https://binkley2.ncifcrf.gov/users/bindewae/ribosketch_web/index.html" target="_blank">RiboSketch Homepage</a>
      <h5>Visit our homepage for download links and more information</h5>
    </div>
    <hr>

    <h1>What is RiboSketch?</h1>
    <h5>
      <ul type="none">
        <li>RiboSketch is a drawing program for the production of RNA and DNA secondary structure images.</li>
        <li>The user provides an input file (.ct, .bpseq, .dbn, or the save file type .rs) containing the sequence and base-pairing of the strand(s).</li>
      </ul>
    </h5>

    <h2>Features</h2>
    <h5>
      <ul>
        <li>Works with multiple strands, non-canonical interactions, hybrid RNA-DNA base-pairing, pseudoknots, and interstrand interactions</li>
        <li>Creates automatic layouts and circle diagrams</li>
        <li>Dynamic simulation mode</li>
        <li>Interactive editing is enabled through precise commands</li>
        <li>The user may save the state of the program and load previous save-states</li>
        <li>Actions may be undone and redone</li>
      </ul>
    </h5>

    <h1>Using the Program</h1>
    <h5>
      <ul>
        <li>Load a secondary structure file (you can add additional bonds and non-canonicals once in the program)</li>
        <li>Default start state is the “Radial Layout”.</li>
        <li>Mouse over the top of the screen to access the MENU and to view COMMANDS.</li>
      </ul>
    </h5>

    <h2>Mouse Commands</h2>
    <h5>
      <ul>
        <li>Click on (or drag a selection box over) bases to select them. Hold shift to multi-select or toggle the selection of bases.</li>
        <li>Drag selected nucleotides to move them.</li>
        <li>To select individual nucleotides, hold ALT/OPTION and click.</li>
        <li>To select one half of a helix, you can either:</li>
        <ul>
          <li>Select the helix, then shift click on the side you don't want to unselect it.</li>
          <li>Click and drag a selection box over one side of the helix.</li>
        </ul>
        <li>ROTATION: “m” rotates clockwise about the mouse cursor, “n” counterclockwise. Hold shift to rotate with a smaller angle.</li>
      </ul>
    </h5>
    <h2>Menu Features</h2>
    <h3>Sliders</h3>
    <h5>
      <ul>
        <li>Base Size: Size of nucleotides</li>
        <li>Bond Length: Distance between base-paired nucleotides</li>
        <li>Chain Length: Effective only during simulation mode, controls distance between adjacent nucleotides</li>
        <li>Color Scheme: “Pastel”, “White”, "Light", “Bright”, “Grey", and special ones:</li>
        <ul>
          <li>Base Type: Each nucleotide type gets its own color</li>
          <li>Rainbow: Each individual base gets its own color</li>
          <li>Structure: Paired bases: Yellow, Unpaired: Blue</li>
          <li>Custom: User must input number values corresponding to each base</li>
        </ul>
      </ul>
    </h5>
    <h3>Buttons</h3>
    <h5>
      <ul>
        <li>Save: Writes state of program into a text file (.rs), which can be loaded into RiboSketch.</li>
        <li>Load File: Read a new secondary structure file into the program.</li>
        <li>Load Bonds: Add new bonds from a text file of comma-separated entries with format: “firstID secondID bondType”</li>
        <ul type="none"><li>Example:  3 20 cWW, 4 19 tHS, 6 30 cSS</li></ul>
        <li>Load Colors: Color nucleotides based on a space-separated list of numbers (probing data) from a text file.</li>
        <li>Radial Layout: Position nucleotides with the NAView algorithm, expanded to accommodate multiple strands and pseudoknots.</li>
        <li>Circle Layout: Nucleotides are positioned in a circle with base pairs drawn as chords.</li>
        <li>Simulation Mode: Apply forces.</li>
        <li>Sim. Selected Mode: Only apply forces to selected nucleotides.</li>
        <li>Rigid Helices: Enforce right angles for helices.</li>
        <li>Rigid Loops: Circularize loops and straighten stems.</li>
        <li>Rigid Hairpins: Circularize hairpin loops. Only has effect when Rigid Loops is OFF.</li>
        <li>Zoom Reset: Return zoom to default.</li>
        <li>Outlines: Toggle drawing circles around nucleotides.</li>
        <li>Labels: Display numbering for every tenth nucleotide.</li>
        <li>PNG Screenshot: Saves a screen image to the folder of the input file.</li>
        <li>SVG Screenshot: Saves an SVG file of the screen to the folder of the input file.</li>
      </ul>
    </h5>

    <h2>Keyboard Commands</h2>
    <h3>Editing</h3>
    <h5>
      <ul>
        <li>ROTATION: “m” rotates clockwise about the mouse cursor; “n” counterclockwise. Hold shift to rotate with a smaller angle.</li>
        <li>"z": UNDO. Shift-Z to REDO.</li>
        <li>"s": Turn on or off SIMULATION (forces)</li>
        <li>"S": Toggle the SIMULATION MODE to apply forces to selected nucleotides only or all nucleotides.</li>
        <li>“f”: FLIP the halves of a selected helix.</li>
        <li>“x” or “y”: Flips the selected bases over the X or Y-axis.</li>
        <li>"r": RELAX FORCES for selected nucleotides. Effective only in Simulation mode.</li>
      </ul>
    </h5>
    <h3>Display</h3>
    <h5>
      <ul>
        <li>+ / -  : Zooms the screen in or out</li>
        <li>0      : Resets the view scale</li>
        <li>Arrows : When no nucletodies are selected, the arrow keys translate the window view.</li>
        <li>1 / 2  : Brings the selected bases to the front or back, akin to Powerpoint</li>
        <li>b / B  : Base SIZE +/-  (Same as slider)</li>
        <li>o      : Toggle OUTLINE</li>
        <li>i      : Toggle LETTERS</li>
        <li>l      : Toggle LABELS  (Same as button)</li>
        <li>k      : View base number in secondary file</li>
        <li>v      : Toggle ANNOTATIONS (5' and 3', strand number)</li>
        <li>c      : Changes the color scheme of the nucleotides</li>
        <li>p      : Saves a PNG SCREENSHOT (Same as the button)</li>
      </ul>
    </h5>

    <h2>Adding and Deleting Bonds</h2>
    <h5>
      <ul>
        <li>Adding: Hold Spacebar, click first base, click second base.</li>
        <li>Non-Canonical: Click "Load Bonds" button to add bonds with specified type through text input (Ex: 3 25 cWW, 8 12 tHS)</li>
        <li>Deleting: Hold "d", click a base to delete its bonds.</li>
      </ul>
    </h5>

    <h2>The "RS" Data Format</h2>
    <h5>
    The state of the program can be saved using the "RS" format (RS stands for RiboSketch), a special case of the Java Properties format: In other words, a text file in which keys and values are separated by an equals ("=") character. Comment lines (preceded by the "#" character) are allowed. Recognized keys are:
    <ol>
    <li>sequences: semicolon-separated list of RNA or DNA sequence strings which are in upper or lower case respectively</li>
    <li>starts: comma-separated list of zero-based indices of the first residue of each sequence</li>
    <li>positions: semicolon-separated string of x,y,z positions of each residue. In the current version the z-values are set to zero.</li>
    <li>radius: the radius of the residues in pixel units</li>
    <li>backbone_distance: target distance of two residues that are adjacent in sequence</li>
    <li>basepair_distance: target distance of two base paired residues</li>
    <li>color_scheme: an integer that stands for the color mode</li>
    <li>outline: true/false indicating whether the residues are drawn with a black circle</li>
    <li>movement: true/false indicating whether the simulation mode is on</li>
    <li>labels: true/false indicating whether the residue labels are shown or not</li>
    <li>rigid_helices: true/false indicating whether rigidifying helices is activated or not</li>
    <li>rigid_loops: true/false indicating whether rigidifying loops is activated or not</li>
    <li>rigid_hairpins: true/false indicating whether rigidifying hairpins is activated or not</li>
    <li>relax_ids: comma-separated list of residues whose basepairs are not affected by forces</li>
    <li>display_order: residues are displayed in this order. This is useful in order to achieve foreground/background effects</li>
    <li>pair_table: residue partners for each base pair (-1 for unpaired bases). Similar to base pair column in a CT format file.</li>
    <li>non_canonicals: extra information about non-canonical base pairs</li>
    <li>base_colors: assignable colors for each base (comma-separated RGB values between 0 and 1)</li>
    </ol>
    </h5>
    <hr>


    <!-- Preload the example -->
    <script type="text/javascript">
       showExample();
    </script>
  </div>
</body>
</html>
