Skip to contents

Loading data

Read CSV / TSV / GMT / GMX files into a VennDataset, or load one of the five bundled samples.

load_csv()
Load a delimited file (CSV/TSV) into a [`VennDataset-class`]
load_tsv()
Load a tab-separated file into a [`VennDataset-class`]
load_gmt()
Load a GMT (Gene Matrix Transposed) file into a [`VennDataset-class`]
load_gmx()
Load a GMX file (transposed GMT) into a [`VennDataset-class`]
load_sample()
Load a bundled sample dataset by name
list_samples()
List bundled sample dataset names
list_models()
List all bundled Venn diagram models

Analysis

Compute regions and pairwise statistics from a VennDataset.

analyze()
Analyze a Venn diagram dataset
statistics()
Lazy pairwise statistics for a RegionResult
effective_universe()
Effective hypergeometric universe size for a RegionResult

Rendering

Generate SVG, ggplot2-based UpSet / Network plots, and multi-page PDF reports.

render_venn_svg()
Render a RegionResult onto its model SVG and return the raw SVG string
render_upset()
Render an UpSet plot from a RegionResult
render_network()
Render a force-directed network plot from a RegionResult
to_pdf_report()
Compose a multi-page PDF report from a RegionResult

TSV exports

Byte-equivalent TSV writers for region summaries, item-membership matrices, and pairwise statistics tables.

to_region_summary_tsv()
Write the Region Summary TSV
to_matrix_tsv()
Write the Item Matrix TSV
to_statistics_tsv()
Write the pairwise Statistics TSV

ggplot2 + broom integration

Embed venns in ggplot chains and convert results to tidyverse-friendly tibbles.

geom_venn()
Embed a rendered Venn diagram as a ggplot2 layer
tidy(<RegionResult>)
Tidy method for RegionResult (broom-compatible)
glance(<RegionResult>)
Glance method for RegionResult (broom-compatible)
augment(<RegionResult>)
Augment method for RegionResult (broom-compatible)

Pairwise statistical helpers

Stateless functions for individual metrics. Useful for ad-hoc calculations outside of analyze().

jaccard()
Jaccard similarity index
dice()
Sorensen-Dice coefficient
overlap_coefficient()
Szymkiewicz-Simpson overlap coefficient
hypergeometric_p_value()
One-sided hypergeometric p-value (over-representation)
fold_enrichment()
Fold enrichment (observed / expected ratio)
bh_fdr()
Benjamini-Hochberg FDR adjustment
compute_pairwise()
Compute all 5 pairwise statistical tables

Area-proportional helpers

Low-level geometry solvers behind analyze(model = "proportional").

solve_2set()
Area-proportional 2-set circle layout
solve_3set()
Area-proportional 3-set circle layout (Wilkinson 2012-style triangulation)
circle_intersection_area()
Lens-shaped intersection area of two circles
generate_proportional_svg()
Generate an area-proportional SVG for a 2- or 3-set RegionResult

S4 classes

Result types returned by the loaders and analyzers.

VennDataset-class
VennDataset: in-memory representation of a Venn-diagram input
RegionData-class
RegionData: one region of a Venn diagram
RegionResult-class
RegionResult: result of analyze()
StatisticsResult-class
StatisticsResult: container for pairwise statistical metric tables

Package

vdl_version()
Get the vennDiagramLab package version