Skip to content
Browse files

Added solution for CONS

  • Loading branch information...
1 parent d8c657f commit 225768b736e0560cbbceb0b24eeaf922efcbdbd1 @jvoorhis committed Nov 11, 2012
Showing with 50 additions and 0 deletions.
  1. +10 −0 data/rosalind_cons.txt
  2. +40 −0 src/cons.rb
View
10 data/rosalind_cons.txt
@@ -0,0 +1,10 @@
+CTATGCGTTTAGACTGATCAGTACGCCTTTCATCACCTGTCTGACACTCTAGTTAGTTGCCTAAGACGAGACTGTTACGGGCAGCCAGGGTCAGTTGACCTGAGTTGCATCGAGAGTTACACTCATCTAAGGTAACACCTTCATAGTAAGCGTATAATGTAGCGTCCATTTGTAGACGAACATAGTTGAGTAACTACTATTGGCAAAGACACGAAGTCAAGAATACTGTACAAAGTAGTGAGTTACGTAGGTAAACAGCTTATCGACCAAGCGTGTACAATGTGTTAAGGGACGGTCCCTCACTGTTGGCAGATAGATTGTTTTAGAGCATATTCTACTGGCTGGACAGAAGGGGTAGTGCTCACAAATGGAGAAGTCGTCCCCGCGATAAGAGGTAAGCACGGCTCAAAGAATTTGCCGTAACTAGATCGTCTCTGGCTCATTTCTGCGCCCGGAGGCCTAGCAGTGGGTCTACATGTAAGCTACCCACTGTAGAATTTTTGAAACGTGGTTGATGGCCCGGACTCTCCTAGGAACCGTTGCGATCCGACTCTTCCTCGTCCGCCAAATCTAGTTATAAAAGTCAGCAGGTCAGATATTACGGTATATCAACAGCCGTTGCGAAAAGAAGCATCTCAGAGAGATCAACCCGAATGAGTATTGTTCCCCGCAACACTGGCAGAGCACCCAATTATCACGGGGTACTCGCTTCTATTAGTCCAATAGTGAGCTGCCTTTATTAGAGCTCAGGTCCCTGACAGTAGGCCAATGGCAGGAGAGAAACCCCCTCGTGGGAGCGAGCTAGTTAGGGCGCTGTGCATGTTAGGATATGTGCACGCTGAGATATCCTTCAAGGTATGCCAACTTCGCCGAGAAATGGCGCTCTGTATCTTCGAACCATTCTCAGGACCGCGGCTATTGGCGATGGCAACGACCAAGATTGTGGTCCTGATTGAACCCGGTCCCCCGGTCATGTG
+CTGGGCCATCTCTGCCGCCGAACGTATACGGATCGTCCTAGATAGATCTCAAGATGATGTAATTCATGGGAGTTCCAAAGATGGACCACTGATGATGGCTCTCTGGGCTTACCGGGCCTTTCTTTCGGCGACGATTCTCTCTACGGAGCAATTACTGTTCTATCGTGTGGGCTCTTCAGAAGTAGGCGGGAAAGTCCTAAACCCAGACTTGACCACTATGGCCCTGGCCCGGATGAAGAACTGGGGGTCACTCTGACAGCGTGATATTTATCCGTTAGTGACCATTTCGACACTACGTCCGAGCAGTAAGATCGCGAGACAACCTACGTCTTTCCAGAGGGTTCAAGGGGCCTAGTCAGCATCCAGTTCTTCGCAGACTCTACTATAGGCGTTAAGTCTCGGCAGCACACCTGTCCCCGCATTGTGTGCAACGCAATAACAGAGTAGCAAACCGACACTGAGCTAAGGAGAGCTCACTCCAGACTCCCCGATAAAGTAGCGTGCTGGACTTTATCTTTGAGACTCTCTCTTTGTGCCTCTCGGGCGGAGGTTTATGTACCATGTTAGAGGCAGACCGAAACATCAAATGGGCCGCCTGCAATCTGGAAAGACCTTCAGCTGATCCCCGGCACGGTTTGATATCATTGTGCAGTAGCTGTGGTCCCGCCAAACGAATTTAGCTAATCAGCCATTAAAACCTAGACGGGGGGGAAGGTTAGGCGAAAAGGGTATGAAAGAGCTAGAGGCGCTATCGGTCGCACGAACAGTAAGGTCCCAGCGGCTAATAGGTGGGCCTCTAAGCGTCGCGCCCCACTTCATCTCGCAATCGACTTCGAATTGTAAACTCCGAGTTCCTCGCGTGTAAGCGAAAAGAGGGACTTCACCCAGATGGTCCGACATTCAACGGGCGTGGATGAGACGCAGGTAGGGTTGAAAAGGAGCTACGAGTCCAGCTCCAGGCGCCCCGAACGTATCCC
+TAAACATATAAGTATTGGTTAAAGTTGCATGTGCCATGAGAGTATGAGTTATTGATCGCTGCTGTTCGTGGTATTGTCAAGCCCAACATGATCGGCCGTCCCAGCGAGCCTGCATGTAGGGGGTGGATTCCGCACAACAACCCCAATAGGTAACGTTAGTGAAGTTATTGGGGTAGTTTTACAGGGGCAAGAAACGACATTACGGGTAGTAGTCGTGCAGATTGTGTGTCAACTAAGAAAGGTCCCGCGTAAACTACCTGATCGCTACCACTCTTACACCCACGCCCTCGCATGTTAGGACGAAGCCCTAATTTAGCGATTCGTGGCAGGCGGCAGCTCTTCTTTTTTTGTCCTCTCTGGTTATAGCGCAGCTATTACAGCCTGGACCGTTACCATGTCCCCCCTGGGGTTGGGCGGAGGCGGGGAATAAGGATGTCCCGGCATCAGTAAATCCTGGAACGTGTGGAAACTGCCATCGCCTACCAACTCGGGATAGAAATCATTAGCTTCTACGATGGCATACGGACCATGGGACAGGCCATCACTTAACGGAAGTCAAGAACCACGAGAATCTGGTAAGCCACAGCGGGCGCGTGTAACCCAGAAAAACTATCAAAGGGAGGTGCTAAAAAACCGGGCAGAAGGATACGCCTCGAGTTTTCCTTGCACCAGTAGTATCCGCCCAGTTTATCCACGGGAGGAGATCGCTTGTCCAAATTAAGGACCCTTCTTAATACAGGCATTTTTAGAACGGATTGCAAGCAAGTCCTCCTCACGCATTGTCCTACACGCAAAGATCAAACGAACGCGTGGTTTCGGGGCTTAACCCGGAGTTCCCATAGCCGGAACCATGTCGAGCATCATGGTGATCCCGAATCTTCATAGGGCTAAGGCAAGTTCTAAGAGGAGAACTAACCTTGCCATACAGCATCACCACCGTGCCTAAGCGGCGGTTGGCTGTGGTTTCTTTTTTGCTG
+CCGCTGTCACGAGCCAGATCCACTACAAAATATCCTACTTCGCCCCACGTCAGGGCTATATGCTCCAAAACCGGGCAATAGTGTACAACATGAGTCGTAGTGCACCGCGAAGCTTCAGACATAGCTAAGTGGAAGACTCCAGATTGGTACGGGAAACGGCTAATTTAGGGATAGTAGCCAGGCAGCCGGCATGACCTGTCTTATTCTTCTCAGCCGGCCTCACGTTCTGTACGCATCACCTCATCGATAACGAATTCGCCATGTATAGGACTTGGGCCATGCGTATGGCATGCAAGTGAACGCCCCCTACAGGCGCATCGGTTATATGTAGACTGCGATGAGGGTGCCTTAGTTGCAGTCGAGTCCATCGTGGCACGGTGCCTTGAGAAACGCACGGTCAGTGAATGGTAAGAAGCTGCCATTTATCCGTTCAGCCGCTAGCCGAACCCACAGTCCCGATAATGTGGATGGTCGGCACAGGGGAAACCGCAGTGATTATTAACGACACGCATCACAGTAACAAAAGGTATGTGTGTAACCCGGTTTATGTAATTAGCTCTGTGCTGCTTACCCCGTGGATAATATCCCAGAAACGCAATGTGCTCACTATTCTCTTACTTTACAAGCATCGAGGATATGGATTGTCCATGGCCCCAAGCCCCAACCTCCCGTTGGGAGCAAAATAATGATTGGTCTGAAAAATGTAGTGATCCTAGTATGAACTAACTTGGCATGAGCCAGTCGCAGCCGACCACACCCGAAGGCGGCTATCCTCCCTTTCTCTACGCACAAGAGATAGAGTGCACATTCGAAGGGAAGATCAAATTTGAGATGAGGAGTGTTCGAGGTGACGGAGGCCCCGCTTAGAAAGCGGTGGCTTCCCACGATCAGGGACTAAGAATTATCCTTGACACTGCGGTACTTGGGCCGTGCCGACCGATTCTAACGTTAAATGCCTTAATGGCGTCTGTGCTCGC
+ACAACTTTGGATTGTAACGACAGAAGTTCACTGCTAAAGGTATGATCCTACTTAAGATCGACAAATGGAACGGGGGCTAACCGACTTCATAACACAATGATCCGACAGCGCGAGTTACCTCCTGTGATCTTCTTGTACTTATAAGGGAGACTACGGAGTTCTGTGCTAAGTCCACTAGAAGACCTGGCGTAACGCATCTGAGGTAACCCTTAAACCTTAGCGCAGCCTCTCGGTCAACGGATACTGGGCAACTCGGATCGTCCTGTGAACGCAAGCCTATCATTCTCTCCTCATAATCAGAAAATTATGAGGGTCGCTTGCTGTTGAGCTTGCGGGCAGGCTCACTAACCCTTGACTCAACTGCCGCTTCCCCTGCTTAAACATTTAGAACCACACAACACAATCTGATAAGGTTAACTCCGCACTGACTACCGAGAGTTAACAGTGTGAGAGCACATACGGCACTGGATGTCGCTCTATTAAGCTTTCTCTCTCAACCAGCGGATTCACAGCCGCGTACGTACCAAACGGGATTGTTGTCGAATACTAGCGCTTTAGTAATCGGCTGGACAAAGTTGCTAGAGACGCAATGCCAGATCACTTGATGGACCATATAGCGGTGAGGGGTCTAGACGATAATGACCGATTCCTCGGCGGGACACCGGTGGTACAATCACGCGAAACGTCACGGCACCCTGGTGGTTCATGGGCTAAGGGTGTGTGGAACATACAGGCTCTACCGCTACAGGAGGCCGACACAACTGTCCGGTAAGGTGTCTGCTACCCGATCAGTGCGATAGTATACACACATAATACGTGTTCGAAACGACGCACCACAGAAACCCGCATTCACCGGCCACGATCTGAGACCCTCCAGTTGAGGATGCCGCGCCCTGCTACTATGGGACTGTAACGATTTCGCTGGAGGTGACTTGGACGCCGGGGTTACGACACAGTTACACACAACTTGGCAACTT
+AAGGAACTTTCGCAATGTTGGTCTAACTGGCCACCCGGGTATAATACACAGCCTTCTCAGGTAAGGATCGGGACCAGAATGCTCTTGGTAACCGATCTTCCCGCTACATTTTTCTGGTACGGCGGTGCCTTTTCCCAGATCCACACTGCGGAGGGAGTTCGTAGTGTACGAAGCATATGCAGTTATGAGCTACCGTGCCCTACTCAATATGTGGCCCTGTCTCTCTGAAAGTGCAGCGCGTCAGAGAGCGACTAGTGTTCTCTCGGAGGGTTCGATAAAAAACCAGGCCACGTCCGCTGCATATTACGGCCCCAAGTTACTGCCGAGTTCAGCGACCAGGTTTTAGTGGCTGACGGCCCATAAGGGTCCCGGGTTCCTTACTAACATTTACCTCGGTCCCGTCTTGCGCCTACCGACGGAGTTGTGCCCTTGTGGGCGGTTAGGGTTGATCATGCTATCCTTCTTTAAAAAATGGACAAAAGAAGGATGCGACCCAAGACGTTGGTCCGCATAGTTTCCGGTGTGCACAGGTCCGACCAGGGCATTGATCCGTCCGGCCAATCCAGATGACATTACGCGTCGTATACCACACGCCTGGCCGGCCGAGCTAAAACAGAACCCCAGTTGATGTAAATCCTAGCGCCAGTGAGTATTGAGAGTATATGTAAATCCGACCTGGGGGACGGTTTCGATCTCTAAAGATGGCAAGCAGCTGCTACCCCTTGTGGTGAATTTCCTGGGACCGGAAATGTCGGCCAACTAGGGCGATGCCGGAACGGGCGCGGGCACCAGCGCTAACTCAGACTTAATAGCGGAATTTTCCAGATCTAATATTGACGCCCATCCGCGTCTAACTGGCTGAAGCAATTGATCCCGTCTCGTTGTCGACAGCCTCTGGCCCTCCCTACTCCTCAAAATGGGATTCCTATTCGACCTAAACTAGGGGTATAGCAACAGAAGGGTGTTCGTCGAGTTTG
+TGTTGTCCCCTTGTTTACATCCAGTAGTTCAGCACCCGAGCGCGTTACATGCAAGAACCGTCAGGCTGCCCTCTATAGTCTGGCGTACCCTTAAGAGGTCTCTTGAGGAAGTATTCTCTACTGGATAGAGGCACATAAACTCTTGGATAGCACGCACCGACAGAGGGACCCGACACTCGTCCTCCCGCTGATTCGGCTTTCCTAGACCTTCTATAATATTAATCCCCTGTTAGCTGCGGGGTGAGTCACAACCGTGGAGGGGTACAACGCGAACCTCCGTATACTCTGGGTCTGTCGTAGTCTCCTGCACGATTTAAATTTATGCCCTATATACGAGCAATGGGCTGGCTATGCCTCTGACACAGATACTCCTACACTCCTTCGACACATCGACAATCGACGGTCCTCTGAGGCGAGTAACTTCAAAGTATAGGAGTCAACTGAGGCCTCAGATGACTTGATAATTATCCAGATGGCTGATTATAAATTGACGCCCGTGGCTTCCAGTAGTATCCAGCCAACCTTGACAACGTGGCTGCAACTATTTTAAAAGTAGCTGGTTAGCACGTTCTCACTTCTACCCTTTTATTTGCCATCAGGATCTGGGACTTACATTGCAGTGCAGTATCCCAGTATTGCATTCACCTGTTGAATGCCTAATTCGGCGGTGTAGACCAACACGTTTCAGCACTCACCGGTTCGGTGCGGTGGAAACATGGAAGTCCACGACCAAGTGCAAGTCTCATTTAATGATTGTAAGAAAAATCCCTAATAGGCAACCAAAAGCTGGTTGCCTGATGCGTAGTAACCTAGACTCAGATAATAGGTCGATTACGGCGGAGTTACCGTCACCACATCGGTCACCCGTTTAGGGCCTCCTAGCGTACGTGTTCATTTACTCACTGGGCAACTCAATCCCCCTTCATCGTGGCTGTTTATTGGTTGCTGTGGGCTGTTCACAATACGTCATGTTCGAT
+GTTCATGGTTTACTAAATGTGGTTATGTCGATCGTTATCCGGTTGCTGTCGTGATCAAATTCAGTCTCCGACGGCATAACCTATATACTTCATTGCGAGAACACTTGCAGGACGAGAGATTGTATAAACATCAGTAGACTGCTACGGCGCATTTACGATTCTGAGTGCCGCATTAGACGTGGCTGCGACAAAAATACTGTAGAGCACCGAAATACAGATAGTATGGGCTTACAATCGATCTTGGTGGTGCAGGAAGGCAGTCGATCGAATCGACCCTCAATATAAGTTGCCTGTATAGGCCGCCTCACATAAGGGAACTTGAAAGTATGTGGCGTTGGATTTTTACGAGTGCATGACTTTCCTCCCAGACGAAGCGTAGCTGGATAGACCTCCTGTTGGAAGAGGGAAGAGAATATAAGACACTTAGTGCGGTATAGAAACGGGCCGTAACATGCTCCGGGATTGGCAGGCTAACCATGGAAAGAGTGCGCCTGGCAACAAGGACATTACGTGTTACGTTCTATCGAGCAAATTACACGTTTCTGCGTTCGTTAAATTAATACGTCGTACTACTGACGACACCTTAGCTGCTGGAAGAGCTCGAGAAGCCCATAAAAGTCATACGAAAGAAGATATCCTAGGTCAGAGAACCTTCAGAGTCATAGGTAGGCCGGAGTTAACGGCTTGTAGCGTGGAGAACTTAAAGGCTCTGCTAGGGATCCTTAATGTAGGTGGAATGCGGAGCATAGTCGACTTACAAGTTGTTTTGGGCTCGTAATGAGTGGCAAGGAGGCGCGTACCCATTAGTATTACTGTTCCTCGCCCCTCCTGTAATGTTCACCATCAATCAACATGTCCAGTATCCAAATACATTCGCGCTTGGGCCACACGCGTCTAGCCCAACAAATACGCTAGGCCGGCCCCTTCCGGCCCCGAATTTTACGCCCAATAGCCCGCCGGATTTTTCAGTACAGACT
+GAAGTGATACGATCCAACTCATTACTTCAGGAGAAAGTCTTCAGAGCCGATACGCTCCATGAAGCGAAATGTAGGAATATACCTTCTGCTGTCTCTTTGATTACCAACTATCGCCTCGGAATATTCGTCCTGGTTGGTACAGGGTTTTCATGCCGTGGAGACTAATACAGACGCGCGCTCGGTAGCCGTGAGGCTACCGCATGTAGGTAATGCACCACTTGCCTATGCACGGACCCGTAAGCATAGGCAGATTTACAGGTTCACCTGACTGTACCACTACTAAGTAAAAATGGGTAACGCTACAGTCTTGCTGTGTCAATATCAGTGAACTAATGTATTCACTTATCCTCGTCGGAGTATCGGCCGCTCGGCATGAATTGTCGGTACACGTGACTTATACATTCCTTCGCTACGGGACTAGTTCTCCCCAATTTCAGACGACTCACACGCCACTAACAGAGCTGGATGTGAGACTCGCAACGGGTTCCCCTCCAAATGGGCATACTGTATCATTCCTTGTTCCACCTTCGCTGTGATCTGTCGGGGGACACTGACGAGCCCAACACCGACAATCCGGCTGCGAGTTCGATCGGACTTGCCTAGTTGCTGAATAAGCTTACTAAGCTATGCATCTTGTACAAGGTAACATCAACTGGCACCCGGTGCGAGTTAACATGCGTACCCAATCGCAGCTGTACTAATCTATCCCCGAGAACCATTCTCAAGCATCTAGCGCAGAACAATAAAGATACCCACTGAGTATCATTCGGATCTCGTTGCCGGCGAGATAGCATTACTGGCCCCACATATGTATCGCACTTATCATTTTGACACGCAATAGGAACCGACGCGGGCACGAGACGTCAGATCCGGCTCGTAGCCCTGGTTTTCACCGCTTTTATTACTGCGGCGCGACACGCGCACGTAACATTTCGATGGGATTCATACGGCATAAGATTTCACTTTACCAAGGAGTA
+TTGACAGGGGGCAAGGAACTTCCCGGACCAGTATACCCTTTCCTCATTCCTGAAGGCGATCAGCCTGATCGCCATGCAACTTGAACGAGGGCCTCGTCGGATAACCAATTCAGCCGCGCAAAGATCACCTAAATCGTTATGCCCGGAGAGCACACTCAGCACGGGTTGTATGGTTACCGGTATGCTACGACTGAGCACGGGTGGCCTGACCTTTAAGCAGACGAATGTTACAGTGGGTAACTACTATCGCAGTGAGAGGTGCAGTGGGACGGCGACAAAAGTACGTCACTCCATAAACCCAAACTTCACCAAAGGCCAGGTAGCATCGCACCAAGGTATTCTTTTCCGCCATCGATGTTGTTCCTTTGACCATAAATCGTGTTTTCAGCGCGCGTGGGCATTCCAGAAGCATGTGGTGTGTCCATGAGATCCGCTTGCGTCATTACGGCTGAGTTCGAGACCGGTTATTTCATTGCGGTTCGAATTCATTAATTAATCCCCAATATTTCTCTAAGGGAGGAGGTTATCAACTAATCTCATTAAATCTGTACTTATGATCAGTGCAGGTTTGCCGCATTACTACTTGCAGTGATCAATGAAGCATAATGTTGGACCAATTCATCGGGACAGGTGTAACTTACATCTTGCGCCACATCCTACCGCTTCCACCGTGGGTTGGTACTGTCGCCCCCCTCTGTCGGTCGAGCAGTAGAGCGACGCATAGATTGCGGCGCGTCTCATGGTCCGGTCAACCTTAATTTTGACTGGGGCGGCGGATTACCATCATAGGGAGGTCAGTCTGGCTTATCCAAAGCTGGTGCTTGGGTTTTCTTACTTCACGAGAGGCAGAGGGCAAGAGTGTATGATCATTCACGTTGTTAAAAGACAGATCCGGTTGAGTGGTTATAGTCAAACCAACACTGAACGCCGAATGAGGGTGCCGGTCTGAGACCTCATGTCAAAGTGTAACAGTTTTC
View
40 src/cons.rb
@@ -0,0 +1,40 @@
+mat = %w(
+CTATGCGTTTAGACTGATCAGTACGCCTTTCATCACCTGTCTGACACTCTAGTTAGTTGCCTAAGACGAGACTGTTACGGGCAGCCAGGGTCAGTTGACCTGAGTTGCATCGAGAGTTACACTCATCTAAGGTAACACCTTCATAGTAAGCGTATAATGTAGCGTCCATTTGTAGACGAACATAGTTGAGTAACTACTATTGGCAAAGACACGAAGTCAAGAATACTGTACAAAGTAGTGAGTTACGTAGGTAAACAGCTTATCGACCAAGCGTGTACAATGTGTTAAGGGACGGTCCCTCACTGTTGGCAGATAGATTGTTTTAGAGCATATTCTACTGGCTGGACAGAAGGGGTAGTGCTCACAAATGGAGAAGTCGTCCCCGCGATAAGAGGTAAGCACGGCTCAAAGAATTTGCCGTAACTAGATCGTCTCTGGCTCATTTCTGCGCCCGGAGGCCTAGCAGTGGGTCTACATGTAAGCTACCCACTGTAGAATTTTTGAAACGTGGTTGATGGCCCGGACTCTCCTAGGAACCGTTGCGATCCGACTCTTCCTCGTCCGCCAAATCTAGTTATAAAAGTCAGCAGGTCAGATATTACGGTATATCAACAGCCGTTGCGAAAAGAAGCATCTCAGAGAGATCAACCCGAATGAGTATTGTTCCCCGCAACACTGGCAGAGCACCCAATTATCACGGGGTACTCGCTTCTATTAGTCCAATAGTGAGCTGCCTTTATTAGAGCTCAGGTCCCTGACAGTAGGCCAATGGCAGGAGAGAAACCCCCTCGTGGGAGCGAGCTAGTTAGGGCGCTGTGCATGTTAGGATATGTGCACGCTGAGATATCCTTCAAGGTATGCCAACTTCGCCGAGAAATGGCGCTCTGTATCTTCGAACCATTCTCAGGACCGCGGCTATTGGCGATGGCAACGACCAAGATTGTGGTCCTGATTGAACCCGGTCCCCCGGTCATGTG
+CTGGGCCATCTCTGCCGCCGAACGTATACGGATCGTCCTAGATAGATCTCAAGATGATGTAATTCATGGGAGTTCCAAAGATGGACCACTGATGATGGCTCTCTGGGCTTACCGGGCCTTTCTTTCGGCGACGATTCTCTCTACGGAGCAATTACTGTTCTATCGTGTGGGCTCTTCAGAAGTAGGCGGGAAAGTCCTAAACCCAGACTTGACCACTATGGCCCTGGCCCGGATGAAGAACTGGGGGTCACTCTGACAGCGTGATATTTATCCGTTAGTGACCATTTCGACACTACGTCCGAGCAGTAAGATCGCGAGACAACCTACGTCTTTCCAGAGGGTTCAAGGGGCCTAGTCAGCATCCAGTTCTTCGCAGACTCTACTATAGGCGTTAAGTCTCGGCAGCACACCTGTCCCCGCATTGTGTGCAACGCAATAACAGAGTAGCAAACCGACACTGAGCTAAGGAGAGCTCACTCCAGACTCCCCGATAAAGTAGCGTGCTGGACTTTATCTTTGAGACTCTCTCTTTGTGCCTCTCGGGCGGAGGTTTATGTACCATGTTAGAGGCAGACCGAAACATCAAATGGGCCGCCTGCAATCTGGAAAGACCTTCAGCTGATCCCCGGCACGGTTTGATATCATTGTGCAGTAGCTGTGGTCCCGCCAAACGAATTTAGCTAATCAGCCATTAAAACCTAGACGGGGGGGAAGGTTAGGCGAAAAGGGTATGAAAGAGCTAGAGGCGCTATCGGTCGCACGAACAGTAAGGTCCCAGCGGCTAATAGGTGGGCCTCTAAGCGTCGCGCCCCACTTCATCTCGCAATCGACTTCGAATTGTAAACTCCGAGTTCCTCGCGTGTAAGCGAAAAGAGGGACTTCACCCAGATGGTCCGACATTCAACGGGCGTGGATGAGACGCAGGTAGGGTTGAAAAGGAGCTACGAGTCCAGCTCCAGGCGCCCCGAACGTATCCC
+TAAACATATAAGTATTGGTTAAAGTTGCATGTGCCATGAGAGTATGAGTTATTGATCGCTGCTGTTCGTGGTATTGTCAAGCCCAACATGATCGGCCGTCCCAGCGAGCCTGCATGTAGGGGGTGGATTCCGCACAACAACCCCAATAGGTAACGTTAGTGAAGTTATTGGGGTAGTTTTACAGGGGCAAGAAACGACATTACGGGTAGTAGTCGTGCAGATTGTGTGTCAACTAAGAAAGGTCCCGCGTAAACTACCTGATCGCTACCACTCTTACACCCACGCCCTCGCATGTTAGGACGAAGCCCTAATTTAGCGATTCGTGGCAGGCGGCAGCTCTTCTTTTTTTGTCCTCTCTGGTTATAGCGCAGCTATTACAGCCTGGACCGTTACCATGTCCCCCCTGGGGTTGGGCGGAGGCGGGGAATAAGGATGTCCCGGCATCAGTAAATCCTGGAACGTGTGGAAACTGCCATCGCCTACCAACTCGGGATAGAAATCATTAGCTTCTACGATGGCATACGGACCATGGGACAGGCCATCACTTAACGGAAGTCAAGAACCACGAGAATCTGGTAAGCCACAGCGGGCGCGTGTAACCCAGAAAAACTATCAAAGGGAGGTGCTAAAAAACCGGGCAGAAGGATACGCCTCGAGTTTTCCTTGCACCAGTAGTATCCGCCCAGTTTATCCACGGGAGGAGATCGCTTGTCCAAATTAAGGACCCTTCTTAATACAGGCATTTTTAGAACGGATTGCAAGCAAGTCCTCCTCACGCATTGTCCTACACGCAAAGATCAAACGAACGCGTGGTTTCGGGGCTTAACCCGGAGTTCCCATAGCCGGAACCATGTCGAGCATCATGGTGATCCCGAATCTTCATAGGGCTAAGGCAAGTTCTAAGAGGAGAACTAACCTTGCCATACAGCATCACCACCGTGCCTAAGCGGCGGTTGGCTGTGGTTTCTTTTTTGCTG
+CCGCTGTCACGAGCCAGATCCACTACAAAATATCCTACTTCGCCCCACGTCAGGGCTATATGCTCCAAAACCGGGCAATAGTGTACAACATGAGTCGTAGTGCACCGCGAAGCTTCAGACATAGCTAAGTGGAAGACTCCAGATTGGTACGGGAAACGGCTAATTTAGGGATAGTAGCCAGGCAGCCGGCATGACCTGTCTTATTCTTCTCAGCCGGCCTCACGTTCTGTACGCATCACCTCATCGATAACGAATTCGCCATGTATAGGACTTGGGCCATGCGTATGGCATGCAAGTGAACGCCCCCTACAGGCGCATCGGTTATATGTAGACTGCGATGAGGGTGCCTTAGTTGCAGTCGAGTCCATCGTGGCACGGTGCCTTGAGAAACGCACGGTCAGTGAATGGTAAGAAGCTGCCATTTATCCGTTCAGCCGCTAGCCGAACCCACAGTCCCGATAATGTGGATGGTCGGCACAGGGGAAACCGCAGTGATTATTAACGACACGCATCACAGTAACAAAAGGTATGTGTGTAACCCGGTTTATGTAATTAGCTCTGTGCTGCTTACCCCGTGGATAATATCCCAGAAACGCAATGTGCTCACTATTCTCTTACTTTACAAGCATCGAGGATATGGATTGTCCATGGCCCCAAGCCCCAACCTCCCGTTGGGAGCAAAATAATGATTGGTCTGAAAAATGTAGTGATCCTAGTATGAACTAACTTGGCATGAGCCAGTCGCAGCCGACCACACCCGAAGGCGGCTATCCTCCCTTTCTCTACGCACAAGAGATAGAGTGCACATTCGAAGGGAAGATCAAATTTGAGATGAGGAGTGTTCGAGGTGACGGAGGCCCCGCTTAGAAAGCGGTGGCTTCCCACGATCAGGGACTAAGAATTATCCTTGACACTGCGGTACTTGGGCCGTGCCGACCGATTCTAACGTTAAATGCCTTAATGGCGTCTGTGCTCGC
+ACAACTTTGGATTGTAACGACAGAAGTTCACTGCTAAAGGTATGATCCTACTTAAGATCGACAAATGGAACGGGGGCTAACCGACTTCATAACACAATGATCCGACAGCGCGAGTTACCTCCTGTGATCTTCTTGTACTTATAAGGGAGACTACGGAGTTCTGTGCTAAGTCCACTAGAAGACCTGGCGTAACGCATCTGAGGTAACCCTTAAACCTTAGCGCAGCCTCTCGGTCAACGGATACTGGGCAACTCGGATCGTCCTGTGAACGCAAGCCTATCATTCTCTCCTCATAATCAGAAAATTATGAGGGTCGCTTGCTGTTGAGCTTGCGGGCAGGCTCACTAACCCTTGACTCAACTGCCGCTTCCCCTGCTTAAACATTTAGAACCACACAACACAATCTGATAAGGTTAACTCCGCACTGACTACCGAGAGTTAACAGTGTGAGAGCACATACGGCACTGGATGTCGCTCTATTAAGCTTTCTCTCTCAACCAGCGGATTCACAGCCGCGTACGTACCAAACGGGATTGTTGTCGAATACTAGCGCTTTAGTAATCGGCTGGACAAAGTTGCTAGAGACGCAATGCCAGATCACTTGATGGACCATATAGCGGTGAGGGGTCTAGACGATAATGACCGATTCCTCGGCGGGACACCGGTGGTACAATCACGCGAAACGTCACGGCACCCTGGTGGTTCATGGGCTAAGGGTGTGTGGAACATACAGGCTCTACCGCTACAGGAGGCCGACACAACTGTCCGGTAAGGTGTCTGCTACCCGATCAGTGCGATAGTATACACACATAATACGTGTTCGAAACGACGCACCACAGAAACCCGCATTCACCGGCCACGATCTGAGACCCTCCAGTTGAGGATGCCGCGCCCTGCTACTATGGGACTGTAACGATTTCGCTGGAGGTGACTTGGACGCCGGGGTTACGACACAGTTACACACAACTTGGCAACTT
+AAGGAACTTTCGCAATGTTGGTCTAACTGGCCACCCGGGTATAATACACAGCCTTCTCAGGTAAGGATCGGGACCAGAATGCTCTTGGTAACCGATCTTCCCGCTACATTTTTCTGGTACGGCGGTGCCTTTTCCCAGATCCACACTGCGGAGGGAGTTCGTAGTGTACGAAGCATATGCAGTTATGAGCTACCGTGCCCTACTCAATATGTGGCCCTGTCTCTCTGAAAGTGCAGCGCGTCAGAGAGCGACTAGTGTTCTCTCGGAGGGTTCGATAAAAAACCAGGCCACGTCCGCTGCATATTACGGCCCCAAGTTACTGCCGAGTTCAGCGACCAGGTTTTAGTGGCTGACGGCCCATAAGGGTCCCGGGTTCCTTACTAACATTTACCTCGGTCCCGTCTTGCGCCTACCGACGGAGTTGTGCCCTTGTGGGCGGTTAGGGTTGATCATGCTATCCTTCTTTAAAAAATGGACAAAAGAAGGATGCGACCCAAGACGTTGGTCCGCATAGTTTCCGGTGTGCACAGGTCCGACCAGGGCATTGATCCGTCCGGCCAATCCAGATGACATTACGCGTCGTATACCACACGCCTGGCCGGCCGAGCTAAAACAGAACCCCAGTTGATGTAAATCCTAGCGCCAGTGAGTATTGAGAGTATATGTAAATCCGACCTGGGGGACGGTTTCGATCTCTAAAGATGGCAAGCAGCTGCTACCCCTTGTGGTGAATTTCCTGGGACCGGAAATGTCGGCCAACTAGGGCGATGCCGGAACGGGCGCGGGCACCAGCGCTAACTCAGACTTAATAGCGGAATTTTCCAGATCTAATATTGACGCCCATCCGCGTCTAACTGGCTGAAGCAATTGATCCCGTCTCGTTGTCGACAGCCTCTGGCCCTCCCTACTCCTCAAAATGGGATTCCTATTCGACCTAAACTAGGGGTATAGCAACAGAAGGGTGTTCGTCGAGTTTG
+TGTTGTCCCCTTGTTTACATCCAGTAGTTCAGCACCCGAGCGCGTTACATGCAAGAACCGTCAGGCTGCCCTCTATAGTCTGGCGTACCCTTAAGAGGTCTCTTGAGGAAGTATTCTCTACTGGATAGAGGCACATAAACTCTTGGATAGCACGCACCGACAGAGGGACCCGACACTCGTCCTCCCGCTGATTCGGCTTTCCTAGACCTTCTATAATATTAATCCCCTGTTAGCTGCGGGGTGAGTCACAACCGTGGAGGGGTACAACGCGAACCTCCGTATACTCTGGGTCTGTCGTAGTCTCCTGCACGATTTAAATTTATGCCCTATATACGAGCAATGGGCTGGCTATGCCTCTGACACAGATACTCCTACACTCCTTCGACACATCGACAATCGACGGTCCTCTGAGGCGAGTAACTTCAAAGTATAGGAGTCAACTGAGGCCTCAGATGACTTGATAATTATCCAGATGGCTGATTATAAATTGACGCCCGTGGCTTCCAGTAGTATCCAGCCAACCTTGACAACGTGGCTGCAACTATTTTAAAAGTAGCTGGTTAGCACGTTCTCACTTCTACCCTTTTATTTGCCATCAGGATCTGGGACTTACATTGCAGTGCAGTATCCCAGTATTGCATTCACCTGTTGAATGCCTAATTCGGCGGTGTAGACCAACACGTTTCAGCACTCACCGGTTCGGTGCGGTGGAAACATGGAAGTCCACGACCAAGTGCAAGTCTCATTTAATGATTGTAAGAAAAATCCCTAATAGGCAACCAAAAGCTGGTTGCCTGATGCGTAGTAACCTAGACTCAGATAATAGGTCGATTACGGCGGAGTTACCGTCACCACATCGGTCACCCGTTTAGGGCCTCCTAGCGTACGTGTTCATTTACTCACTGGGCAACTCAATCCCCCTTCATCGTGGCTGTTTATTGGTTGCTGTGGGCTGTTCACAATACGTCATGTTCGAT
+GTTCATGGTTTACTAAATGTGGTTATGTCGATCGTTATCCGGTTGCTGTCGTGATCAAATTCAGTCTCCGACGGCATAACCTATATACTTCATTGCGAGAACACTTGCAGGACGAGAGATTGTATAAACATCAGTAGACTGCTACGGCGCATTTACGATTCTGAGTGCCGCATTAGACGTGGCTGCGACAAAAATACTGTAGAGCACCGAAATACAGATAGTATGGGCTTACAATCGATCTTGGTGGTGCAGGAAGGCAGTCGATCGAATCGACCCTCAATATAAGTTGCCTGTATAGGCCGCCTCACATAAGGGAACTTGAAAGTATGTGGCGTTGGATTTTTACGAGTGCATGACTTTCCTCCCAGACGAAGCGTAGCTGGATAGACCTCCTGTTGGAAGAGGGAAGAGAATATAAGACACTTAGTGCGGTATAGAAACGGGCCGTAACATGCTCCGGGATTGGCAGGCTAACCATGGAAAGAGTGCGCCTGGCAACAAGGACATTACGTGTTACGTTCTATCGAGCAAATTACACGTTTCTGCGTTCGTTAAATTAATACGTCGTACTACTGACGACACCTTAGCTGCTGGAAGAGCTCGAGAAGCCCATAAAAGTCATACGAAAGAAGATATCCTAGGTCAGAGAACCTTCAGAGTCATAGGTAGGCCGGAGTTAACGGCTTGTAGCGTGGAGAACTTAAAGGCTCTGCTAGGGATCCTTAATGTAGGTGGAATGCGGAGCATAGTCGACTTACAAGTTGTTTTGGGCTCGTAATGAGTGGCAAGGAGGCGCGTACCCATTAGTATTACTGTTCCTCGCCCCTCCTGTAATGTTCACCATCAATCAACATGTCCAGTATCCAAATACATTCGCGCTTGGGCCACACGCGTCTAGCCCAACAAATACGCTAGGCCGGCCCCTTCCGGCCCCGAATTTTACGCCCAATAGCCCGCCGGATTTTTCAGTACAGACT
+GAAGTGATACGATCCAACTCATTACTTCAGGAGAAAGTCTTCAGAGCCGATACGCTCCATGAAGCGAAATGTAGGAATATACCTTCTGCTGTCTCTTTGATTACCAACTATCGCCTCGGAATATTCGTCCTGGTTGGTACAGGGTTTTCATGCCGTGGAGACTAATACAGACGCGCGCTCGGTAGCCGTGAGGCTACCGCATGTAGGTAATGCACCACTTGCCTATGCACGGACCCGTAAGCATAGGCAGATTTACAGGTTCACCTGACTGTACCACTACTAAGTAAAAATGGGTAACGCTACAGTCTTGCTGTGTCAATATCAGTGAACTAATGTATTCACTTATCCTCGTCGGAGTATCGGCCGCTCGGCATGAATTGTCGGTACACGTGACTTATACATTCCTTCGCTACGGGACTAGTTCTCCCCAATTTCAGACGACTCACACGCCACTAACAGAGCTGGATGTGAGACTCGCAACGGGTTCCCCTCCAAATGGGCATACTGTATCATTCCTTGTTCCACCTTCGCTGTGATCTGTCGGGGGACACTGACGAGCCCAACACCGACAATCCGGCTGCGAGTTCGATCGGACTTGCCTAGTTGCTGAATAAGCTTACTAAGCTATGCATCTTGTACAAGGTAACATCAACTGGCACCCGGTGCGAGTTAACATGCGTACCCAATCGCAGCTGTACTAATCTATCCCCGAGAACCATTCTCAAGCATCTAGCGCAGAACAATAAAGATACCCACTGAGTATCATTCGGATCTCGTTGCCGGCGAGATAGCATTACTGGCCCCACATATGTATCGCACTTATCATTTTGACACGCAATAGGAACCGACGCGGGCACGAGACGTCAGATCCGGCTCGTAGCCCTGGTTTTCACCGCTTTTATTACTGCGGCGCGACACGCGCACGTAACATTTCGATGGGATTCATACGGCATAAGATTTCACTTTACCAAGGAGTA
+TTGACAGGGGGCAAGGAACTTCCCGGACCAGTATACCCTTTCCTCATTCCTGAAGGCGATCAGCCTGATCGCCATGCAACTTGAACGAGGGCCTCGTCGGATAACCAATTCAGCCGCGCAAAGATCACCTAAATCGTTATGCCCGGAGAGCACACTCAGCACGGGTTGTATGGTTACCGGTATGCTACGACTGAGCACGGGTGGCCTGACCTTTAAGCAGACGAATGTTACAGTGGGTAACTACTATCGCAGTGAGAGGTGCAGTGGGACGGCGACAAAAGTACGTCACTCCATAAACCCAAACTTCACCAAAGGCCAGGTAGCATCGCACCAAGGTATTCTTTTCCGCCATCGATGTTGTTCCTTTGACCATAAATCGTGTTTTCAGCGCGCGTGGGCATTCCAGAAGCATGTGGTGTGTCCATGAGATCCGCTTGCGTCATTACGGCTGAGTTCGAGACCGGTTATTTCATTGCGGTTCGAATTCATTAATTAATCCCCAATATTTCTCTAAGGGAGGAGGTTATCAACTAATCTCATTAAATCTGTACTTATGATCAGTGCAGGTTTGCCGCATTACTACTTGCAGTGATCAATGAAGCATAATGTTGGACCAATTCATCGGGACAGGTGTAACTTACATCTTGCGCCACATCCTACCGCTTCCACCGTGGGTTGGTACTGTCGCCCCCCTCTGTCGGTCGAGCAGTAGAGCGACGCATAGATTGCGGCGCGTCTCATGGTCCGGTCAACCTTAATTTTGACTGGGGCGGCGGATTACCATCATAGGGAGGTCAGTCTGGCTTATCCAAAGCTGGTGCTTGGGTTTTCTTACTTCACGAGAGGCAGAGGGCAAGAGTGTATGATCATTCACGTTGTTAAAAGACAGATCCGGTTGAGTGGTTATAGTCAAACCAACACTGAACGCCGAATGAGGGTGCCGGTCTGAGACCTCATGTCAAAGTGTAACAGTTTTC
+).map(&:chars)
+
+cols = mat.first.size
+
+cons = []
+
+profile = {
+ 'A' => [],
+ 'C' => [],
+ 'G' => [],
+ 'T' => [],
+}
+
+mat.each do |row|
+ row.each_with_index do |x, i|
+ cons[i] ||= {}
+ cons[i][x] ||= 0
+ cons[i][x] += 1
+
+ profile[x][i] ||= 0
+ profile[x][i] += 1
+ end
+end
+
+puts cons.map { |xs| xs.max_by { |(k,v)| v }[0] }.join
+%w( A C G T ).each do |c|
+ printf("%s: %s\n", c, profile[c].map { |g| g ? g : 0 }.join(' '))
+end
+

0 comments on commit 225768b

Please sign in to comment.
Something went wrong with that request. Please try again.