pybedtools.contrib.plotting.binary_heatmap¶
- pybedtools.contrib.plotting.binary_heatmap(bts, names, plot=True, cluster=True)[source]¶
Plots a “binary heatmap”, showing the results of a multi-intersection.
Each row is a different genomic region found in at least one of the input BedTools; each column represents a different file. Black indicates whether a feature was found at that particular site. Rows with black all the way across indicates that all features were colocalized at those sites.
bts
is an iterable of BedTool objects or filenames;names
is a list of labels to use in the plot and is exactly the same length asbts
.If
plot=True
, then plot the sorted, labeled matrix with matplotlib.Returns (summary, m) where
summary
is a dictionary summarizing the results andm
is the sorted NumPy array. See source for further details.