gknova61

DNA --> cDNA --> mRNA Transcription

Mar 7th, 2013
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.80 KB | None | 0 0
  1. local tArgs = {...}
  2. sDNA = tArgs[1]
  3.  
  4. local function printUsage()
  5.     print("Usage: ")
  6.     print(shell.getRunningProgram().." <DNA Sequence>")
  7.     print("The DNA Sequence will be transcribed into a cDNA sequence, and mRNA sequence.")
  8. end
  9.  
  10. if #tArgs < 1 or sDNA == "usage" then
  11.     printUsage()
  12.     return false
  13. end
  14.  
  15. write("Transcribing.")
  16. sleep(0.67)
  17. scDNA = string.gsub(sDNA:lower(),"c","~")
  18. scDNA = string.gsub(sDNA:lower(),"g","c")
  19. scDNA = string.gsub(sDNA:lower(),"~","g")
  20. scDNA = string.gsub(sDNA:lower(),"t","=")
  21. scDNA = string.gsub(sDNA:lower(),"a","t")
  22. scDNA = string.gsub(sDNA:lower(),"=","a")
  23. sleep(0.4)
  24. write(" .")
  25. smRNA = string.gsub(scDNA:lower(),"t","u")
  26. sleep(0.6)
  27. write(" .")
  28. sleep(0.36)
  29. term.clearLine()
  30. sleep(0.32)
  31. print(scDNA:upper().." (cDNA)")
  32. print()
  33. print(scDNA:upper().." (mRNA)")
Advertisement
Add Comment
Please, Sign In to add comment