pybedtools.bedtool.BedTool.absolute_distance

BedTool.absolute_distance(other: BedTool, closest_kwargs: dict[str, Any] | None = None, use_midpoints: bool = False) Iterator[int][source]

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

If use_midpoints is True, then only use the midpoints of features (which will return values where features are overlapping). Otherwise, when features overlap the value will always be zero.

closest_kwargs are passed to self.closest(); either d or ‘D` are required in order to get back distance values (d=True is default)