Agent skill

Bio Data Visualization Upset Plots

by GPTomics in GPTomics/bioSkills

Build UpSet plots to visualize set intersections beyond 4 sets (where Venn fails) using ComplexUpset (modern, ggplot2-grammar) or the unmaintained UpSetR, with explicit cardinality vs degree…

MITAuto-check passedData & Analytics

Install Bio Data Visualization Upset Plots

skills CLI
$ npx skills add GPTomics/bioSkills --skill bio-data-visualization-upset-plots -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install GPTomics/bioSkills bio-data-visualization-upset-plots --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/GPTomics/bioSkills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/data-visualization/upset-plots .claude/skills/bio-data-visualization-upset-plots && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
bio-data-visualization-upset-plots
GitHub stars
1.2k
Used in
2 other repos
Token cost
~2.9k tokens
SKILL.md length
977 words
Files
4
Skills in repo
552
Repo updated
First seen
Licence
MIT

At a glance

Build UpSet plots to visualize set intersections beyond 4 sets (where Venn fails) using ComplexUpset (modern, ggplot2-grammar) or the unmaintained UpSetR, with explicit cardinality vs degree…

  • Comparing overlap across many gene sets
  • SKILL.md covers Version Compatibility, The Single Most Important…, ComplexUpset (Modern Default) and Sorting -- Cardinality vs Degree, plus 10 more sections
  • Runs R and Python scripts from its folder; calls pip
  • Any set membership matrix where Venn diagrams become illegible

What it does

Bio Data Visualization Upset Plots is an agent skill from GPTomics/bioSkills. Build UpSet plots to visualize set intersections beyond 4 sets (where Venn fails) using ComplexUpset (modern, ggplot2-grammar) or the unmaintained UpSetR, with explicit cardinality vs degree sorting, attribute panels, and query highlighting. Use when comparing overlap across many gene sets, peak sets, variant lists, or any set membership matrix where Venn diagrams become illegible.

Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files (for example `examples/upset_python.py` and `usage-guide.md`).

It sits in Data & Analytics, covering Data visualization and Diagrams. It works with Python. The repository describes itself as: a set of SKILLS.md for doing bioinformatics with agents like claude code. The licence is MIT.

When your agent uses it

  • Comparing overlap across many gene sets
  • Any set membership matrix where Venn diagrams become illegible

Example prompts

  • “/bio-data-visualization-upset-plots”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit d91ed3d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (R and Python), which the agent can run.

    Shell commands in SKILL.md call:

    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Bio Data Visualization Upset Plots loads about 2.9k tokens when it runs. Until then it costs about 105 tokens; SKILL.md has 977 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~105
When it runs · the whole SKILL.md, loaded when a task matches
~2.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from GPTomics/bioSkills at commit d91ed3d, republished under its MIT licence (© GPTomics). 977 words, ~2,939 tokens.

Download SKILL.mdSave it as .claude/skills/bio-data-visualization-upset-plots/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
bio-data-visualization-upset-plots
description
Build UpSet plots to visualize set intersections beyond 4 sets (where Venn fails) using ComplexUpset (modern, ggplot2-grammar) or the unmaintained UpSetR, with explicit cardinality vs degree sorting, attribute panels, and query highlighting. Use when comparing overlap across many gene sets, peak sets, variant lists, or any set membership matrix where Venn diagrams become illegible.
tool_type
mixed
primary_tool
ComplexUpset

Version Compatibility

Reference examples tested with: ComplexUpset 1.3+ (R, Krassowski), UpSetR 1.4.0 (last 2019 release; effectively unmaintained), upsetplot 0.9+ (Python).

Before using code patterns, verify installed versions match. If versions differ:

  • R: packageVersion('<pkg>') then ?function_name
  • Python: pip show <package> then help(module.function)

If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.

UpSet Plots

"Show set intersections for 4+ sets" -> Replace Venn diagrams (which become illegible past 4 sets) with UpSet (Lex 2014 IEEE TVCG 20:1983). The display: a matrix of dots indicating which sets participate in each intersection, with a vertical bar above each column showing intersection size and horizontal bars on the left showing per-set total size. Sort by intersection size (cardinality) for "biggest overlaps first" or by degree (number of sets) for grouped layout.

  • R: ComplexUpset::upset (Krassowski; ggplot2-native, recommended), UpSetR::upset (Conway 2017; legacy, unmaintained)
  • Python: upsetplot.UpSet

