hms-dbmi / UpSetR

An R implementation of the UpSet set visualization technique published by Lex, Gehlenborg, et al..
https://cran.rstudio.com/web/packages/UpSetR
Other
764 stars 156 forks source link

Values for no intersections? #135

Open bhattp09 opened 6 years ago

bhattp09 commented 6 years ago

Hi! Is there a way to plot a "no set" in Upset R? I noticed in the image you have on the web interface (https://caleydo.org/tools/upset/) , there is functionality to show attribute plots (and a bar chart) for those cases where there are no interactions or unique values across the board. (ie: all the dots would be light grey.) Is there a way to do this in R?

vonStadarhraun commented 5 years ago

I was trying to this and could not find a solution. Looks like a bug.

bhattp09 commented 5 years ago

I found this solution.. it's not perfect but it is a workaround to what I was trying to achieve:

https://github.com/hms-dbmi/UpSetR/issues/109

It would be nice if there was a feature that included the option to have a 'no set' though. Hope this helps!

vonStadarhraun commented 5 years ago

Might be related to:

86

vonStadarhraun commented 5 years ago

It is removed intentionally. This should be an option. https://github.com/hms-dbmi/UpSetR/blob/fe2812c8cbe87af18c063dcee9941391c836e7b2/R/MainBar.R#L26

It is possible to add the "no set" with the intersections option.

movies <- read.csv( system.file("extdata", "movies.csv", package = "UpSetR"), header=TRUE, sep=";" )
upset(movies, nsets = 2, nintersects = 30, mb.ratio = c(0.5, 0.5),
      order.by = c("freq", "degree"), decreasing = c(TRUE,FALSE),
      intersections = list( list("Comedy","Drama"), list("Drama"), list("Comedy"), noset = list()))
SH1213 commented 5 years ago

@vonStadarhraun Thank you for your solution to this issue. I want to display "no set" without having to specify all 32 different patterns in the intersections list. Is this possible? When I specify nintersects = 30, my no set pattern and frequency is nit displayed.