Skip to content

Instantly share code, notes, and snippets.

@echiesse echiesse/dnaRev.lua
Created May 20, 2017

What would you like to do?
DNA strand reverse
function strandComplRev(s)
local complements =
A = "T",
T = "A",
C = "G",
G = "C",
local s2 = ""
for c in string.gmatch(s, ".") do
s2 = complements[c] .. s2
return s2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.