ComplexUpset

A library for creating complex UpSet plots with ggplot2 geoms

https://github.com/krassowski/complex-upset

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 21 DOI reference(s) in README
  • Academic publication links
    Links to: biorxiv.org, medrxiv.org, springer.com, frontiersin.org, zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.9%) to scientific vocabulary

Keywords

ggplot ggplot2 patchwork python rstat rstats upset upsetr venn venn-diagram visualization
Last synced: 6 months ago · JSON representation

Repository

A library for creating complex UpSet plots with ggplot2 geoms

Basic Info
  • Host: GitHub
  • Owner: krassowski
  • License: mit
  • Language: Jupyter Notebook
  • Default Branch: master
  • Homepage:
  • Size: 43.4 MB
Statistics
  • Stars: 519
  • Watchers: 9
  • Forks: 32
  • Open Issues: 74
  • Releases: 21
Topics
ggplot ggplot2 patchwork python rstat rstats upset upsetr venn venn-diagram visualization
Created about 6 years ago · Last pushed almost 2 years ago
Metadata Files
Readme License

README.md

ComplexUpset

test codecov CRAN_version Conda version DOI

Quick links: Documentation | Installation | R examples | Python examples

Showcase

Get all the goodies of UpSetR, but with full extensibility of ggplot2.

Example UpSet plot

Click here to display the source code ```R library(ggplot2) library(ComplexUpset) if(!require(ggplot2movies)) install.packages('ggplot2movies') movies = ggplot2movies::movies genres = c('Action', 'Animation', 'Comedy', 'Drama', 'Documentary', 'Romance') upset( movies, genres, annotations = list( 'Length'=ggplot(mapping=aes(x=intersection, y=length)) + geom_boxplot(), 'Rating'=ggplot(mapping=aes(x=intersection, y=rating)) # if you do not want to install ggbeeswarm, you can use geom_jitter + ggbeeswarm::geom_quasirandom(aes(color=log10(votes))) + geom_violin(width=1.1, alpha=0.5) ), queries=list( upset_query( intersect=c('Drama', 'Comedy'), color='red', fill='red', only_components=c('intersections_matrix', 'Intersection size') ), upset_query( set='Drama', fill='blue' ), upset_query( intersect=c('Romance', 'Drama'), fill='yellow', only_components=c('Length') ) ), min_size=10, width_ratio=0.1 ) ```

The full list of examples is available in the documentation; it also contains instructions for the use from Python.

Install

To get the most recent version, open R and run:

R if(!require(devtools)) install.packages("devtools") devtools::install_github("krassowski/complex-upset")

Alternatively, to get a stable CRAN release (which may be one version behind at times):

R install.packages('ComplexUpset')

Or, if you use conda/mamba:

R conda install -c conda-forge r-complexupset

How it compares to other packages?

  • UpSetR is a powerful tool and the pioneer in the UpSet visualisations; it was not designed to be extended with ggplot components. Unfortunately, the repository is no longer active (for two years now).
  • ggupset uses scales to convert a single plot to upsets plots, e.g. with scale_x_upset - a really nice approach, recommended for simple ggplot.
  • a cowplot-based upset was demonstrated in an online publication, however cowplot (a great tool at the time) got superseded by even greater tool: patchwork, which is what is used by ComplexUpset.
  • ComplexHeatmap also offers a way to generate UpSet plots with annotations; while not ggplot2-centered, it provides extensive customization options, with a clear API. It may be the best choice if you already use it for heatmaps.

Use whichever tool you find the most useful for your particular use. The rational of making this repository public is not only to share the code, but also to demonstrate how simple it is now to create complex visualisations with patchwork (without the need to learn the ggplot internals).

For the interactive use, check out the VCG/upset. Regardless of the tool chosen, you may want to cite (Lex et al, 2014) when using UpSet plots, especially in fields still dominated by Venn diagrams.

Get inspired

Here are example publications and preprints including figures generated with this library:

The list is not meant to be exhaustive, but representative of applications to different fields, and of different usage ideas. You are welcome to add your own publication by suggesting an edit.

Testing

The unit tests are run with testhat, and the visual "doppelganger" tests use vdiffr.

The test cases for visual tests are auto-generated from the examples in the documentation; after changing or adding an example, please run:

  • scripts/prepare_for_tests.sh to generate updated test cases, and
  • scripts/manage_visual_tests.sh to validate the generated images.

Acknowledgements

Originally developed in course of a DPhil programme in Women's & Reproductive Health at OxfordNuffieldWRH.

Owner

  • Name: Michał Krassowski
  • Login: krassowski
  • Kind: user
  • Location: Oxford, UK
  • Company: University of Oxford | @Quansight

Mike for short. Wrangling omics data, helping out with @jupyter.

GitHub Events

Total
  • Issues event: 10
  • Watch event: 52
  • Issue comment event: 10
  • Pull request event: 1
  • Fork event: 5
Last Year
  • Issues event: 10
  • Watch event: 52
  • Issue comment event: 10
  • Pull request event: 1
  • Fork event: 5

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 327
  • Total Committers: 4
  • Avg Commits per committer: 81.75
  • Development Distribution Score (DDS): 0.012
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
krassowski k****l@g****m 323
MilouArts 7****s 2
Maximilian Heeg m****g@g****m 1
Cyril Lagger l****l@g****m 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 113
  • Total pull requests: 25
  • Average time to close issues: about 2 months
  • Average time to close pull requests: about 4 hours
  • Total issue authors: 75
  • Total pull request authors: 7
  • Average comments per issue: 3.34
  • Average comments per pull request: 0.76
  • Merged pull requests: 17
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 7
  • Pull requests: 2
  • Average time to close issues: about 10 hours
  • Average time to close pull requests: N/A
  • Issue authors: 7
  • Pull request authors: 2
  • Average comments per issue: 0.57
  • Average comments per pull request: 1.5
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • krassowski (12)
  • bagcik1lumc (7)
  • sharathkmenon (4)
  • akhst7 (4)
  • BastiDucreux (3)
  • tomleung1996 (2)
  • sfd99 (2)
  • matthlfu (2)
  • Julkut (2)
  • lijing28101 (2)
  • Axze-rgb (2)
  • kaplans1 (2)
  • a14578 (2)
  • ghost (2)
  • erikagucciardo (2)
Pull Request Authors
  • krassowski (20)
  • jarekbryk (2)
  • CyrilLagger (1)
  • MrHedmad (1)
  • maximilian-heeg (1)
  • teunbrand (1)
  • MilouArts (1)
Top Labels
Issue Labels
help-request (58) enhancement (23) potential-bug (11) bug (9) documentation (7) good first issue (2) question (1)
Pull Request Labels

Packages

  • Total packages: 3
  • Total downloads:
    • cran 4,062 last-month
  • Total docker downloads: 750
  • Total dependent packages: 2
    (may contain duplicates)
  • Total dependent repositories: 16
    (may contain duplicates)
  • Total versions: 34
  • Total maintainers: 1
proxy.golang.org: github.com/krassowski/complex-upset
  • Versions: 21
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.5%
Dependent repos count: 5.7%
Last synced: 6 months ago
cran.r-project.org: ComplexUpset

Create Complex UpSet Plots Using 'ggplot2' Components

  • Versions: 8
  • Dependent Packages: 2
  • Dependent Repositories: 15
  • Downloads: 4,062 Last month
  • Docker Downloads: 750
Rankings
Stargazers count: 0.9%
Forks count: 3.3%
Dependent repos count: 7.4%
Downloads: 10.7%
Average: 10.8%
Dependent packages count: 18.1%
Docker downloads count: 24.4%
Last synced: 6 months ago
conda-forge.org: r-complexupset
  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 1
Rankings
Stargazers count: 21.0%
Dependent repos count: 24.4%
Average: 32.9%
Forks count: 34.7%
Dependent packages count: 51.6%
Last synced: 6 months ago