pybedtools.bedtool.BedTool.split

BedTool.split(func, *args, **kwargs)[source]

Split each feature using a user-defined function.

Calls the provided function func with each interval. In contrast to each (which does something similar), this method expects func to return an iterable of Interval objects.

args and kwargs are passed directly to func.

Returns a new BedTool.