The Single Most Important Modern Insight -- UpSetR Is Effectively Unmaintained

UpSetR (Conway, Lex, Gehlenborg 2017 Bioinformatics 33:2938) is the original R implementation but has had no CRAN release since v1.4.0 (2019). ComplexUpset (Krassowski; CRAN active through 2025-07) is the actively maintained ggplot2-grammar replacement. For new work in 2026, prefer ComplexUpset. Caveat: ggplot2 4.0 (mid-2025) broke ComplexUpset's upset() function (issue #213); pin to compatible versions until patched.

The Lex 2014 paper and underlying UpSet visualization concept are not affected — the visualization is the same; the difference is which R package implements it best in the current ecosystem.

ComplexUpset (Modern Default)

Goal: Render a set-intersection plot with cardinality-sorted bars, optional metadata stacks (e.g., percent of intersection significant), and pre-specified queries highlighting biologically relevant intersections.

Approach: Convert set memberships to a long-format data frame with one row per element and binary columns per set; pass to upset() with intersections='all' or pre-specified subset; use ComplexUpset::upset_query to highlight intersections.

r
library(ComplexUpset)
library(ggplot2)

# Convert from list of sets to long format
sets <- list(SetA = c('Gene1','Gene2','Gene3','Gene4'),
             SetB = c('Gene2','Gene3','Gene5','Gene6'),
             SetC = c('Gene1','Gene3','Gene6','Gene7'),
             SetD = c('Gene3','Gene4','Gene7','Gene8'))

# Long-format binary membership matrix
all_elements <- unique(unlist(sets))
df <- data.frame(element = all_elements)
for (s in names(sets)) df[[s]] <- df$element %in% sets[[s]]

# UpSet
upset(df,
      intersect = names(sets),                          # which columns are sets
      n_intersections = 20,                             # show top 20 intersections
      sort_intersections = 'descending',                # by cardinality
      sort_intersections_by = 'cardinality',            # 'cardinality' OR 'degree'
      base_annotations = list(
          'Intersection size' = intersection_size(
              counts = TRUE,
              text = list(size = 3))),
      themes = upset_modify_themes(
          list('Intersection size' = theme(panel.grid = element_blank()))))

Sorting -- Cardinality vs Degree

Cardinality sort (default): intersections ordered by size (largest first). Reveals "the biggest overlap is A∩B."

Degree sort: intersections grouped by number of sets they include (1-set intersections, then 2-set, then 3-set, etc.). Reveals "how distributed are the overlaps across set counts?"

Choose based on the scientific question. Cardinality is the default for "find the biggest overlap"; degree is appropriate when comparing across "exclusive to 1 set" vs "shared by all."

Pre-Specified Queries / Highlighting

r
upset(df,
      intersect = names(sets),
      queries = list(
          upset_query(intersect = c('SetA', 'SetB'),
                       color = '#D55E00', fill = '#D55E00',
                       only_components = c('intersections_matrix', 'Intersection size')),
          upset_query(intersect = c('SetA', 'SetC', 'SetD'),
                       color = '#0072B2', fill = '#0072B2',
                       only_components = c('intersections_matrix', 'Intersection size'))))

Attribute Panels (ComplexUpset Strength)

Unlike UpSetR's "boxplot.summary," ComplexUpset supports arbitrary ggplot annotations stacked above the intersection bars:

r
upset(df,
      intersect = names(sets),
      annotations = list(
          'log2 FC' = ggplot(mapping = aes(x = intersection, y = log2FC)) +
                       geom_boxplot() + theme_classic(),
          'Significant fraction' = ggplot(mapping = aes(x = intersection, fill = significant)) +
                                    geom_bar(position = 'fill') +
                                    scale_fill_manual(values = c('TRUE' = '#D55E00', 'FALSE' = 'grey80')) +
                                    theme_classic()))

upsetplot (Python)

python
from upsetplot import from_contents, UpSet
import matplotlib.pyplot as plt

sets = {'SetA': ['Gene1','Gene2','Gene3','Gene4'],
        'SetB': ['Gene2','Gene3','Gene5','Gene6'],
        'SetC': ['Gene1','Gene3','Gene6','Gene7']}
data = from_contents(sets)

upset = UpSet(data,
              subset_size='count',
              show_counts=True,
              sort_by='cardinality',                    # 'cardinality' OR 'degree'
              sort_categories_by='cardinality',
              facecolor='#0072B2',
              element_size=40)
