pybedtools.bedtool.BedTool.any_hits

BedTool.any_hits(interval, same_strand=False, overlap=0.0)[source]

Return whether or not any intervals overlap interval.

Calls the any_hits method of an IntervalFile. If there were any hits within interval in this BedTool, then return 1; otherwise 0.

Require that overlaps have the same strand with same_strand=True.

Notes:

If this current BedTool is generator-based, it will be converted into a file first.

If this current BedTool refers to a BAM file, it will be converted to a BED file first using default arguments. If you don’t want this to happen, please convert to BED first before using this method.