def span_class(sourceinfo, marked, count)
full_scale_range = @fsr
nz_count = sourceinfo.counts.select{ |x| x && x != 0 }
nz_count << 1
max = @max_cache[sourceinfo] ||= nz_count.max
median = @median_cache[sourceinfo] ||= 1.0 * nz_count.sort[nz_count.size/2]
max ||= 2
max = 2 if max == 1
if marked == true
count = 1 if !count || count == 0
idx = 50 + 1.0 * (500/full_scale_range) * Math.log(count/median) / Math.log(10)
idx = idx.to_i
idx = 0 if idx < 0
idx = 100 if idx > 100
"run#{idx}"
else
nil
end
end