upset.style_subsets(present=['SetA', 'SetB'], facecolor='#D55E00')   # highlight specific intersection
fig = plt.figure(figsize=(8, 5))
upset.plot(fig=fig)
plt.savefig('upset.pdf', bbox_inches='tight')

UpSetR (Legacy — Use Only for Reproducibility)

r
library(UpSetR)
upset(fromList(sets),
      nsets = 4, nintersects = 20,
      order.by = 'freq',
      decreasing = TRUE,
      mb.ratio = c(0.6, 0.4),
      point.size = 3,
      line.size = 1,
      text.scale = c(1.5, 1.3, 1.3, 1, 1.5, 1.3))

UpSetR works but lacks ggplot2 grammar and active maintenance. Reproducing a paper's UpSetR figure is the main reason to use it in 2026.

Per-Method Failure Modes

Using UpSetR for new work in 2026

Trigger: Following older tutorials that default to UpSetR.

Mechanism: UpSetR has not had a CRAN release since 2019; integration with current ggplot2 / R ecosystem stale.

Symptom: Limited customization; ggplot2 layer not available; eventual breakage.

Fix: Switch to ComplexUpset for new figures. UpSetR is fine for reproducing old figures.

ggplot2 4.0 broke ComplexUpset

Trigger: ggplot2 4.0 (mid-2025) introduced API changes; ComplexUpset's upset() errored.

