A reimplementation of the upset tool of Lex,
Gehlenborg et al: a bar chart of set sizes, a bar chart of intersection
sizes, and a grid showing which sets make up each intersection - drawn
with plotly rather than base graphics so it stays interactive
outside of a fixed set count, and so all elements of a given intersection
can be plotted (rather than assigning every item to its highest-order
intersection).
Usage
interactive_upset(
sets,
nintersects = 20,
minorder = 1,
set_sort = TRUE,
bar_numbers = FALSE,
show_empty_intersections = TRUE,
intersection_assignment_type = c("upset", "all")
)Arguments
- sets
A named list of character vectors, one per set (e.g. up/down differential gene sets per contrast)
- nintersects
Maximum number of intersections to display, ordered by size
- minorder
Minimum number of sets that must be involved in an intersection for it to be shown
- set_sort
Sort sets by size (ascending) before plotting?
- bar_numbers
Add value labels above the intersection size bars?
- show_empty_intersections
Include intersections/set combinations with zero members?
- intersection_assignment_type
'upset' assigns each member to its highest-order intersection only (as in the original UpSet); 'all' counts a member in every intersection it belongs to
References
Lex and Gehlenborg (2014). Points of view: Sets and intersections. <em>Nature Methods</em> 11, 779 (2014). http://www.nature.com/nmeth/journal/v11/n8/abs/nmeth.3033.html
Gehlenborg N (2016). <em>UpSetR: A More Scalable Alternative to Venn and Euler Diagrams for Visualizing Intersecting Sets</em>. R package version 1.3.0, https://CRAN.R-project.org/package=UpSetR
