# File lib/bio/db/sam/pileup.rb, line 80 def consensus if @consensus.nil? max = self.non_refs.values.max if (self.ref_count / self.coverage) > 0.5 @consensus = self.ref_base elsif self.ref_count > max @consensus = self.ref_base else arr = self.non_refs.select {|k,v| v == max } bases = arr.collect {|b| b[0].to_s } bases << self.ref_base if self.ref_count == max @consensus = bases.sort.join end end @consensus end