vennDiagramLab

CRAN status CRAN downloads R CMD check Lifecycle: stable License: MIT DOI (Zenodo concept) DOI (CRAN)

vennDiagramLab is the R companion to the Venn Diagram Lab web tool and the Python venn-diagram-lab package. It provides headless Venn / UpSet / Network diagram analysis and rendering for bioinformaticians and biostatisticians who work natively in R, with byte-equivalent outputs that match the web tool and the Python package down to the byte.

1. Features

2. Install

vennDiagramLab is on CRAN (current version: 2.4.2):

install.packages("vennDiagramLab")

CRAN binaries are built for the three current major Windows / macOS / Linux R versions. Source-only? install.packages("vennDiagramLab", type = "source").

2.2. From Bioconductor (alternate channel once published)

if (!require("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install("vennDiagramLab")

2.3. Development version (GitHub)

The package source lives in the r/ subdirectory of the monorepo:

install.packages("remotes")
remotes::install_github("ZoliQua/Venn-Diagram-Lab", subdir = "r")

A standalone mirror (no subdir = needed) is kept in sync on every push to main for Bioconductor’s Single Package Builder, which requires DESCRIPTION at repo root:

remotes::install_github("ZoliQua/vennDiagramLab")

Both installs produce the same package; the mirror exists purely to satisfy Bioc’s submission tooling.

3. Quickstart

library(vennDiagramLab)

# Load a bundled dataset (4 cancer driver source catalogs)
ds     <- load_sample("dataset_real_cancer_drivers_4")
result <- analyze(ds)

# Render the Venn diagram as SVG
svg <- render_venn_svg(result, title = "Cancer driver overlap")
writeLines(svg, "cancer_drivers.svg")

# Or get a tidy summary
broom::tidy(result)

# Or generate a multi-page PDF report
to_pdf_report(result, "cancer_drivers.pdf")

See vignette("v01_quickstart") for the full intro and browseVignettes("vennDiagramLab") for the complete eight-vignette gallery.

3.1 Complete User Guide

You can reach the complete USER GUIDE here in markdown format or downlad it as a PDF File.

4. Statistics surfaces

Two additional statistics surfaces complement the pairwise tables, matching the web tool’s Statistics panel and the Python package:

Function Purpose
item_share_distribution(matrix) Histogram of how many sets each item belongs to (1, 2, …, n)
cluster_set_order(D, linkage = "average") UPGMA / complete / single hierarchical linkage on a distance matrix; returns leaf order plus dendrogram merges
render_share_distribution(dataset) SVG bar chart of the item-share distribution
render_cluster_heatmap(result, linkage = "average") Pairwise-Jaccard heatmap with UPGMA-reordered axes and side dendrograms
library(vennDiagramLab)

ds  <- load_sample("dataset_real_cancer_drivers_4")
res <- analyze(ds)

img <- render_share_distribution(ds)
substr(slot(img, "content"), 1L, 200L)

heatmap <- render_cluster_heatmap(res, linkage = "average")
substr(slot(heatmap, "content"), 1L, 200L)

Both renderers return an SvgImage S4 object (slots: content, width, height), the same shape as render_venn_svg().

5. PDF report — About + Credits

to_pdf_report() closes with the unified About This Report appendix shared across the webtool, the Python package, and this companion: 12 structured sections (intro, Plots, Statistics) followed by a Credits and Cite footer listing authors, package URLs, and the Zenodo DOI. Section titles render in bold, bodies in plain weight, and the content auto-paginates across as many landscape pages as needed.

6. Latest additions (v2.2.3)

6.1. Render + PDF + bundle parity

to_pdf_report() also gains include_share = TRUE (Item Share Distribution page, on by default) and include_cluster = FALSE (Cluster Heatmap page, opt-in) flags.

6.2. Item display, Highlight, Region accessors, Boolean DSL

The four new helpers chain naturally:

masks <- parse_region_expression("A & B + B & C", n_sets = 4L)
img   <- render_venn_svg(result, highlight = masks, show_items = TRUE)
items <- exclusive_items(result, c("A", "B"))

7. Documentation

vennDiagramLab is one of three coordinated implementations sharing the same SVG model library, statistics, and byte-equivalent TSV outputs:

9. Source repositories

The mirror is read-only — file changes should always be made in the monorepo. A GitHub Action splits the r/ subtree and force-pushes it (with a Bioc 0.99.z Version override) to the mirror on every push to main.

9. Citation

If you use vennDiagramLab in published work, please cite both the software and the version you used.

After install:

citation("vennDiagramLab")

returns a bibentry with the correct version + DOI for the installed copy.

10.1. DOIs

Two stable identifiers are available — pick whichever fits your reference style:

DOI Resolves to When to use
10.32614/CRAN.package.vennDiagramLab (link) The CRAN package page Citing the package as a CRAN release
10.5281/zenodo.19510813 (link) The Zenodo concept record — always resolves to the latest archived version Citing the software as an archived artifact (“Cite all versions” — no need to update per release)

10.2. Plain-text citation

Dul Z., Ölbei M., Thomas N.S.B., Si Ammour A., Csikász-Nagy A. (2026).
vennDiagramLab: Headless Venn diagram analysis and rendering.
R package version 2.2.2.
https://CRAN.R-project.org/package=vennDiagramLab
DOI: 10.32614/CRAN.package.vennDiagramLab

DOI

10. Contributing + bug reports

11. License

MIT — see LICENSE.