Advertisement
Guest User

Untitled

a guest
Feb 13th, 2014
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 56.70 KB | None | 0 0
  1. [16:54:37] <mat747> i still have lab to do too, had been waiting for results
  2. [16:54:40] <jnicol> I'm going on a trip till next Wednesday, so I should do some labs now :)
  3. [16:54:56] <Eli-Fisker> :)
  4. [16:55:02] <jnicol> I asked Nando if he could take over for next weeks class
  5. [16:55:03] <mat747> eli - hehe
  6. [16:55:11] <Eli-Fisker> Mat :)
  7. [16:55:25] <Eli-Fisker> That would be cool too
  8. [16:55:29] <jnicol> Curious to see what he comes up with
  9. [16:55:48] <Eli-Fisker> hehe, yep. Molecules break apart around him
  10. [16:56:12] <Eli-Fisker> I mean, he always digs out weird stuff in Chimera and other tools
  11. [16:56:39] <firedrake969> Hi
  12. [16:57:05] <Eli-Fisker> hi Fire
  13. [16:57:39] <jnicol> hi fire
  14. [16:57:43] <mat747> Hi Fire
  15. [16:58:23] <firedrake969> anyone think they can pinpoint a computer issue I just had :L
  16. [16:58:49] <firedrake969> Someone used my computer, and they closed the lid. I think the computer restarted or something, because when I opened it back up, it was a black screen.
  17. [16:58:53] <firedrake969> It was on, though.
  18. [16:59:01] <firedrake969> I restarted it, and it said that Windows failed to start.
  19. [16:59:09] <firedrake969> I just continued with booting.
  20. [16:59:33] <firedrake969> And now, it says Windows successfully installed updates.
  21. [16:59:40] <firedrake969> I think the update broke my computer ;_;
  22. [16:59:56] <jnicol> windows update broke my computer yesterday :(
  23. [17:00:30] <jnicol> Hi everyone, Welcome to EteRNA Class Time!
  24. [17:00:36] <firedrake969> I postponed my update as long as I could.
  25. [17:00:42] <machinelves> yay! thank you jnicol!
  26. [17:00:45] <Eli-Fisker> Thx John!
  27. [17:00:45] <jnicol> If you missed the first class last week, don't worry, it is not required to be able to follow along now.
  28. [17:00:47] <firedrake969> So technically I should've updated around a week ago.
  29. [17:00:48] <firedrake969> Sweet.
  30. [17:01:04] <jnicol> In this class, I would like to continue with the objective of generating an Energy Chart.
  31. [17:01:16] <jnicol> We are focusing on generating the tetraloop energies, but we would like this code to be useful for generating energies of internal loops also.
  32. [17:01:32] <jnicol> Lets start by opening the scripting interface, http://eterna.cmu.edu/web/script/create/
  33. [17:01:49] <jnicol> and copy the following code into it:
  34. [17:01:50] <jnicol> var nextbase = getNextBase("A");
  35. [17:01:51] <jnicol> outln(nextbase);
  36. [17:01:51] <jnicol> function getNextBase(b) {
  37. [17:01:51] <jnicol> if (b == "A") return "U";
  38. [17:01:51] <jnicol> if (b == "U") return "G";
  39. [17:01:51] <jnicol> if (b == "G") return "C";
  40. [17:01:51] <jnicol> return "A";
  41. [17:01:52] <jnicol> }
  42. [17:01:52] <jnicol> return true;
  43. [17:02:06] <firedrake969> jnicol, how do you do that type of chat?
  44. [17:02:20] <firedrake969> (i.e. outside of the space between your name and the timestamp)
  45. [17:02:22] <jnicol> I copy into mIrc
  46. [17:02:27] <firedrake969> What?
  47. [17:02:39] <jnicol> irc chat program, mIRC
  48. [17:02:53] <jnicol> We see that the function getNextBase will return a U if we pass in an A
  49. [17:03:07] <jnicol> return a G when a U is passed in, return a C when a G is passed, return an A when a C is passed in
  50. [17:03:31] <firedrake969> So mIRC can connect to here?
  51. [17:03:31] <jnicol> Did everyone run the program?
  52. [17:03:40] <firedrake969> yeah
  53. [17:03:42] <hoglahoo> I ran it
  54. [17:03:47] <jnicol> yup, hog and nando use mirc also
  55. [17:03:47] <machinelves> yes
  56. [17:03:51] <Eli-Fisker> yes
  57. [17:03:56] <jnicol> so using 1 line to call a function is preferred over writing the 4 lines everywhere we want to get the next base.
  58. [17:04:01] <mat747> yes
  59. [17:04:13] <jnicol> This function will help us to get every combination of the tetraloop unpaired bases.
  60. [17:04:24] <hoglahoo> in the last script, we did run 4 lines didn't we
  61. [17:04:48] <jnicol> yes, I didnt want to try functions in the previous class
  62. [17:05:05] <jnicol> bringing everyone along slowly :)
  63. [17:05:14] <hoglahoo> yes please :)
  64. [17:05:18] <machinelves> *salutes the captain*
  65. [17:05:23] <firedrake969> Can we go over each line again, like last week?
  66. [17:05:35] <jnicol> Hope you still feel that way after this class :)
  67. [17:05:39] <jnicol> Lets introduce another function, getNextSequence, which uses getNextBase, and will generate the sequences we want to find the energies of.
  68. [17:05:43] <hoglahoo> if I fall behind I will cheat off machinelves
  69. [17:05:49] <firedrake969> lol
  70. [17:06:03] <Eli-Fisker> ;)
  71. [17:06:10] <jnicol> delete all previous code and copy the following lines into the scripting window:
  72. [17:06:13] <jnicol> locks = "xxxxxxoxxx";
  73. [17:06:13] <jnicol> sequence = "GCGAAAACGC";
  74. [17:06:13] <jnicol> outln(sequence);
  75. [17:06:13] <jnicol> sequence = getNextSequence(sequence, locks);
  76. [17:06:13] <jnicol> outln(sequence);
  77. [17:06:13] <jnicol> sequence = getNextSequence(sequence, locks);
  78. [17:06:13] <jnicol> outln(sequence);
  79. [17:06:13] <jnicol> sequence = getNextSequence(sequence, locks);
  80. [17:06:13] <jnicol> outln(sequence);
  81. [17:06:14] <jnicol> sequence = getNextSequence(sequence, locks);
  82. [17:06:15] <jnicol> outln(sequence);
  83. [17:06:16] <jnicol> function getNextSequence(sq, lk) {
  84. [17:06:16] <jnicol> i = lk.length;
  85. [17:06:17] <jnicol> while (--i > 0) {
  86. [17:06:18] <jnicol> if (lk.substr(i,1) == "o") {
  87. [17:06:18] <jnicol> base = sq.substr(i,1);
  88. [17:06:19] <jnicol> sq = sq.substr(0,i) + getNextBase(base)
  89. [17:06:20] <jnicol> + sq.substr(i+1,sq.length-i);
  90. [17:06:21] <jnicol> if (base != "C") { return sq; }
  91. [17:06:24] <jnicol> }
  92. [17:06:24] <jnicol> }
  93. [17:06:25] <jnicol> return "done";
  94. [17:06:26] <jnicol> }
  95. [17:06:26] <jnicol> function getNextBase(b) {
  96. [17:06:29] <jnicol> if (b == "A") return "U";
  97. [17:06:29] <jnicol> if (b == "U") return "G";
  98. [17:06:29] <jnicol> if (b == "G") return "C";
  99. [17:06:31] <jnicol> return "A";
  100. [17:06:31] <jnicol> }
  101. [17:06:33] <jnicol> return true;
  102. [17:06:47] <jnicol> THat took a while :)
  103. [17:06:52] <firedrake969> Ok, please walk through code? :3
  104. [17:06:59] <jnicol> Now this may look complex, but stay with me and I promise we can get through this :)
  105. [17:07:02] <firedrake969> Oh, sweet, I get it.
  106. [17:07:14] <hoglahoo> can someone post the link to the big chat window please
  107. [17:07:15] <jnicol> First, it is best to understand what this code is doing, so click Evaluate and take a look at the result.
  108. [17:07:26] <jnicol> http://eterna.cmu.edu/web/chat/
  109. [17:07:40] <hoglahoo> ty
  110. [17:07:53] <jnicol> were you able to grab the code?
  111. [17:07:54] <hoglahoo> meh.
  112. [17:07:58] <firedrake969> What does locks do?
  113. [17:08:06] <jnicol> Notice that every time getNextSequence is called, base #7 is 'incremented' to the next valid base.
  114. [17:08:20] <jnicol> The while loop is looking at every character in 'locks' (lines 15 and 16), starting at the last character of the string and moving toward the first character.
  115. [17:08:49] <jnicol> This is because I want to display the changing sequence as
  116. [17:08:51] <jnicol> AAAA
  117. [17:08:52] <jnicol> AAAU
  118. [17:08:52] <jnicol> AAAG
  119. [17:08:52] <jnicol> AAAC
  120. [17:08:52] <jnicol> AAUA
  121. [17:08:52] <jnicol> ...
  122. [17:09:37] <jnicol> Locks is like the structure, but it identifies the bases that we want to change
  123. [17:09:54] <jnicol> so we see base 7 is unlocked
  124. [17:10:04] <firedrake969> Ok, thanks
  125. [17:10:08] <firedrake969> And they can be any characters, right?
  126. [17:10:21] <Eli-Fisker> yes
  127. [17:10:22] <jnicol> which means we keep all other bases as is and only change base 7
  128. [17:10:24] <firedrake969> Ok
  129. [17:10:47] <Eli-Fisker> http://prntscr.com/2s8r5t
  130. [17:10:55] <jnicol> well, the gatNextBase, assumes A is the first base being used
  131. [17:11:10] <jnicol> thanks eli :)
  132. [17:11:15] <Eli-Fisker> np :)
  133. [17:11:23] <steven123505> hai
  134. [17:11:35] <jnicol> hai steven
  135. [17:11:35] <machinelves> hey! welcome to class! :)
  136. [17:11:36] <Eli-Fisker> hi Steven. John is giving a script lecture
  137. [17:11:46] <steven123505> hi john :D
  138. [17:11:49] <jnicol> When 'locks' has an 'o', we want to change that base (lines 16 and 17).
  139. [17:12:04] <jnicol> A new sequence using that changed base is saved (lines 18 and 19).
  140. [17:12:06] <Eli-Fisker> o= open?
  141. [17:12:25] <firedrake969> HI steven
  142. 03[17:12:25] * hoglahoo sets mode: +o Brourd
  143. [17:12:38] <firedrake969> What does the "sq.substr()" do?
  144. [17:12:47] <jnicol> yes, that is actually the same way eterna uses it when we lock bases in a puzzle
  145. [17:12:59] <jewfrosamurai42> hey guys, i wish i was adenine so i could be with u tomorrow
  146. [17:13:00] <Eli-Fisker> cool, John
  147. [17:13:04] <machinelves> ahh cool
  148. [17:13:30] <jnicol> substr() is taking 1 character at base 7
  149. [17:14:13] <firedrake969> Base 7 of the sq?
  150. [17:14:16] <jnicol> whenever you have a question about what the code is doing
  151. [17:14:31] <jnicol> you can put in an outln statement to see
  152. [17:14:43] <jnicol> like outln(sq.substr(i,1));
  153. [17:14:53] <jnicol> right after that line
  154. [17:14:57] <jnicol> in the code
  155. [17:15:12] <Eli-Fisker> That is handy
  156. [17:15:20] <jnicol> sq is a shortened name for sequence
  157. [17:15:49] <firedrake969> Yeah
  158. [17:15:59] <firedrake969> Ok, what I meant is the [obj].substr();
  159. [17:16:01] <jnicol> I unlocked 1 base to make the output result easy to see for now
  160. [17:16:03] <firedrake969> It takes it from the [obj] part.
  161. [17:16:18] <jnicol> correct fire
  162. [17:16:46] <jnicol> eventually we will unlock 4 bases to check all tetraloop combinations
  163. [17:17:00] <firedrake969> Ok, thanks, jnicol
  164. [17:17:08] <machinelves> sooper cool!
  165. [17:17:56] <jnicol> do my line numbers match up? I think I had a blank line in my original code
  166. [17:18:20] <jnicol> but when i copied it I doont see any blank lines
  167. [17:18:27] <firedrake969> Line numbers?
  168. [17:18:28] <machinelves> i did not get a blank line
  169. [17:19:04] <Eli-Fisker> http://prntscr.com/2s8u1i
  170. [17:19:08] <Eli-Fisker> This is what I got
  171. [17:19:12] <jnicol> is lines 16 and 17
  172. [17:19:15] <jnicol> while (--i > 0) {
  173. [17:19:16] <jnicol> if (lk.substr(i,1) == "o") {
  174. [17:19:31] <hoglahoo> mine agrees with Eli
  175. [17:19:33] <Eli-Fisker> no
  176. [17:19:38] <machinelves> 14 & 15 for me
  177. [17:19:48] <Eli-Fisker> Same as Machine
  178. [17:19:52] <jnicol> so sorry, I may be off a line or two when I reference line numbers'
  179. [17:19:57] <firedrake969> That's 13 and 14 for me
  180. [17:20:14] <firedrake969> but I'm editting the code right now to test somethign
  181. [17:20:19] <Eli-Fisker> np
  182. [17:20:20] <firedrake969> something*
  183. [17:20:26] <jnicol> well hopefullyh it is not too confusing :(
  184. [17:20:39] <firedrake969> jnicol
  185. [17:20:49] <firedrake969> Question.... why isn't this bit of code working?
  186. [17:20:52] <firedrake969> i = 0;while (i &lt; 4){ sequence = getNextSequence(sequence, locks); outln(sequence); i++}
  187. [17:21:03] <firedrake969> Hopefully it's not too badly messed up
  188. [17:21:24] <machinelves> fyi eterna plugin just crashed for me so i lost transcript. someone recording may want to backup now
  189. [17:21:36] <jnicol> try it on separate lines
  190. [17:21:38] <Eli-Fisker> Thx for the warning machine
  191. [17:21:42] <firedrake969> Ok
  192. [17:21:45] <machinelves> np :)
  193. [17:21:53] <firedrake969> I'm getting the transcript
  194. [17:21:56] <firedrake969> but via /web/chat
  195. [17:22:02] <firedrake969> i = 0;
  196. [17:22:06] <firedrake969> while (i &lt; 4){
  197. [17:22:09] <firedrake969> sequence = getNextSequence(sequence, locks);
  198. [17:22:10] <machinelves> ahh may i please have code repost
  199. [17:22:14] <firedrake969> outln(sequence);
  200. [17:22:20] <firedrake969> i++
  201. [17:22:24] <firedrake969> }
  202. [17:22:29] <firedrake969> @jnicol that's what i have
  203. [17:22:38] <jnicol> if you add a blank line before each function, our line numbers should match
  204. [17:22:46] <hoglahoo> doesn't i++ need a ;
  205. [17:23:01] <jnicol> yes it does hog, good eye
  206. [17:23:11] <DARKvLIGHT> you guys talking C++
  207. [17:23:17] <jnicol> javascript
  208. [17:23:24] <firedrake969> oh yeah thanks hog
  209. [17:23:38] <firedrake969> Still doesn't work?
  210. [17:24:15] <jnicol> A new sequence using that changed base is saved (lines 18 and 19).
  211. [17:24:16] <hoglahoo> machinelves do you still need the code
  212. 03[17:24:20] * Looking up machinelves__25772904525315 user info...
  213. [17:24:22] <machinelves> yes please!
  214. 03[17:24:24] * Looking up machinelves__25774297055846 user info...
  215. [17:24:37] <machinelves> thank you! & sorry :)
  216. [17:24:38] <hoglahoo> I hope that works...
  217. [17:24:45] <jnicol> i got it hog
  218. [17:24:47] <hoglahoo> oh ok
  219. [17:24:50] <jnicol> locks = "xxxxxxoxxx";
  220. [17:24:50] <jnicol> sequence = "GCGAAAACGC";
  221. [17:24:50] <jnicol> outln(sequence);
  222. [17:24:50] <jnicol> sequence = getNextSequence(sequence, locks);
  223. [17:24:50] <jnicol> outln(sequence);
  224. [17:24:50] <jnicol> sequence = getNextSequence(sequence, locks);
  225. [17:24:50] <jnicol> outln(sequence);
  226. [17:24:50] <jnicol> sequence = getNextSequence(sequence, locks);
  227. [17:24:50] <jnicol> outln(sequence);
  228. [17:24:50] <jnicol> sequence = getNextSequence(sequence, locks);
  229. [17:24:51] <jnicol> outln(sequence);
  230. [17:24:51] <jnicol> function getNextSequence(sq, lk) {
  231. [17:24:52] <jnicol> i = lk.length;
  232. [17:24:55] <hoglahoo> now she got it twice
  233. [17:24:55] <jnicol> while (--i > 0) {
  234. [17:24:55] <jnicol> if (lk.substr(i,1) == "o") {
  235. [17:24:56] <jnicol> base = sq.substr(i,1);
  236. [17:24:57] <jnicol> sq = sq.substr(0,i) + getNextBase(base)
  237. [17:24:58] <jnicol> + sq.substr(i+1,sq.length-i);
  238. [17:24:59] <jnicol> if (base != "C") { return sq; }
  239. [17:24:59] <jnicol> }
  240. [17:25:00] <jnicol> }
  241. [17:25:03] <jnicol> return "done";
  242. [17:25:03] <jnicol> }
  243. [17:25:04] <jnicol> function getNextBase(b) {
  244. [17:25:05] <jnicol> if (b == "A") return "U";
  245. [17:25:05] <jnicol> if (b == "U") return "G";
  246. [17:25:07] <jnicol> if (b == "G") return "C";
  247. [17:25:07] <jnicol> return "A";
  248. [17:25:08] <jnicol> }
  249. [17:25:11] <jnicol> return true;
  250. [17:25:42] <jnicol> lets try again, I will post in pieces
  251. [17:25:56] <jnicol> aftfer each piece add a blank line
  252. [17:26:03] <jnicol> locks = "xxxxxxoxxx";
  253. [17:26:03] <jnicol> sequence = "GCGAAAACGC";
  254. [17:26:03] <jnicol> outln(sequence);
  255. [17:26:03] <jnicol> sequence = getNextSequence(sequence, locks);
  256. [17:26:03] <jnicol> outln(sequence);
  257. [17:26:04] <jnicol> sequence = getNextSequence(sequence, locks);
  258. [17:26:04] <jnicol> outln(sequence);
  259. [17:26:04] <jnicol> sequence = getNextSequence(sequence, locks);
  260. [17:26:04] <jnicol> outln(sequence);
  261. [17:26:04] <jnicol> sequence = getNextSequence(sequence, locks);
  262. [17:26:04] <machinelves> i got it
  263. [17:26:04] <jnicol> outln(sequence);
  264. [17:26:14] <machinelves> thanks!
  265. [17:26:29] <jnicol> function getNextSequence(sq, lk) {
  266. [17:26:29] <jnicol> i = lk.length;
  267. [17:26:29] <jnicol> while (--i > 0) {
  268. [17:26:29] <jnicol> if (lk.substr(i,1) == "o") {
  269. [17:26:29] <jnicol> base = sq.substr(i,1);
  270. [17:26:29] <jnicol> sq = sq.substr(0,i) + getNextBase(base)
  271. [17:26:29] <jnicol> + sq.substr(i+1,sq.length-i);
  272. [17:26:29] <jnicol> if (base != "C") { return sq; }
  273. [17:26:29] <jnicol> }
  274. [17:26:29] <jnicol> }
  275. [17:26:30] <jnicol> return "done";
  276. [17:26:30] <jnicol> }
  277. [17:26:41] <jnicol> function getNextBase(b) {
  278. [17:26:41] <jnicol> if (b == "A") return "U";
  279. [17:26:41] <jnicol> if (b == "U") return "G";
  280. [17:26:41] <jnicol> if (b == "G") return "C";
  281. [17:26:41] <jnicol> return "A";
  282. [17:26:41] <jnicol> }
  283. [17:27:03] <jnicol> I need to get better with that :)
  284. [17:27:05] <hoglahoo> is that 3 blank lines at 12, 25, and 32 if done correctly?
  285. [17:27:16] <jnicol> correct
  286. [17:27:31] <hoglahoo> might try a comment instead of a blank line for pasting here
  287. [17:27:42] <firedrake969> jnicol, what about my faulty while loop?
  288. [17:27:42] <hoglahoo> actually no... hmm
  289. [17:28:01] <jnicol> idk fire, we can look at it after this class
  290. [17:28:33] <jnicol> reposted last statement
  291. [17:28:35] <jnicol> A new sequence using that changed base is saved (lines 18 and 19).
  292. [17:28:39] <firedrake969> Ok
  293. [17:28:50] <jnicol> When that base is not a C, then we have found the next sequence and can return (line 20).
  294. [17:29:01] <jnicol> When that base is a C, then we want to change it back to an A, and check to see if there is a lower base number that needs to be changed, which is done by checking the next base in the while loop.
  295. [17:29:10] <jnicol> When all the bases to be changed are set to C, then we are finished with all the sequences and can return "done" (line 23)
  296. [17:29:47] <jnicol> do line numbers sync now?
  297. [17:29:55] <machinelves> yes
  298. [17:30:00] <jnicol> good
  299. [17:30:13] <firedrake969> Yup
  300. [17:30:34] <Eli-Fisker> Yes
  301. [17:30:36] <jnicol> I'm going to try hogs suggestion of adding a comment for blank lines
  302. [17:30:45] <hoglahoo> I don't think the chat will like / though
  303. [17:30:51] <hoglahoo> mirc reserves it for commands
  304. [17:31:15] <Eli-Fisker> What I got now, if anyone is in doubt
  305. [17:31:16] <Eli-Fisker> http://prntscr.com/2s8y3f
  306. [17:31:41] <jnicol> any questions on the previous code?
  307. [17:31:48] <jnicol> is it sasfe to move forward?
  308. [17:31:54] <firedrake969> Yeah
  309. [17:32:06] <machinelves> ready
  310. [17:32:25] <jnicol> Now lets use 2 unlocked bases and watch what happens as the sequence runs through all the possible combinations.
  311. [17:32:26] <firedrake969> wait, one thing
  312. [17:32:41] <firedrake969> How do you create a new variable?
  313. [17:32:41] <jnicol> ok fire
  314. [17:32:57] <TomoeUzumaki> aah is today the class?
  315. [17:33:02] <jnicol> you can just use it
  316. [17:33:12] <Eli-Fisker> Tomoe, yep
  317. [17:33:12] <machinelves> yes tomoe, hi!
  318. [17:33:14] <firedrake969> Use it?
  319. [17:33:16] <jnicol> or formally, you should prefix it with var
  320. [17:33:20] <TomoeUzumaki> oops
  321. [17:33:21] <firedrake969> I've tried something with j but it doesn't work
  322. [17:33:27] <TomoeUzumaki> well, I was studying for an exam
  323. [17:33:38] <firedrake969> nvm, it works :3
  324. [17:33:43] <jnicol> for instance just put "myEnergy = 0;"
  325. [17:33:50] <jnicol> good
  326. [17:34:14] <jnicol> delete all previous code and copy the following lines into the scripting window:
  327. [17:34:16] <firedrake969> :D
  328. [17:34:17] <jnicol> locks = "xxxxxooxxx";
  329. [17:34:17] <jnicol> sequence = "GCGAAAACGC";
  330. [17:34:17] <jnicol> while (sequence != "done") {
  331. [17:34:17] <jnicol> outln(sequence);
  332. [17:34:17] <jnicol> sequence = getNextSequence(sequence, locks);
  333. [17:34:17] <jnicol> }
  334. [17:34:18] <jnicol> function getNextSequence(sq, lk) {
  335. [17:34:18] <jnicol> i = lk.length;
  336. [17:34:18] <jnicol> while (--i > 0) {
  337. [17:34:18] <jnicol> if (lk.substr(i,1) == "o") {
  338. [17:34:19] <jnicol> base = sq.substr(i,1);
  339. [17:34:20] <jnicol> sq = sq.substr(0,i) + getNextBase(base)
  340. [17:34:20] <jnicol> + sq.substr(i+1,sq.length-i);
  341. [17:34:21] <jnicol> if (base != "C") { return sq; }
  342. [17:34:22] <jnicol> }
  343. [17:34:23] <jnicol> }
  344. [17:34:24] <jnicol> return "done";
  345. [17:34:25] <jnicol> }
  346. [17:34:26] <jnicol> function getNextBase(b) {
  347. [17:34:27] <jnicol> if (b == "A") return "U";
  348. [17:34:27] <jnicol> if (b == "U") return "G";
  349. [17:34:29] <jnicol> if (b == "G") return "C";
  350. [17:34:29] <firedrake969> or I could've done that :P
  351. [17:34:30] <jnicol> return "A";
  352. [17:34:31] <jnicol> }
  353. [17:34:32] <jnicol> return true;
  354. [17:34:37] <firedrake969> oops
  355. [17:34:40] <firedrake969> Disrupted it, sorry
  356. [17:34:50] <jnicol> :) didnt take the blank line comments
  357. [17:35:11] <Eli-Fisker> :)
  358. [17:35:12] <hoglahoo> right, there's an escape for it but will have to google :)
  359. [17:35:26] <machinelves> blank line numbers please?
  360. [17:35:27] <firedrake969> What i get: GCGAAAACGCGCGAAAUCGCGCGAAAGCGCGCGAAACCGCGCGAAUACGCGCGAAUUCGCGCGAAUGCGCGCGAAUCCGCGCGAAGACGCGCGAAGUCGCGCGAAGGCGCGCGAAGCCGCGCGAACACGCGCGAACUCGCGCGAACGCGCGCGAACCCGC
  361. [17:35:30] <TomoeUzumaki> guys, I emailed someone and asked him to call me
  362. [17:35:32] <firedrake969> with spaces in between...
  363. [17:35:37] <TomoeUzumaki> but I forgot to give him my number.
  364. [17:35:47] <jnicol> let me try to post it again
  365. [17:35:54] <jnicol> locks = "xxxxxooxxx";
  366. [17:35:54] <jnicol> sequence = "GCGAAAACGC";
  367. [17:35:54] <jnicol> out("");
  368. [17:35:54] <jnicol> while (sequence != "done") {
  369. [17:35:54] <jnicol> outln(sequence);
  370. [17:35:54] <jnicol> sequence = getNextSequence(sequence, locks);
  371. [17:35:54] <jnicol> }
  372. [17:35:54] <jnicol> out("");
  373. [17:35:54] <jnicol> function getNextSequence(sq, lk) {
  374. [17:35:54] <jnicol> i = lk.length;
  375. [17:35:54] <jnicol> while (--i > 0) {
  376. [17:35:56] <jnicol> if (lk.substr(i,1) == "o") {
  377. [17:35:57] <jnicol> base = sq.substr(i,1);
  378. [17:35:57] <jnicol> sq = sq.substr(0,i) + getNextBase(base)
  379. [17:35:58] <jnicol> + sq.substr(i+1,sq.length-i);
  380. [17:36:01] <jnicol> if (base != "C") { return sq; }
  381. [17:36:02] <jnicol> }
  382. [17:36:03] <jnicol> }
  383. [17:36:03] <jnicol> return "done";
  384. [17:36:05] <jnicol> }
  385. [17:36:06] <jnicol> out("");
  386. [17:36:06] <jnicol> function getNextBase(b) {
  387. [17:36:07] <jnicol> if (b == "A") return "U";
  388. [17:36:08] <jnicol> if (b == "U") return "G";
  389. [17:36:09] <jnicol> if (b == "G") return "C";
  390. [17:36:10] <jnicol> return "A";
  391. [17:36:11] <jnicol> }
  392. [17:36:11] <jnicol> out("");
  393. [17:36:14] <jnicol> return true;
  394. [17:36:34] <jnicol> the out(""); is where I want the blank lines to be
  395. [17:36:53] <jnicol> but I think leaving in the out should not hurt anything
  396. [17:37:04] <hoglahoo> works fine with or without
  397. [17:37:12] <Eli-Fisker> http://prntscr.com/2s901r
  398. [17:37:16] <Eli-Fisker> Got it like this
  399. [17:37:42] <firedrake969> Can someone evaluate it?
  400. [17:37:46] <firedrake969> I have a really weird result.
  401. [17:38:12] <mat747> eli - http://prntscr.com/2s90a1
  402. [17:38:13] <Eli-Fisker> Now there are two bases unlocked
  403. [17:38:15] <firedrake969> 16 lines
  404. [17:38:26] <firedrake969> I get the same thing, mat.
  405. [17:38:30] <Eli-Fisker> I get what Mat has
  406. [17:38:30] <machinelves> output: http://prntscr.com/2s90et
  407. [17:38:33] <firedrake969> Ok, thanks
  408. [17:38:35] <jnicol> what result do you get fire?
  409. [17:38:36] <firedrake969> That explains it.
  410. [17:38:38] <firedrake969> Same as them
  411. [17:38:47] <firedrake969> Just didn't notice the two unlocked bases
  412. [17:38:55] <Eli-Fisker> This all the variants of two unlocked bases
  413. [17:39:04] <firedrake969> Yeah
  414. [17:39:08] <Eli-Fisker> All the possible combos
  415. [17:39:17] <jnicol> correct 2 unlocked bases :)
  416. [17:39:33] <jnicol> there will be more :)
  417. [17:39:44] <jnicol> I also changed the calling of getNextSequence to be in its own loop (line 4)
  418. [17:40:06] <jnicol> Now I would like to display only the unlocked bases and not the entire sequence
  419. [17:40:10] <hoglahoo> I didn't realize the evaluation is so slow
  420. [17:40:27] <firedrake969> So we could return sq.substr
  421. [17:40:27] <firedrake969> ?
  422. [17:40:42] <jnicol> did you get a timeout hog?
  423. [17:40:48] <hoglahoo> no it's good.
  424. [17:41:08] <jnicol> mine ran in .009 seconds
  425. [17:41:19] <hoglahoo> I ran all 4
  426. [17:41:24] <firedrake969> 0.012
  427. [17:41:47] <Eli-Fisker> Hogla, ah
  428. [17:42:00] <jnicol> delete all previous code and copy the following lines into the scripting window:
  429. [17:42:05] <jnicol> locks = "xxxxxooxxx";
  430. [17:42:05] <jnicol> sequence = "GCGAAAACGC";
  431. [17:42:05] <jnicol> out("");
  432. [17:42:05] <jnicol> while (sequence != "done") {
  433. [17:42:05] <jnicol> displayUnlockedBases(sequence, locks);
  434. [17:42:05] <jnicol> outln("energy = 0 kcal");
  435. [17:42:05] <jnicol> sequence = getNextSequence(sequence, locks);
  436. [17:42:05] <jnicol> }
  437. [17:42:05] <jnicol> out("");
  438. [17:42:05] <jnicol> function displayUnlockedBases(sq, lk) {
  439. [17:42:06] <firedrake969> Oh, yeah
  440. [17:42:06] <jnicol> for (i=0; i<lk.length; i++) {
  441. [17:42:07] <jnicol> if (lk.substr(i,1) == "o") {
  442. [17:42:08] <jnicol> out(sq.substr(i,1));
  443. [17:42:09] <jnicol> }
  444. [17:42:10] <jnicol> }
  445. [17:42:11] <jnicol> out(", ");
  446. [17:42:12] <jnicol> }
  447. [17:42:13] <jnicol> out("");
  448. [17:42:14] <jnicol> function getNextSequence(sq, lk) {
  449. [17:42:15] <jnicol> i = lk.length;
  450. [17:42:16] <jnicol> while (--i > 0) {
  451. [17:42:17] <jnicol> if (lk.substr(i,1) == "o") {
  452. [17:42:17] <firedrake969> *facepalm* sorry
  453. [17:42:18] <jnicol> base = sq.substr(i,1);
  454. [17:42:19] <jnicol> sq = sq.substr(0,i) + getNextBase(base)
  455. [17:42:19] <jnicol> + sq.substr(i+1,sq.length-i);
  456. [17:42:21] <jnicol> if (base != "C") { return sq; }
  457. [17:42:22] <jnicol> }
  458. [17:42:23] <jnicol> }
  459. [17:42:24] <jnicol> return "done";
  460. [17:42:25] <jnicol> }
  461. [17:42:26] <jnicol> out("");
  462. [17:42:27] <jnicol> function getNextBase(b) {
  463. [17:42:28] <jnicol> if (b == "A") return "U";
  464. [17:42:29] <jnicol> if (b == "U") return "G";
  465. [17:42:30] <jnicol> if (b == "G") return "C";
  466. [17:42:30] <jnicol> looks like it got cut
  467. [17:42:30] <jnicol> return "A";
  468. [17:42:33] <jnicol> }
  469. [17:42:33] <jnicol> out("");
  470. [17:42:34] <jnicol> return true;
  471. [17:42:49] <jnicol> hello?
  472. [17:42:59] <hoglahoo> uh oh.
  473. [17:43:12] <machinelves> cut off at: for (i=0; i
  474. [17:43:14] <hoglahoo> i< doesn't work
  475. [17:43:18] <jnicol> did anyone else lose chat?
  476. [17:43:28] <hoglahoo> the < buggers the chat, john
  477. [17:43:44] <firedrake969> Chat broke
  478. [17:43:47] <hoglahoo> eterna is looking for code
  479. [17:43:56] <firedrake969> chat broke for me, yayz
  480. [17:44:00] <jnicol> I cant type in chat anymore
  481. [17:44:07] <firedrake969> chat broke for me
  482. [17:44:08] <JohnDoe1> Linkbot, activate self destruct code 1A-2B-3.
  483. [17:44:08] <hoglahoo> refresh the page I guess
  484. [17:44:10] <firedrake969> ...
  485. [17:44:24] <firedrake969> chat broke
  486. [17:44:29] <firedrake969> can anybody see this?
  487. [17:44:43] <hoglahoo> we need to clear out the 20-line history, then refresh will work
  488. [17:44:53] <hoglahoo> need about 7 more I think
  489. [17:44:54] <hoglahoo> 6
  490. [17:44:54] <hoglahoo> 5
  491. [17:44:54] <hoglahoo> 4
  492. [17:44:55] <hoglahoo> 3
  493. [17:44:56] <hoglahoo> 2
  494. [17:44:56] <hoglahoo> 1
  495. [17:45:03] <hoglahoo> test
  496. [17:45:11] <hoglahoo> test
  497. [17:45:12] <hoglahoo> tes
  498. [17:45:13] <hoglahoo> test
  499. [17:45:14] <firedrake969> If somebody can read this, comment on the latest player puzzle :L
  500. [17:45:19] <Eli-Fisker> Did chat break?
  501. [17:45:20] <hoglahoo> there
  502. [17:45:21] <firedrake969> The chat's completely broken for me
  503. [17:45:29] <hoglahoo> should be fine now if folks refresh
  504. [17:45:39] <JohnDoe1> Linkbot, activate self-destruct code: 1A-2B-3
  505. [17:45:55] <jnicol> I'm back
  506. [17:46:03] <machinelves> *poof*
  507. [17:46:13] <jnicol> should we try that again?
  508. [17:46:19] <machinelves> yes please!
  509. [17:46:19] <firedrake969> chat fixed
  510. [17:46:20] <hoglahoo> no
  511. [17:46:24] <jnicol> in pieces?
  512. [17:46:25] <firedrake969> yay
  513. [17:46:29] <hoglahoo> the left arrow needs to be escaped
  514. [17:46:35] <firedrake969> I had to completely clear all eterna cookies
  515. [17:46:36] <hoglahoo> less than symbol
  516. [17:46:44] <hoglahoo> if you paste from client anyway
  517. [17:47:00] <jnicol> whats the escape key?
  518. [17:47:21] <firedrake969> Can you rewrite the script?
  519. [17:47:37] <hoglahoo> one sec &lt;
  520. [17:47:38] <JohnDoe1> upper left hand corner
  521. [17:47:47] <jnicol> I can prefix the left arrow
  522. [17:48:05] <hoglahoo> &lt;
  523. [17:48:27] <firedrake969> &lt;
  524. [17:48:28] <firedrake969> ?
  525. [17:48:38] <JohnDoe1> Unplug and plug back in!
  526. [17:48:40] <hoglahoo> hopefully John will see it
  527. [17:49:06] <hoglahoo> come back John :)
  528. [17:49:10] <hoglahoo> lol
  529. [17:49:15] <jnicol> hello
  530. [17:49:25] <firedrake969> Hi
  531. [17:49:29] <hoglahoo> use the ascii &lt;
  532. [17:49:35] <JohnDoe1> Who, me?
  533. [17:49:50] <JohnDoe1> 1011001011010100101101
  534. [17:49:51] <firedrake969> jnicol
  535. [17:50:03] <jnicol> I'm replacing the arrows now, hold on
  536. [17:50:55] <firedrake969> Ok
  537. [17:52:14] <JohnDoe1> ←↑→↓
  538. [17:52:36] <machinelves> hey, i have to go, jnicol thank you so much! i look forward to seeing the rest of this class later, and i really like your patient teaching style! hope you all have a good day :)
  539. [17:52:44] <hoglahoo> machinelves: see you later
  540. [17:52:55] <Eli-Fisker> Bye Machine, see you
  541. [17:52:58] <machinelves> bye! :D
  542. [17:52:59] <jnicol> ok, I'm going to try to copy this again, cross your fingers
  543. [17:53:03] <firedrake969> Ok
  544. [17:53:05] <mat747> bye machine
  545. [17:53:08] <hoglahoo> wait a moment
  546. [17:53:09] <jnicol> bye machine
  547. [17:53:11] <firedrake969> ?
  548. [17:53:19] <hoglahoo> if chat stalls for you folks, just wait about 20 seconds and reload the page
  549. [17:53:19] <jnicol> waiting
  550. [17:53:23] <hoglahoo> ok continue :)
  551. [17:53:33] <JohnDoe1> ↑↑↓↓↔↔BA Enter
  552. [17:53:40] <jnicol> locks = "xxxxxooxxx";
  553. [17:53:41] <jnicol> sequence = "GCGAAAACGC";
  554. [17:53:41] <jnicol> out("");
  555. [17:53:41] <jnicol> while (sequence != "done") {
  556. [17:53:41] <jnicol> displayUnlockedBases(sequence, locks);
  557. [17:53:41] <jnicol> outln("energy = 0 kcal");
  558. [17:53:41] <jnicol> sequence = getNextSequence(sequence, locks);
  559. [17:53:41] <jnicol> }
  560. [17:53:41] <jnicol> out("");
  561. [17:53:41] <jnicol> function displayUnlockedBases(sq, lk) {
  562. [17:53:41] <jnicol> for (i=0; i<lk.length; i++) {
  563. [17:53:42] <jnicol> if (lk.substr(i,1) == "o") {
  564. [17:53:43] <jnicol> out(sq.substr(i,1));
  565. [17:53:44] <jnicol> }
  566. [17:53:45] <jnicol> }
  567. [17:53:46] <jnicol> out(", ");
  568. [17:53:46] <jnicol> }
  569. [17:53:47] <jnicol> out("");
  570. [17:53:48] <jnicol> function getNextSequence(sq, lk) {
  571. [17:53:49] <jnicol> i = lk.length;
  572. [17:53:51] <jnicol> while (--i > 0) {
  573. [17:53:51] <firedrake969> stalled again
  574. [17:53:52] <jnicol> if (lk.substr(i,1) == "o") {
  575. [17:53:52] <jnicol> base = sq.substr(i,1);
  576. [17:53:55] <jnicol> sq = sq.substr(0,i) + getNextBase(base)
  577. [17:53:55] <jnicol> + sq.substr(i+1,sq.length-i);
  578. [17:53:56] <jnicol> if (base != "C") { return sq; }
  579. [17:53:57] <jnicol> }
  580. [17:53:57] <jnicol> }
  581. [17:53:58] <jnicol> return "done";
  582. [17:53:59] <jnicol> }
  583. [17:54:01] <hoglahoo> you pasted the arrow again
  584. [17:54:02] <jnicol> out("");
  585. [17:54:02] <jnicol> function getNextBase(b) {
  586. [17:54:03] <jnicol> if (b == "A") return "U";
  587. [17:54:04] <jnicol> if (b == "U") return "G";
  588. [17:54:05] <jnicol> if (b == "G") return "C";
  589. [17:54:05] <jnicol> return "A";
  590. [17:54:06] <jnicol> }
  591. [17:54:07] <jnicol> out("");
  592. [17:54:08] <jnicol> return true;
  593. [17:55:04] <JohnDoe1> We need Linkbot for this job.
  594. [17:55:12] <jnicol> hello
  595. [17:55:19] <Eli-Fisker> hi
  596. [17:55:26] <firedrake969> back
  597. [17:55:29] <TomoeUzumaki> hello
  598. [17:55:59] <jnicol> locks = "xxxxxooxxx";
  599. [17:56:00] <jnicol> sequence = "GCGAAAACGC";
  600. [17:56:00] <jnicol> out("");
  601. [17:56:00] <jnicol> while (sequence != "done") {
  602. [17:56:00] <jnicol> displayUnlockedBases(sequence, locks);
  603. [17:56:01] <jnicol> outln("energy = 0 kcal");
  604. [17:56:01] <jnicol> sequence = getNextSequence(sequence, locks);
  605. [17:56:01] <jnicol> }
  606. [17:56:01] <jnicol> out("");
  607. [17:56:01] <jnicol> function displayUnlockedBases(sq, lk) {
  608. [17:56:01] <jnicol> for (i=0; i&lt;lk.length; i++) {
  609. [17:56:01] <jnicol> if (lk.substr(i,1) == "o") {
  610. [17:56:02] <jnicol> out(sq.substr(i,1));
  611. [17:56:03] <jnicol> }
  612. [17:56:03] <jnicol> }
  613. [17:56:05] <jnicol> out(", ");
  614. [17:56:06] <jnicol> }
  615. [17:56:06] <jnicol> out("");
  616. [17:56:08] <jnicol> function getNextSequence(sq, lk) {
  617. [17:56:08] <jnicol> i = lk.length;
  618. [17:56:09] <jnicol> while (--i > 0) {
  619. [17:56:10] <jnicol> if (lk.substr(i,1) == "o") {
  620. [17:56:11] <jnicol> base = sq.substr(i,1);
  621. [17:56:13] <jnicol> sq = sq.substr(0,i) + getNextBase(base)
  622. [17:56:13] <jnicol> + sq.substr(i+1,sq.length-i);
  623. [17:56:14] <jnicol> if (base != "C") { return sq; }
  624. [17:56:17] <jnicol> }
  625. [17:56:17] <jnicol> }
  626. [17:56:18] <jnicol> return "done";
  627. [17:56:18] <jnicol> }
  628. [17:56:19] <jnicol> out("");
  629. [17:56:21] <jnicol> function getNextBase(b) {
  630. [17:56:22] <jnicol> if (b == "A") return "U";
  631. [17:56:23] <jnicol> if (b == "U") return "G";
  632. [17:56:24] <jnicol> if (b == "G") return "C";
  633. [17:56:25] <jnicol> return "A";
  634. [17:56:26] <jnicol> }
  635. [17:56:27] <jnicol> out("");
  636. [17:56:28] <jnicol> return true;
  637. [17:56:42] <jnicol> wow, that was painful
  638. [17:56:55] <hoglahoo> yay
  639. [17:58:04] <jnicol> everyone get that?
  640. [17:58:04] <Eli-Fisker> http://prntscr.com/2s96l8
  641. [17:58:08] <Eli-Fisker> Got output
  642. [17:58:22] <JohnDoe1> while (--i &gt; 0) { if (lk.substr(i,1) == "o") { base = sq.substr(i,1); sq = sq.substr(0,i) + getNextBase(base) + sq.substr(i+1,sq.length-i); if (base != "C") { return sq; } } } return "done"; } out(""); function getNextBase(b) { if (b == "A") return "U"; if (b == "U") return "G"; if (b == "G") return "C"; return "A"; } out(""); return true;
  643. [17:58:29] <jnicol> thats what you should get eli :)
  644. [17:58:34] <Eli-Fisker> :)
  645. [17:58:38] <Eli-Fisker> Two bases
  646. [17:58:39] <Eli-Fisker> shown
  647. [17:58:45] <JohnDoe1> :D
  648. [17:58:52] <Eli-Fisker> In all combos
  649. [17:59:00] <jnicol> Notice that in displayUnlockedBases, we are checking each base the same way we did in getNextSequence.
  650. [17:59:12] <jnicol> We now only display a base if it is unlocked (lines 12 and 13)
  651. [17:59:13] <firedrake969> That was quite painful.
  652. [17:59:19] <JohnDoe1> What's going on?
  653. [17:59:26] <jnicol> Also, in line 6, I added a placeholder for where we eventually want to calculate the energy of the sequence.
  654. [17:59:39] <jnicol> John, javascript class
  655. [18:00:03] <jnicol> But first, I am a little concerned that the sequence I chose will not fold properly for all the combinations we need to test.
  656. [18:00:13] <JohnDoe1> WHAT is going on?!
  657. [18:00:32] <jnicol> this is a class to learn about javascript
  658. [18:00:42] <jnicol> Fortunately the developers have provided a library function, fold, that will tell us if the sequence folds properly.
  659. [18:00:45] <JohnDoe1> in the chat?
  660. [18:00:56] <jnicol> yup
  661. [18:01:00] <Eli-Fisker> Yes
  662. [18:01:13] <jnicol> Lib.fold(sequence) takes the sequence as an input and returns the natural fold structure.
  663. [18:01:23] <jnicol> Then we compare this natural fold to what we want as the target fold, and hopefully they match!
  664. [18:01:26] <firedrake969> So would we compare it
  665. [18:01:29] <firedrake969> oh you typed faster :P
  666. [18:01:41] <jnicol> delete all previous code and copy the following lines into the scripting window:
  667. [18:01:51] <biggestlegoheroicafanever> Hello people of Planet EteRNA
  668. [18:01:56] <firedrake969> shh
  669. [18:02:00] <JohnDoe1> {Ask question }
  670. [18:02:02] <firedrake969> or it'll freeze again
  671. [18:02:25] <jnicol> locks = "xxxxxooxxx";
  672. [18:02:25] <jnicol> sequence = "GCGAAAACGC";
  673. [18:02:25] <jnicol> structure = "(((....)))";
  674. [18:02:25] <jnicol> out("");
  675. [18:02:25] <jnicol> while (sequence != "done") {
  676. [18:02:25] <jnicol> displayUnlockedBases(sequence, locks);
  677. [18:02:25] <jnicol> if (Lib.fold(sequence) != structure) {
  678. [18:02:25] <jnicol> outln("misfold :(");
  679. [18:02:25] <jnicol> } else {
  680. [18:02:25] <jnicol> outln("energy = 0 kcal");
  681. [18:02:25] <jnicol> }
  682. [18:02:27] <jnicol> sequence = getNextSequence(sequence, locks);
  683. [18:02:27] <jnicol> }
  684. [18:02:30] <jnicol> out("");
  685. [18:02:30] <jnicol> function displayUnlockedBases(sq, lk) {
  686. [18:02:31] <jnicol> for (i=0; i&lt;lk.length; i++) {
  687. [18:02:32] <jnicol> if (lk.substr(i,1) == "o") {
  688. [18:02:33] <jnicol> out(sq.substr(i,1));
  689. [18:02:34] <jnicol> }
  690. [18:02:35] <jnicol> }
  691. [18:02:36] <jnicol> out(", ");
  692. [18:02:37] <jnicol> }
  693. [18:02:38] <jnicol> out("");
  694. [18:02:39] <jnicol> function getNextSequence(sq, lk) {
  695. [18:02:40] <jnicol> i = lk.length;
  696. [18:02:41] <jnicol> while (--i > 0) {
  697. [18:02:42] <jnicol> if (lk.substr(i,1) == "o") {
  698. [18:02:43] <jnicol> base = sq.substr(i,1);
  699. [18:02:43] <jnicol> sq = sq.substr(0,i) + getNextBase(base)
  700. [18:02:44] <jnicol> + sq.substr(i+1,sq.length-i);
  701. [18:02:46] <jnicol> if (base != "C") { return sq; }
  702. [18:02:47] <jnicol> }
  703. [18:02:48] <jnicol> }
  704. [18:02:49] <jnicol> return "done";
  705. [18:02:50] <jnicol> }
  706. [18:02:51] <jnicol> out("");
  707. [18:02:52] <jnicol> function getNextBase(b) {
  708. [18:02:53] <jnicol> if (b == "A") return "U";
  709. [18:02:54] <jnicol> if (b == "U") return "G";
  710. [18:02:55] <jnicol> if (b == "G") return "C";
  711. [18:02:56] <jnicol> return "A";
  712. [18:02:57] <jnicol> }
  713. [18:02:58] <jnicol> out("");
  714. [18:02:59] <jnicol> return true;
  715. [18:03:12] <jnicol> Notice that line 7 compares the natural fold to our desired target fold.
  716. [18:03:14] <firedrake969> Is it done?
  717. [18:03:26] <jnicol> yes
  718. [18:03:26] <hoglahoo> I got a sadface output
  719. [18:03:42] <Eli-Fisker> haha. me too
  720. [18:03:43] <firedrake969> because it's a misfold
  721. [18:03:55] <Eli-Fisker> It is intended
  722. [18:03:58] <JohnDoe1> what are you coding?
  723. [18:03:59] <Eli-Fisker> :)
  724. [18:04:07] <Eli-Fisker> Nice detail, John
  725. [18:04:20] <jnicol> for AG and GG there are misfolds :(
  726. [18:04:31] <firedrake969> and CG
  727. [18:04:35] <JohnDoe1> where is this?
  728. [18:04:43] <jnicol> Unfortunately, not all of the sequences folds as we would like.
  729. [18:05:04] <jnicol> John, you can go to http://eterna.cmu.edu/web/script/create/
  730. [18:05:14] <firedrake969> yayz
  731. [18:05:17] <jnicol> and copy the code into the scripting window
  732. [18:05:23] <firedrake969> out(Lib.energyOfStruct(sequence,structure));
  733. [18:05:34] <firedrake969> Add that right below outln("energy = )";
  734. [18:05:39] <firedrake969> and remove the 0 kcal
  735. [18:05:41] <jnicol> So, an easy way to fix this is to select a sequence with a longer stem to prevent misfolds.
  736. [18:05:56] <jnicol> and lets also test all 256 combinations in the tetraloop
  737. [18:06:38] <jnicol> delete all previous code and copy the following lines into the scripting window:
  738. [18:06:45] <JohnDoe1> how do I load in what youre working on?
  739. [18:06:54] <jnicol> outln("GC closing tetraloops");
  740. [18:06:55] <jnicol> sequence = "CGCUGAAAACAGCG";
  741. [18:06:55] <jnicol> structure = "(((((....)))))";
  742. [18:06:55] <jnicol> locks = "xxxxxooooxxxxx";
  743. [18:06:55] <jnicol> out("");
  744. [18:06:55] <jnicol> while (sequence != "done") {
  745. [18:06:55] <jnicol> displayUnlockedBases(sequence, locks);
  746. [18:06:55] <jnicol> if (Lib.fold(sequence) != structure) {
  747. [18:06:55] <jnicol> outln("misfold :(");
  748. [18:06:55] <jnicol> } else {
  749. [18:06:55] <jnicol> outln("energy = 0 kcal");
  750. [18:06:56] <jnicol> }
  751. [18:06:57] <jnicol> sequence = getNextSequence(sequence, locks);
  752. [18:06:58] <jnicol> }
  753. [18:06:58] <jnicol> out("");
  754. [18:07:00] <jnicol> function displayUnlockedBases(sq, lk) {
  755. [18:07:01] <jnicol> for (i=0; i&lt;lk.length; i++) {
  756. [18:07:02] <jnicol> if (lk.substr(i,1) == "o") {
  757. [18:07:03] <jnicol> out(sq.substr(i,1));
  758. [18:07:04] <jnicol> }
  759. [18:07:05] <jnicol> }
  760. [18:07:05] <jnicol> out(", ");
  761. [18:07:08] <jnicol> }
  762. [18:07:08] <jnicol> out("");
  763. [18:07:09] <jnicol> function getNextSequence(sq, lk) {
  764. [18:07:10] <jnicol> i = lk.length;
  765. [18:07:11] <jnicol> while (--i > 0) {
  766. [18:07:12] <jnicol> if (lk.substr(i,1) == "o") {
  767. [18:07:13] <jnicol> base = sq.substr(i,1);
  768. [18:07:14] <jnicol> sq = sq.substr(0,i) + getNextBase(base)
  769. [18:07:15] <jnicol> + sq.substr(i+1,sq.length-i);
  770. [18:07:16] <jnicol> if (base != "C") { return sq; }
  771. [18:07:17] <jnicol> }
  772. [18:07:18] <jnicol> }
  773. [18:07:19] <jnicol> return "done";
  774. [18:07:20] <jnicol> }
  775. [18:07:20] <jnicol> out("");
  776. [18:07:22] <jnicol> function getNextBase(b) {
  777. [18:07:23] <jnicol> if (b == "A") return "U";
  778. [18:07:24] <jnicol> if (b == "U") return "G";
  779. [18:07:25] <jnicol> if (b == "G") return "C";
  780. [18:07:25] <jnicol> return "A";
  781. [18:07:27] <jnicol> }
  782. [18:07:28] <jnicol> out("");
  783. [18:07:29] <jnicol> return true;
  784. [18:07:35] <jnicol> ok
  785. [18:08:09] <jnicol> John, are you able to copy this code into the scripting window?
  786. [18:08:31] <jnicol> did everyone run the code?
  787. [18:08:36] <Eli-Fisker> yes
  788. [18:08:37] <hoglahoo> I got a sadface army
  789. [18:08:37] <firedrake969> it's running
  790. [18:08:47] <jnicol> really hog??
  791. [18:08:55] <hoglahoo> yeah
  792. [18:09:00] <firedrake969> I got none
  793. [18:09:03] <Eli-Fisker> I got a ton of 0 KCal output
  794. [18:09:05] <hoglahoo> hmm
  795. [18:09:09] <hoglahoo> maybe I miscopied.
  796. [18:09:13] <firedrake969> same
  797. [18:09:15] <firedrake969> well that's hardcoded
  798. [18:09:20] <jnicol> 0 kcal yes, but should be no sad faces
  799. [18:09:43] <Eli-Fisker> http://prntscr.com/2s9aal
  800. [18:09:53] <jnicol> sad face only displays if there is a misfold
  801. [18:10:16] <jnicol> that is the correct output eli
  802. [18:10:17] <hoglahoo> recopied and pasted into a blank script, same result
  803. [18:10:37] <hoglahoo> maybe will try IE.
  804. [18:10:42] <JohnDoe1> copied
  805. [18:10:46] <firedrake969> Internet Exploder?
  806. [18:10:56] <jnicol> didnt you have a problem with the library call last time also hog?
  807. [18:10:57] <Eli-Fisker> lol, Fire
  808. [18:10:58] <hoglahoo> yeah my script failed in FF before for some reason
  809. [18:10:59] <hoglahoo> yes I did
  810. [18:11:30] <hoglahoo> works a treat in IE
  811. [18:11:41] <jnicol> Good, looks like this is a good sequence to prevent misfolds for all GC closing tetraloops!
  812. [18:11:41] <hoglahoo> oh, object doesn't suppor tthis property or method. weird
  813. [18:11:49] <hoglahoo> hehe
  814. [18:11:54] <jnicol> :)
  815. [18:12:03] <jnicol> Did anyone hit a timeout after clicking Evaluate?
  816. [18:12:07] <firedrake969> in javascript, how do you attack strings to each other?
  817. [18:12:16] <jnicol> Since this code is getting longer, the timeout should be set to higher value.
  818. [18:12:21] <firedrake969> me by like .057 sec
  819. [18:12:26] <jnicol> Setting the timeout to 60 should be good for the rest of this class.
  820. [18:12:40] <jnicol> Now its time to actually calculate the energy for each tetraloop.
  821. [18:12:51] <jnicol> The library call energyOfStruct returns the total energy of the sequence.
  822. [18:13:24] <jnicol> which we used in the preious class
  823. [18:13:24] <firedrake969> Ok
  824. [18:13:24] <jnicol> Lets display the total energy first, then later we will change this to display only the energy of the loop.
  825. [18:13:29] <hoglahoo> ah
  826. [18:13:29] <firedrake969> Can I see if I know a way to?
  827. [18:14:01] <JohnDoe1> GC closing tetraloopsAAAA, energy = 0 kcalAAAU, energy = 0 kcalAAAG, energy = 0 kcalAAAC, energy = 0 kcalAAUA, energy = 0 kcalAAUU, energy = 0 kcalAAUG, energy = 0 kcalAAUC, energy = 0 kcalAAGA, energy = 0 kcalAAGU, energy = 0 kcalAAGG, energy = 0 kcalAAGC, energy = 0 kcalAACA, energy = 0 kcalAACU, energy = 0 kcalAACG, energy = 0 kcalAACC, energy = 0 kcalAUAA, energy =
  828. [18:14:12] <jnicol> delete all previous code and copy the following lines into the scripting window:
  829. [18:14:19] <jnicol> outln("GC closing tetraloops");
  830. [18:14:19] <jnicol> sequence = "CGCUGAAAACAGCG";
  831. [18:14:19] <jnicol> structure = "(((((....)))))";
  832. [18:14:19] <jnicol> locks = "xxxxxooooxxxxx";
  833. [18:14:19] <jnicol> out("");
  834. [18:14:19] <jnicol> while (sequence != "done") {
  835. [18:14:19] <jnicol> displayUnlockedBases(sequence, locks);
  836. [18:14:19] <jnicol> if (Lib.fold(sequence) != structure) {
  837. [18:14:19] <jnicol> outln("misfold :(");
  838. [18:14:19] <jnicol> } else {
  839. [18:14:21] <jnicol> energy = Lib.energyOfStruct(sequence, structure);
  840. [18:14:22] <jnicol> out("total energy = ");
  841. [18:14:22] <jnicol> outln(energy.toFixed(2));
  842. [18:14:23] <jnicol> }
  843. [18:14:24] <jnicol> sequence = getNextSequence(sequence, locks);
  844. [18:14:25] <jnicol> }
  845. [18:14:26] <jnicol> out("");
  846. [18:14:27] <jnicol> function displayUnlockedBases(sq, lk) {
  847. [18:14:28] <jnicol> for (i=0; i&lt;lk.length; i++) {
  848. [18:14:29] <jnicol> if (lk.substr(i,1) == "o") {
  849. [18:14:30] <jnicol> out(sq.substr(i,1));
  850. [18:14:31] <jnicol> }
  851. [18:14:32] <jnicol> }
  852. [18:14:33] <jnicol> out(", ");
  853. [18:14:34] <jnicol> }
  854. [18:14:35] <jnicol> out("");
  855. [18:14:36] <jnicol> function getNextSequence(sq, lk) {
  856. [18:14:37] <jnicol> i = lk.length;
  857. [18:14:38] <jnicol> while (--i > 0) {
  858. [18:14:39] <jnicol> if (lk.substr(i,1) == "o") {
  859. [18:14:40] <jnicol> base = sq.substr(i,1);
  860. [18:14:41] <jnicol> sq = sq.substr(0,i) + getNextBase(base)
  861. [18:14:42] <jnicol> + sq.substr(i+1,sq.length-i);
  862. [18:14:43] <jnicol> if (base != "C") { return sq; }
  863. [18:14:44] <jnicol> }
  864. [18:14:44] <jnicol> }
  865. [18:14:45] <jnicol> return "done";
  866. [18:14:47] <jnicol> }
  867. [18:14:48] <jnicol> out("");
  868. [18:14:49] <jnicol> function getNextBase(b) {
  869. [18:14:50] <jnicol> if (b == "A") return "U";
  870. [18:14:51] <jnicol> if (b == "U") return "G";
  871. [18:14:52] <jnicol> if (b == "G") return "C";
  872. [18:14:53] <jnicol> return "A";
  873. [18:14:54] <jnicol> }
  874. [18:14:55] <jnicol> out("");
  875. [18:14:56] <jnicol> return true;
  876. [18:14:59] <jnicol> ok
  877. [18:15:15] <jnicol> Good! Notice that line 11 has been added to get the energy of the sequence.
  878. [18:15:27] <firedrake969> So what does it do?
  879. [18:15:53] <firedrake969> the toFixed
  880. [18:16:01] <jnicol> that is the mfe, (energy) that each sequence folds to
  881. [18:16:17] <jnicol> if you go to puzzlemaker and put in each sequence
  882. [18:16:18] <firedrake969> So what does energy.toFixed(2) do to the energy?
  883. [18:16:31] <jnicol> that is the energy that will display in the energy box
  884. [18:17:00] <jnicol> javascript is bad at rounding floating point numbers
  885. [18:17:04] <hoglahoo> seems to work when I'm logged in as opposed to not logged in, with IE
  886. [18:17:04] <firedrake969> So it rounds to the hundredth
  887. [18:17:05] <firedrake969> ?
  888. [18:17:09] <jnicol> so toFixed rounds it to 2 decimals
  889. [18:17:16] <firedrake969> And I have a suggestion
  890. [18:17:28] <firedrake969> You set a task, we work on it for ~5 minutes, and then you show the code
  891. [18:17:54] <jnicol> thats a good class for next time, thanks!
  892. [18:18:17] <jnicol> The method I used to calculate each loop energy was to find the loop energy when all unlocked bases are set to A.
  893. [18:18:24] <jnicol> and use that loop energy as a starting point reference to calculate all other tetraloop energies.
  894. [18:18:27] <firedrake969> So that we can try what we've learned
  895. [18:18:33] <jnicol> So for a GC closing pair with all tetraloop bases set to A, the loop energy is 4.5 kcal.
  896. [18:19:05] <hoglahoo> did that last one take anyone else 161 seconds to evaluate :P
  897. [18:19:15] <firedrake969> No :P
  898. [18:19:19] <firedrake969> Like I said, Internet Exploder :3
  899. [18:19:39] <jnicol> 6 seconds for me
  900. [18:19:55] <Eli-Fisker> Around 10 for me
  901. [18:20:00] <hoglahoo> lawl.
  902. [18:20:03] <firedrake969> 15 for me\
  903. [18:20:08] <firedrake969> Cool
  904. [18:20:22] <hoglahoo> oh well, at least it ran. or walked, as the case may have been
  905. [18:20:25] <firedrake969> I found a way to compare the energies from all As to the various ones
  906. [18:20:30] <firedrake969> firstEnergy = Lib.energyOfStruct(sequence,structure);
  907. [18:20:35] <firedrake969> energy = (Lib.energyOfStruct(sequence, structure)) - firstEnergy;
  908. [18:20:50] <firedrake969> Add the first one below line 4, and the second one at line 12.
  909. [18:21:06] <firedrake969> The first is an addition, the second a replacement
  910. [18:21:18] <jnicol> thats exactly what we are going to do next fire!
  911. [18:21:24] <firedrake969> lol
  912. [18:21:24] <hoglahoo> oo clap clap
  913. [18:21:28] <firedrake969> thanks
  914. [18:21:44] <jnicol> delete all previous code and copy the following lines into the scripting window:
  915. [18:22:00] <jnicol> outln("GC closing tetraloops");
  916. [18:22:01] <jnicol> sequence = "CGCUGAAAACAGCG";
  917. [18:22:01] <jnicol> structure = "(((((....)))))";
  918. [18:22:01] <jnicol> locks = "xxxxxooooxxxxx";
  919. [18:22:01] <jnicol> loopenergy = 4.5;
  920. [18:22:01] <jnicol> out("");
  921. [18:22:01] <jnicol> ref_energy = Lib.energyOfStruct(sequence, structure) - loopenergy;
  922. [18:22:01] <jnicol> while (sequence != "done") {
  923. [18:22:01] <jnicol> displayUnlockedBases(sequence, locks);
  924. [18:22:01] <jnicol> if (Lib.fold(sequence) != structure) {
  925. [18:22:01] <jnicol> outln("misfold :(");
  926. [18:22:02] <jnicol> } else {
  927. [18:22:03] <jnicol> energy = Lib.energyOfStruct(sequence, structure) - ref_energy;
  928. [18:22:04] <jnicol> out("loop energy = ");
  929. [18:22:05] <jnicol> outln(energy.toFixed(2));
  930. [18:22:06] <jnicol> }
  931. [18:22:07] <jnicol> sequence = getNextSequence(sequence, locks);
  932. [18:22:08] <jnicol> }
  933. [18:22:09] <jnicol> out("");
  934. [18:22:10] <jnicol> function displayUnlockedBases(sq, lk) {
  935. [18:22:11] <jnicol> for (i=0; i&lt;lk.length; i++) {
  936. [18:22:12] <jnicol> if (lk.substr(i,1) == "o") {
  937. [18:22:13] <jnicol> out(sq.substr(i,1));
  938. [18:22:14] <jnicol> }
  939. [18:22:15] <jnicol> }
  940. [18:22:15] <jnicol> out(", ");
  941. [18:22:18] <jnicol> }
  942. [18:22:18] <jnicol> out("");
  943. [18:22:19] <jnicol> function getNextSequence(sq, lk) {
  944. [18:22:20] <jnicol> i = lk.length;
  945. [18:22:21] <jnicol> while (--i > 0) {
  946. [18:22:22] <jnicol> if (lk.substr(i,1) == "o") {
  947. [18:22:23] <jnicol> base = sq.substr(i,1);
  948. [18:22:24] <jnicol> sq = sq.substr(0,i) + getNextBase(base)
  949. [18:22:25] <jnicol> + sq.substr(i+1,sq.length-i);
  950. [18:22:26] <jnicol> if (base != "C") { return sq; }
  951. [18:22:27] <jnicol> }
  952. [18:22:28] <jnicol> }
  953. [18:22:29] <jnicol> return "done";
  954. [18:22:30] <jnicol> }
  955. [18:22:31] <jnicol> out("");
  956. [18:22:32] <jnicol> function getNextBase(b) {
  957. [18:22:32] <jnicol> if (b == "A") return "U";
  958. [18:22:33] <jnicol> if (b == "U") return "G";
  959. [18:22:36] <jnicol> if (b == "G") return "C";
  960. [18:22:36] <jnicol> return "A";
  961. [18:22:37] <jnicol> }
  962. [18:22:38] <jnicol> out("");
  963. [18:22:39] <jnicol> return true;
  964. [18:22:44] <jnicol> ok
  965. [18:23:24] <jnicol> just like fire said, we are calculting a reference enrgy and using that to subtract from the total energy to get each loop energy
  966. [18:24:00] <jnicol> Line 7 calculates the reference energy, which is just the energy of the stem pairs.
  967. [18:24:00] <jnicol> In line 13, we subtract out the stem pair energy and are left with the energy of the loop.
  968. [18:24:00] <JohnDoe1> how do yuo use this?
  969. [18:24:17] <jnicol> copy the code into the scripting window, John :)
  970. [18:24:18] <firedrake969> I just added an easier, text-based way to see whether energy raised, lowered, or didn't change
  971. [18:24:53] <jnicol> This is finally what we want to see, each combination of the tetraloop, and the energy of that loop!
  972. [18:24:56] <firedrake969> It's a three-way if/else if/else check
  973. [18:25:04] <jnicol> did it work for everyone?
  974. [18:25:10] <firedrake969> if (energy &lt; 0) { outln("Energy is lower!"); } else if (energy &gt; 0) { outln("Energy is higher!"); } else { outln("Energy didn't change!"); }
  975. [18:25:12] <Eli-Fisker> yes, here
  976. [18:25:14] <hoglahoo> still evaluating.
  977. [18:25:27] <firedrake969> If you copy/paste that, it's cool :3
  978. [18:25:27] <jnicol> we'll wait for you :)
  979. [18:25:28] <mat747> yes
  980. [18:25:41] <firedrake969> It tells you via text whether energy raised, lowered, or didn't change
  981. [18:25:47] <hoglahoo> done
  982. [18:26:10] <jnicol> thats a goodexercise fire, helps to understand the code and functions better
  983. [18:26:14] <hoglahoo> so, everything lower than 4.5 is a boost sequence, and everything higher is a what
  984. [18:26:17] <Eli-Fisker> Fire where do you add it?
  985. [18:26:24] <jnicol> bust?
  986. [18:26:28] <hoglahoo> nice
  987. [18:26:40] <jnicol> I would like to make one more update to the code to show how it can be used for also displaying internal loops.
  988. [18:26:50] <jnicol> delete all previous code and copy the following lines into the scripting window:
  989. [18:27:15] <firedrake969> @Eli inside the else, right under outln(energy.toFixed(2));
  990. [18:27:22] <Eli-Fisker> Thx Fire
  991. [18:27:26] <JohnDoe1> I'm gonna do [Unsolvable] Possibly unsolvable series 3 - HgcG RNA . 0 solved 1200reward 28 Feb 2011 jeehyung
  992. [18:27:41] <firedrake969> It's impossible, John.
  993. [18:27:45] <firedrake969> np, Eli
  994. [18:28:02] <jnicol> sorry, needed to remove some comments, so it didnt break chat
  995. [18:28:29] <jnicol> here we go
  996. [18:28:32] <jnicol> outln("GC closing tetraloops");
  997. [18:28:32] <jnicol> sequence = "CGCUGAAAACAGCG";
  998. [18:28:32] <jnicol> structure = "(((((....)))))";
  999. [18:28:32] <jnicol> locks = "xxxxxooooxxxxx";
  1000. [18:28:32] <jnicol> loopenergy = 4.5;
  1001. [18:28:32] <jnicol> displayEnergy(sequence, structure, locks, loopenergy);
  1002. [18:28:32] <jnicol> out("");
  1003. [18:28:32] <jnicol> outln("AU closing tetraloops");
  1004. [18:28:32] <jnicol> sequence = "CGCUAAAAAUAGCG";
  1005. [18:28:32] <jnicol> structure = "(((((....)))))";
  1006. [18:28:32] <jnicol> locks = "xxxxxooooxxxxx";
  1007. [18:28:32] <JohnDoe1> who cares about impossibility, RNASSD did it
  1008. [18:28:35] <jnicol> loopenergy = 5.3;
  1009. [18:28:35] <jnicol> displayEnergy(sequence, structure, locks, loopenergy);
  1010. [18:28:36] <jnicol> out("");
  1011. [18:28:37] <jnicol> outln("AU-AU closing for 1-1 loops");
  1012. [18:28:38] <jnicol> sequence = "GCAAAGCGAAAGCUAUGC";
  1013. [18:28:39] <jnicol> structure = "(((.(((....))).)))";
  1014. [18:28:40] <jnicol> locks = "xxxoxxxxxxxxxxoxxx";
  1015. [18:28:40] <jnicol> loopenergy = 1.7;
  1016. [18:28:41] <jnicol> displayEnergy(sequence, structure, locks, loopenergy);
  1017. [18:28:42] <jnicol> out("");
  1018. [18:28:43] <jnicol> function displayEnergy(seq, struc, lck, eng) {
  1019. [18:28:45] <jnicol> ref_energy = Lib.energyOfStruct(seq, struc) - eng;
  1020. [18:28:46] <jnicol> while (seq != "done") {
  1021. [18:28:47] <jnicol> displayUnlockedBases(seq, lck);
  1022. [18:28:48] <jnicol> if (Lib.fold(seq) != struc) {
  1023. [18:28:49] <jnicol> outln("misfold :(");
  1024. [18:28:50] <jnicol> } else {
  1025. [18:28:51] <jnicol> eng = Lib.energyOfStruct(seq, struc) - ref_energy;
  1026. [18:28:52] <jnicol> outln(eng.toFixed(2));
  1027. [18:28:53] <jnicol> }
  1028. [18:28:54] <jnicol> seq = getNextSequence(seq, lck);
  1029. [18:28:55] <jnicol> }
  1030. [18:28:56] <jnicol> }
  1031. [18:28:57] <jnicol> out("");
  1032. [18:28:58] <jnicol> function displayUnlockedBases(sq, lk) {
  1033. [18:28:59] <jnicol> for (i=0; i&lt;lk.length; i++) {
  1034. [18:29:00] <jnicol> if (lk.substr(i,1) == "o") {
  1035. [18:29:01] <jnicol> out(sq.substr(i,1));
  1036. [18:29:02] <jnicol> }
  1037. [18:29:03] <jnicol> }
  1038. [18:29:04] <jnicol> out(", ");
  1039. [18:29:05] <jnicol> }
  1040. [18:29:05] <jnicol> out("");
  1041. [18:29:08] <jnicol> function getNextSequence(sq, lk) {
  1042. [18:29:08] <jnicol> i = lk.length;
  1043. [18:29:09] <jnicol> while (--i > 0) {
  1044. [18:29:10] <jnicol> if (lk.substr(i,1) == "o") {
  1045. [18:29:11] <jnicol> base = sq.substr(i,1);
  1046. [18:29:11] <jnicol> sq = sq.substr(0,i) + getNextBase(base)
  1047. [18:29:13] <jnicol> + sq.substr(i+1,sq.length-i);
  1048. [18:29:13] <jnicol> if (base != "C") { return sq; }
  1049. [18:29:15] <jnicol> }
  1050. [18:29:17] <jnicol> }
  1051. [18:29:18] <jnicol> return "done";
  1052. [18:29:19] <jnicol> }
  1053. [18:29:20] <jnicol> out("");
  1054. [18:29:21] <jnicol> function getNextBase(b) {
  1055. [18:29:22] <jnicol> if (b == "A") return "U";
  1056. [18:29:22] <jnicol> if (b == "U") return "G";
  1057. [18:29:23] <jnicol> if (b == "G") return "C";
  1058. [18:29:23] <jnicol> return "A";
  1059. [18:29:25] <jnicol> }
  1060. [18:29:26] <jnicol> out("");
  1061. [18:29:26] <jnicol> return true;
  1062. [18:29:38] <firedrake969> the bots don't always follow rules.
  1063. [18:29:40] <jnicol> ok, copy but dont runit
  1064. [18:29:47] <hoglahoo> JohnDoe1: RNASSD didn't stabilize it, it tricked eterna into accepting its sequence as a solve using a method the game doesn't provide for us
  1065. [18:29:53] <mat747> what about a google doc
  1066. [18:30:10] <mat747> that we could copy from
  1067. [18:30:23] <firedrake969> that would be awesome
  1068. [18:30:42] <jnicol> first remove line 12
  1069. [18:30:56] <Eli-Fisker> Or perhaps a pastebin link
  1070. [18:30:59] <JohnDoe1> http://eterna.cmu.edu/sites/default/files/chat_screens/129002_1392337857.png
  1071. [18:31:00] <jnicol> JohnDoe line
  1072. [18:31:26] <JohnDoe1> does linkbot do tricks?
  1073. [18:31:31] <jnicol> comment out lines 6 and 13
  1074. [18:31:34] <hoglahoo> not really
  1075. [18:31:51] <jnicol> by putting 2 slashes before the displayEnergy
  1076. [18:31:55] <hoglahoo> // comment out like this?
  1077. [18:32:01] <jnicol> correct
  1078. [18:32:17] <firedrake969> So what does the code do?
  1079. [18:32:37] <jnicol> In this last version of the code, I have put the while loop that displays the energy into its own function, displayEnergy
  1080. [18:32:46] <jnicol> This way, we are able to make one call from the main program to display the energy of all combinations for any type of loop; hairpins, 1-1, 1-2, 2-2
  1081. [18:32:52] <hoglahoo> say when, for eval
  1082. [18:33:05] <jnicol> Lines 6 and 13 have been commented out, but can easily be uncommented to show the tetraloop energies of all GC and AU closing pairs.
  1083. [18:33:14] <jnicol> not yet :)
  1084. [18:33:43] <jnicol> Line 15 through 20 demonstrate the energies of a 1-1 loop.
  1085. [18:34:00] <jnicol> ok click evealuate
  1086. [18:34:11] <jnicol> or however its spelled
  1087. [18:34:34] <hoglahoo> that went a little more quickly, yay.
  1088. [18:35:21] <jnicol> Notice that some results show misfolds, but looking deeper, we see that the misfolds are caused by valid pairs across from each other.
  1089. [18:35:33] <jnicol> in the 1-1 loop
  1090. [18:36:00] <firedrake969> Yeah
  1091. [18:36:24] <Eli-Fisker> Ah
  1092. [18:36:32] <TomoeUzumaki> hello
  1093. [18:36:37] <jnicol> uncomment the other lines to see the GC closing pair and AU closing pair energies for all those tetraloops
  1094. [18:36:59] <Eli-Fisker> http://prntscr.com/2s9i7k
  1095. [18:37:06] <jnicol> that is how you can you scripting to generate energy charts
  1096. [18:37:20] <LFP6> Hey everyone
  1097. [18:37:35] <firedrake969> hi LF
  1098. [18:37:42] <hoglahoo> thanks jnicol
  1099. [18:37:42] <Eli-Fisker> John, how do I uncomment the other lines?
  1100. [18:37:45] <jnicol> thank you eli, thats the correct results for the 1-1 loops that are closed by AU pairs
  1101. [18:38:02] <jnicol> delete the 2 slahes before them
  1102. [18:38:21] <jnicol> I know this class was a little more intense, but I thank everyone that followed along, and I hope you are now confident enough to try to generate other loop energies!
  1103. [18:38:27] <firedrake969> How long is it supposed to take? :P
  1104. [18:38:53] <jnicol> well i commented the code so that just 1 at a time should be run
  1105. [18:39:15] <jnicol> running all 3 will take around 30 seconds
  1106. [18:39:24] <jnicol> for hog, 5 minutes
  1107. [18:39:24] <LFP6> Hi Drake, Eli, Hog, Jnicol
  1108. [18:39:30] <LFP6> :)
  1109. [18:39:32] <firedrake969> hi LF
  1110. [18:39:32] <Eli-Fisker> Hi LFP
  1111. [18:39:33] <jnicol> hi LFP6
  1112. [18:39:39] <LFP6> How long until class is over?
  1113. [18:39:44] <firedrake969> I thinnk it's done
  1114. [18:39:45] <jnicol> Congratulations to all that have graduated the Energy Chart class :) We should have badges made for this.
  1115. [18:39:51] <jnicol> done!
  1116. [18:39:53] <firedrake969> Did anyone save a transcript?
  1117. [18:39:54] <Eli-Fisker> :)
  1118. [18:40:00] <firedrake969> That'd be hog's job :P
  1119. [18:40:12] <mat747> John - thanks
  1120. [18:40:27] <Eli-Fisker> Thx for the class
  1121. [18:40:27] <firedrake969> Thanks, jnicol!
  1122. [18:40:27] <LFP6> Hey Mat
  1123. [18:40:28] <hoglahoo> I have one if nobody else does, but the format is goofy
  1124. [18:40:32] <jnicol> thanks to all for helping me with the technical problems :)
  1125. [18:40:52] <Eli-Fisker> I have one too
  1126. [18:40:59] <LFP6> Question: What is the next step for EternaU now that we got the devs' green light?
  1127. [18:41:41] <firedrake969> have someone get a dev package and try implementing it
  1128. [18:41:47] <mat747> Hi LFP
  1129. [18:41:59] <firedrake969> @Eli--could you upload it to Google Docs and give me a link?
  1130. [18:42:33] <Eli-Fisker> I need to edit it a bit down first
  1131. [18:42:37] <firedrake969> Sure
  1132. [18:42:44] <mat747> lfp - what green light
  1133. [18:42:46] <firedrake969> Can you do the raw chatlog first?
  1134. [18:43:15] <Eli-Fisker> I will upload it in the WIKI when I got it stiched together
  1135. [18:43:19] <firedrake969> Ok
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement