bx.intervals.operations.find_clusters module

Find clusters of intervals within a set of intervals. A cluster is a group (of size minregions) of intervals within a specific distance (of mincols) of each other.

Returns Cluster objects, which have a chrom, start, end, and lines (a list of linenumbers from the original file). The original can then be ran through with the linenumbers to extract clustered regions without disturbing original order, or the clusters may themselves be written as intervals.

class bx.intervals.operations.find_clusters.ClusterNode(start, end, linenum, mincols, minregions)

Bases: object

getintervals()
getlines()
insert(start, end, linenum)
push_up(topnode)
rotateleft()
rotateright()
bx.intervals.operations.find_clusters.find_clusters(reader, mincols=1, minregions=2)