Mechanism: Upstream ggplot2 changes affected ComplexUpset internals (issue #213).

Symptom: "Error in upset(): ..." after ggplot2 upgrade.

Fix: Pin compatible versions (renv::install('ggplot2@3.5.2')) until ComplexUpset patches. Check GitHub issues for fix status.

Too many sets makes UpSet unreadable

Trigger: UpSet with 10+ sets and n_intersections = Inf.

Mechanism: Number of possible intersections is 2^N − 1; with 10 sets that's 1023 columns.

Symptom: Vertical bars too thin to read; matrix dots unrecognizable.

Fix: Set n_intersections = 20 (or whatever fits); pre-filter to relevant intersections via intersections = list(c('SetA','SetB'), c('SetA','SetC','SetD')).

Show full SKILL.md (392 more words)Show less
Single-set "intersections" obscure cross-set overlap story

Trigger: Default sort by cardinality puts "set exclusives" first (often largest).

Mechanism: "SetA only" is technically a 1-set intersection; usually larger than any 2+set overlap.

Symptom: First 4-5 bars are "exclusive to X," obscuring the cross-set story.

Fix: Filter via intersections argument to exclude 1-set; OR sort by degree to group; OR use mode='intersect' (vs 'distinct') for different counting.

Element duplicate across sets in fromList

Trigger: Same element appears in multiple sets but stored as duplicate rows.

Mechanism: fromList expects each element appears once per set; duplicates inflate counts.

Symptom: Intersection counts don't sum to known totals.

Fix: lapply(sets, unique) before fromList.

upsetplot from_contents vs from_indicators

Trigger: Wrong input format function used.

Mechanism: from_contents for dict of element lists; from_indicators for already-pivoted binary frame.

Symptom: TypeError or wrong intersections.

Fix: Check input shape; use the appropriate constructor.

Reconciliation: When Implementations Differ

PatternCauseAction
ComplexUpset and UpSetR show different intersection countsDifferent element duplication handlinglapply(sets, unique); verify both agree
ComplexUpset slow on >10 sets2^N intersections enumeratedPre-specify relevant intersections; use n_intersections
upsetplot Python output differs from Rsort_by default differsSet sort_by explicitly in both
Excluding 1-set intersectionsmode='distinct' vs 'intersect'intersections parameter; document

Quantitative Thresholds

ThresholdValueSource
Max sets for legible UpSet8-10Visualization practical
Show top intersections15-25Above this matrix too thin
When to use UpSet vs Venn>3 setsLex 2014
2^N intersectionsgrows exponentiallySet n_intersections limit

Common Errors

Error / symptomCauseSolution
Intersection columns too thinToo many intersections shownn_intersections = 20; pre-filter
1-set bars dominateDefault cardinality sortExclude 1-set OR sort by degree
Intersection counts wrongDuplicate elements in fromList inputlapply(sets, unique)
UpSetR error after R upgradeUnmaintained packageSwitch to ComplexUpset
ComplexUpset breaks after ggplot2 updateggplot2 4.0 issue #213Pin ggplot2 ≤ 3.5.2
Python upsetplot mismatch with RDifferent default sortStandardize sort_by

References

  • Conway JR, Lex A, Gehlenborg N. 2017. UpSetR: an R package for the visualization of intersecting sets and their properties. Bioinformatics 33(18):2938-2940.
  • Krassowski M. 2020. ComplexUpset (R package). https://github.com/krassowski/complex-upset
  • Lex A, Gehlenborg N, Strobelt H, Vuillemot R, Pfister H. 2014. UpSet: visualization of intersecting sets. IEEE Trans Vis Comput Graph 20(12):1983-1992.
  • data-visualization/heatmaps-clustering - Alternative for smaller set membership (Venn alternative is OncoPrint-style)
  • pathway-analysis/go-enrichment - Gene-set overlaps to visualize
  • differential-expression/de-results - DE gene-list comparisons
  • data-visualization/flow-and-transition-plots - Alluvial as alternative for membership flow

© GPTomics, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files in data-visualization/upset-plots of GPTomics/bioSkills.

  • SKILL.md
  • examples/upset_gene_sets.R
  • examples/upset_python.py
  • usage-guide.md

Open the folder on GitHubat commit d91ed3d

Used in 2 other repositories

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in GPTomics/bioSkills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Bio Data Visualization Upset Plots next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Bio Data Visualization Upset Plots compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Bio Data Visualization Upset Plots this skillGPTomics/bioSkills1.2k2 repos~2.9kAutomated safety check: PassMIT
Academic Figurejoshua-zyy/academic-paper-writer1151 repos~816Automated safety check: PassMIT
Scientific Schematicsjimmc414/Kosmos594—~16kAutomated safety check: NotesNone
Microsim Generatordmccreary/ibook-skills105—~11kAutomated safety check: PassNone
Visual Designaws-samples/sample-strands-agent-with-agentcore195—~1.5kAutomated safety check: PassMIT
Scientific Figure MakingChenLiu-1996/figures4papers8.2k—~557Automated safety check: PassCustom licence

Similar skills

  • Academic Figure

    joshua-zyy/academic-paper-writer

    Create, revise, or audit academic data/result figures for CS/AI/ML papers.

    115 GitHub starsUsed in 1 repo~816 tokens
    Data & AnalyticsAuto-check passed
  • Scientific Schematics

    jimmc414/Kosmos

    Create publication-quality scientific diagrams, flowcharts, and schematics using Python (graphviz, matplotlib, schemdraw, networkx).

    594 GitHub stars~16k tokensUpdated 4 days ago
    Data & AnalyticsAuto-check: notes
  • Microsim Generator

    dmccreary/ibook-skills

    Creates interactive educational MicroSims, routing to the best-matched generator - p5.js, Chart.js, Plotly, Mermaid, vis-network, timelines, maps, Venn, causal-loop/feedback-loop diagrams (CLD)…

    105 GitHub stars~11k tokensUpdated yesterday
    Data & AnalyticsAuto-check passed
  • Visual Design

    aws-samples/sample-strands-agent-with-agentcore

    Official

    Use this skill any time the user needs a visual output as an image or PDF — charts, diagrams, posters, infographics, abstract artwork, or any visual design.

    195 GitHub stars~1.5k tokensUpdated 2 days ago
    Media & CreativeAuto-check passed
  • Scientific Figure Making

    ChenLiu-1996/figures4papers

    Covers publication-ready matplotlib figures for academic papers, slides, and reports—bars, trends, scatter, heatmaps, and multi-panel layouts—with this…

    8.2k GitHub stars~557 tokensUpdated 2 days ago
    Data & AnalyticsAuto-check passed
  • D3 Viz

    calesthio/OpenMontage

    Creating interactive data visualisations using d3.js. An agent skill from calesthio/OpenMontage.

    65k GitHub starsUsed in 3 repos~5.4k tokens
    Data & AnalyticsAuto-check passed

More from GPTomics/bioSkills

All 552 skills in this repo
  • Bio Alignment Io

    GPTomics/bioSkills

    Read, write, and convert multiple sequence alignment files using Biopython Bio.AlignIO.

    1.2k GitHub starsUsed in 3 repos~4.9k tokens
    Auto-check passed
  • bioSkills Installer

    GPTomics/bioSkills

    Installs the bioSkills collection of 425 bioinformatics skills in one step, or only chosen categories, so sequencing, RNA-seq, single-cell and variant tasks get specialized help.

    1.2k GitHub starsUsed in 1 repo~789 tokens
    Auto-check passed
  • Bio Write Sequences

    GPTomics/bioSkills

    Write biological sequences to files (FASTA, FASTQ, GenBank, EMBL) using Biopython Bio.SeqIO.

    1.2k GitHub starsUsed in 3 repos~2.1k tokens
    Auto-check passed
  • Amplicon Primer Clipping

    GPTomics/bioSkills

    Soft- or hard-clips PCR primer footprints from aligned amplicon BAMs so primer bases stop masquerading as confirmed reference sequence.

    1.2k GitHub starsUsed in 2 repos~2.2k tokens
    Auto-check passed
  • Bio Alignment Indexing

    GPTomics/bioSkills

    Create and use BAI/CSI indices for BAM/CRAM files using samtools and pysam.

    1.2k GitHub starsUsed in 2 repos~2.4k tokens
    Auto-check passed
  • Bio Alignment Sorting

    GPTomics/bioSkills

    Sort alignment files by coordinate or read name using samtools and pysam.

    1.2k GitHub starsUsed in 2 repos~2.6k tokens
    Auto-check passed

Works with

Questions about Bio Data Visualization Upset Plots

What does Bio Data Visualization Upset Plots do?

Build UpSet plots to visualize set intersections beyond 4 sets (where Venn fails) using ComplexUpset (modern, ggplot2-grammar) or the unmaintained UpSetR, with explicit cardinality vs degree…. Bio Data Visualization Upset Plots is an agent skill from GPTomics/bioSkills. Build UpSet plots to visualize set intersections beyond 4 sets (where Venn fails) using ComplexUpset (modern, ggplot2-grammar) or the unmaintained UpSetR, with explicit cardinality vs degree sorting, attribute panels, and query highlighting.

When should I use Bio Data Visualization Upset Plots?

Bio Data Visualization Upset Plots fits situations like: comparing overlap across many gene sets; any set membership matrix where Venn diagrams become illegible.

How do I install Bio Data Visualization Upset Plots in Claude Code?

Run `npx skills add GPTomics/bioSkills --skill bio-data-visualization-upset-plots -a claude-code`. Or copy the skill folder (data-visualization/upset-plots in GPTomics/bioSkills) into .claude/skills/bio-data-visualization-upset-plots in your project. Claude Code loads it when a task matches its description.

How do I install Bio Data Visualization Upset Plots in Codex?

Run `npx skills add GPTomics/bioSkills --skill bio-data-visualization-upset-plots -a codex`. Or copy the skill folder (data-visualization/upset-plots in GPTomics/bioSkills) into .agents/skills/bio-data-visualization-upset-plots in your project. Codex loads it when a task matches its description.

Can I use Bio Data Visualization Upset Plots in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add GPTomics/bioSkills --skill bio-data-visualization-upset-plots -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/bio-data-visualization-upset-plots, .gemini/skills/bio-data-visualization-upset-plots, .github/skills/bio-data-visualization-upset-plots and .opencode/skills/bio-data-visualization-upset-plots in your project.

What does Bio Data Visualization Upset Plots need to run?

Going by SKILL.md and its folder, Bio Data Visualization Upset Plots needs R and Python for the scripts in its folder and the command-line tools its instructions call (pip). Our summary lists: Python 3.

Does Bio Data Visualization Upset Plots access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Bio Data Visualization Upset Plots safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Bio Data Visualization Upset Plots use?

Bio Data Visualization Upset Plots is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Bio Data Visualization Upset Plots use?

About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Bio Data Visualization Upset Plots?

Skills that share tags, products or a category with Bio Data Visualization Upset Plots: Academic Figure (joshua-zyy/academic-paper-writer, 115 stars), Scientific Schematics (jimmc414/Kosmos, 594 stars), Microsim Generator (dmccreary/ibook-skills, 105 stars) and Visual Design (aws-samples/sample-strands-agent-with-agentcore, 195 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Bio Data Visualization Upset Plots?

GPTomics (a GitHub organization) maintains it in GPTomics/bioSkills, which has 1,215 GitHub stars. The repository holds 552 skills in this directory. The repository was last updated on August 15, 2026.

Source: GPTomics/bioSkills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.