# pybedtools.contrib.plotting.BedToolsDemo

class pybedtools.contrib.plotting.BedToolsDemo(config, method, data_path=None, result_kwargs=None, method_kwargs=None, title_kwargs=None, new_style=True, subplots_adjust=None, *args, **kwargs)
  __init__(config, method, data_path=None, result_kwargs=None, method_kwargs=None, title_kwargs=None, new_style=True, subplots_adjust=None, *args, **kwargs)

    Class to handle BEDTools demos in a way that maintains flexibility.

    If the `config` list contains only one item, assume the method is one of the “-i” tools that only operate on one file.

    If the `config` list contains two items, then use the first as “-a” and the second as “-b”.

    Parameters

      - config – Either a list of (filename, options) tuples – see docstring for TrackCollection for more info.

      - method – Method of `BedTool` object to use, e.g., ‘intersect’

      - data_path – If not None, this path will be prepended to the files listed in `config`

      - result_kwargs – Configuration for the results track. This isn’t added to the config list because the results haven’t been created yet…

      - method_kwargs – Keyword argument that are passed to the method, e.g., `u=True`

      - title_kwargs – Keyword args for plot title (the text itself will come from the command that was run; this is for things like font size)

      - new_style – Edit commands so that they use the “new style” BEDTools calls (“bedtools intersect” rather than “intersectBed”)

      - subplots_adjust – Additional kwargs sent to the figure’s subplots_adjust() method, e.g., `dict(top=0.7)`

      - args – Addtional arguments sent to TrackCollection

      - kwargs – Additional keyword arguments sent to TrackCollection

  Methods

  `__init__`(config, method[, data_path, ...]) | Class to handle BEDTools demos in a way that maintains flexibility.
  `plot`([ax]) | If `ax` is None, create a new figure.