Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = {...}
- sDNA = tArgs[1]
- local function printUsage()
- print("Usage: ")
- print(shell.getRunningProgram().." <DNA Sequence>")
- print("The DNA Sequence will be transcribed into a cDNA sequence, and mRNA sequence.")
- end
- if #tArgs < 1 or sDNA == "usage" then
- printUsage()
- return false
- end
- write("Transcribing.")
- sleep(0.67)
- scDNA = string.gsub(sDNA:lower(),"c","~")
- scDNA = string.gsub(sDNA:lower(),"g","c")
- scDNA = string.gsub(sDNA:lower(),"~","g")
- scDNA = string.gsub(sDNA:lower(),"t","=")
- scDNA = string.gsub(sDNA:lower(),"a","t")
- scDNA = string.gsub(sDNA:lower(),"=","a")
- sleep(0.4)
- write(" .")
- smRNA = string.gsub(scDNA:lower(),"t","u")
- sleep(0.6)
- write(" .")
- sleep(0.36)
- term.clearLine()
- sleep(0.32)
- print(scDNA:upper().." (cDNA)")
- print()
- print(scDNA:upper().." (mRNA)")
Advertisement
Add Comment
Please, Sign In to add comment