# pybedtools.bedtool.BedTool.relative_distance

BedTool.relative_distance(other, genome=None, g=None)

  Returns an iterator of relative distances between features in self and other.

  First computes the midpoints of self and other, then returns distances of each feature in `other` relative to the distance between `self` features.

  Requires either `genome` (dictionary of chromsizes or assembly name) or `g` (filename of chromsizes file).