def compare(other)
      case
      when self.chrom != other.chrom
        :different_chrom
      when other.chr_end.between?(self.chr_start - @adjacent, self.chr_start - 1)
        :left_adjacent
      when other.chr_start.between?(self.chr_end + 1, self.chr_end + @adjacent)
        :right_adjacent
      when other.chr_end < self.chr_start
        :left_off
      when self.chr_end < other.chr_start
        :right_off
      when (self.chr_start == other.chr_start) &&
          (self.chr_end == other.chr_end)
        :equal
      when (other.chr_start.between?(self.chr_start, self.chr_end)) &&
          (other.chr_end.between?(self.chr_start, self.chr_end))
        :contained_by
      when (self.chr_start.between?(other.chr_start, other.chr_end)) &&
          (self.chr_end.between?(other.chr_start, other.chr_end))
        :contains
      when (other.chr_start < self.chr_start) &&
          (other.chr_end.between?(self.chr_start, self.chr_end))
        :left_overlapped
      when (other.chr_start.between?(self.chr_start, self.chr_end)) &&
          (self.chr_end < other.chr_end)
        :right_overlapped
      else
        raise Exception, "must not happen"
      end
    end
def compare(other)
      case
      when self.chrom != other.chrom
        :different_chrom
      when other.chr_end.between?(self.chr_start - @adjacent, self.chr_start - 1)
        :left_adjacent
      when other.chr_start.between?(self.chr_end + 1, self.chr_end + @adjacent)
        :right_adjacent
      when other.chr_end < self.chr_start
        :left_off
      when self.chr_end < other.chr_start
        :right_off
      when (self.chr_start == other.chr_start) &&
          (self.chr_end == other.chr_end)
        :equal
      when (other.chr_start.between?(self.chr_start, self.chr_end)) &&
          (other.chr_end.between?(self.chr_start, self.chr_end))
        :contained_by
      when (self.chr_start.between?(other.chr_start, other.chr_end)) &&
          (self.chr_end.between?(other.chr_start, other.chr_end))
        :contains
      when (other.chr_start < self.chr_start) &&
          (other.chr_end.between?(self.chr_start, self.chr_end))
        :left_overlapped
      when (other.chr_start.between?(self.chr_start, self.chr_end)) &&
          (self.chr_end < other.chr_end)
        :right_overlapped
      else
        raise Exception, "must not happen"
      end
    end
returns one of the followings:
  :different_chrom, :left_adjacent, :right_adjacent
  :left_off, :right_off, :equal
  :contained_by, :contains, :left_overlapped, :right_overlapped
 Imagine that the receiver object is fixed on a number line