bio.intervals

Source code: bio/intervals.seq

class bio.intervals.Interval

Properties:

start
end

Magic methods:

__new__(st: int, en: int, chrom_id: int)
__len__()
__bool__()

Methods:

with_max(max: int)
class bio.intervals.IntervalTree

Interval tree data structure. Adapted from [cgranges](https://github.com/lh3/cgranges).

Magic methods:

__init__()
__len__()
__bool__()
__contains__(chrom: str)
__iter__()

Iterator over all intervals in the tree

Methods:

add(chrom: str, start: int, end: int)

Adds an interval to the tree. An interval is a chromosome name chrom and 0-based start and end (non-inclusive) positions.

index()

Indexes the tree for querying.

overlap(chrom: str, start: int, end: int)

Yields all `Interval`s overlapping the argument interval.