GGenomics UI
Components/Clinical & stats

UpSet Plot

@genomics/upset-plot

Set intersections past the point Venn diagrams break.

Preview

4 sets · 14 intersections · 280 in union
Use left and right arrow keys to step between points, Home and End for the first and last, Enter to select, Escape to clear.

Four variant callers over the same sample. Exclusive bars sum to the union, so the leftmost columns read directly as “called by everything” and “unique to one caller”.

About

Comparing gene or variant lists is routine — three callers, four cohorts, six conditions — and the Venn diagram everyone reaches for stops working at four sets. UpSet separates the two questions: a bar chart for how big each intersection is, a dot matrix for which sets it is, both scaling linearly instead of combinatorially. Bars are exclusive by default so they sum to the union and 'unique to one caller' is directly readable. Clicking a bar broadcasts its members on the entity channel, so the genes behind an intersection light up in a linked heatmap rather than being a number you then go and look up.

Usage

import { UpsetPlot } from "@/components/ui/upset-plot"

<UpsetPlot
  sets={[{ name: "GATK", items: gatkGenes }, { name: "DeepVariant", items: dvGenes }]}
/>
Source: components/ui/upset-plot.tsx