# File lib/bio/graphics/ruler.rb, line 52 def first_tick_position(start = @panel.display_start, minor_tick = @minor_tick_distance) # * Find position of first tick. # Most of the time, we don't want the first tick on the very first # basepair of the view. Suppose that would be position 333 in the # sequence. Then the numbers under the major tickmarks would be: # 343, 353, 363, 373 and so on. Instead, we want 350, 360, 370, 380. # So we want to find the position of the first tick. modulo_from_tick = (start % minor_tick) return (start + (modulo_from_tick > 0 ? (minor_tick - modulo_from_tick) : 0)) end