# pybedtools.contrib.venn_maker.venn_maker

pybedtools.contrib.venn_maker.venn_maker(beds, names=None, figure_filename=None, script_filename=None, additional_args=None, run=False)

  Given a list of interval files, write an R script to create a Venn diagram of overlaps (and optionally run it).

  The R script calls the venn.diagram function of the R package VennDiagram for extremely flexible Venn and Euler diagram creation. Uses `cleaned_intersect()` to create string representations of shared intervals.

  `beds` is a list of up to 4 filenames or BedTools.

  `names` is a list of names to use for the Venn diagram, in the same order as `beds`. Default is “abcd”[:len(beds)].

  `figure_filename` is the TIFF file to save the figure as.

  `script_filename` is the optional filename to write the R script to

  `additional_args` is list that will be inserted into the R script, verbatim. For example, to use scaled Euler diagrams with different colors, use:

      additional_args = ['euler.d=TRUE',
                         'scaled=TRUE',
                         'cat.col=c("red","blue")']

  If `run` is True, then assume R is installed, is on the path, and has VennDiagram installed … and run the script. The resulting filename will be saved as `figure_filename`.