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.

  • 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.:

            dict(color='r', alpha=0.5, label='a')),
            dict(color='g', label='b')),

    In this dictionary, do not specify ybase, since that will be handled for you. Also do not specify yheight in these dictionaries – yheight should be provided as a separate kwarg to so that the padding 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


__init__(config[, yheight, figsize, padding])

Handles multiple tracks on the same figure.


If ax is None, create a new figure.