Skip to content

Instantly share code, notes, and snippets.

@poserg
Created May 28, 2014 21:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save poserg/5ed5dacdfdc683060d07 to your computer and use it in GitHub Desktop.
Save poserg/5ed5dacdfdc683060d07 to your computer and use it in GitHub Desktop.
def func str
k = 0
result = []
str.scan(/([ACTG]*)([^ACTG]+)/i){|x, y|
k += x.size()
t = y.size()
result << [k, t]
k += t
}
result
end
@spheregenomics
Copy link

Interesting...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment