pybedtools.contrib.plotting.TrackCollection¶
-
class
pybedtools.contrib.plotting.
TrackCollection
(config, yheight=1, figsize=None, padding=0.1)[source]¶ -
__init__
(config, yheight=1, figsize=None, padding=0.1)[source]¶ Handles multiple tracks on the same figure.
Parameters: - config --
A list of tuples that configures tracks.
Each tuple contains a filename, BedTool object, or other iterable of pybedtools.Interval objects and a dictionary of keyword args that will be used to create a corresponding Track object, e.g.:
[ ('a.bed', dict(color='r', alpha=0.5, label='a')), (BedTool('a.bed').intersect('b.bed'), dict(color='g', label='b')), ]
In this dictionary, do not specify
ybase
, since that will be handled for you. Also do not specifyyheight
in these dictionaries --yheight
should be provided as a separate kwarg to so that thepadding
kwarg works correctly. - figsize -- Figure size tuple of (width, height), in inches.
- padding -- Amount of padding to place in between tracks, as a fraction of
yheight
- config --
Methods
__init__
(config[, yheight, figsize, padding])Handles multiple tracks on the same figure. plot
([ax])If ax
is None, create a new figure.-