Skip to content

Instantly share code, notes, and snippets.

@campeterson
Created November 6, 2012 04:33
Show Gist options
  • Save campeterson/4022562 to your computer and use it in GitHub Desktop.
Save campeterson/4022562 to your computer and use it in GitHub Desktop.
codeupper1
#!/usr/bin/env ruby
contents = File.read('1.dataset')
A = contents.gsub(/[CcGgTt]/,'')
C = contents.gsub(/[AaGgTt]/,'')
G = contents.gsub(/[AaCcTt]/,'')
T = contents.gsub(/[AaCcGg]/,'')
puts "#{A.length} #{C.length} #{G.length} #{T.length}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment