Ranges in ruby are pretty cool. I end up with arrays such as this:
geneRanges = [(234..25), (500..510), (1640..1653)]
And subsequently ha
ar=[505, 506, 507, 600, 1647, 1648, 1649, 1650, 1651, 1654] def to_range(a) s=a[0] a.each_cons(2) do |a| if a[1]-a[0]!=1 p s .. a[0] s=a[1] end end left=a.index(s) p a[left..-1][0]..a[left..-1][-1] end to_range(ar)