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.
btsis an iterable of BedTool objects or filenames;namesis 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
summaryis a dictionary summarizing the results andmis the sorted NumPy array. See source for further details.