krassowski / complex-upset

A library for creating complex UpSet plots with ggplot2 geoms
MIT License
469 stars 28 forks source link

add intersection of the union of certain sets within the same intersection upset plot. #183

Open sid5427 opened 1 year ago

sid5427 commented 1 year ago

Is your feature request related to a problem? Please describe. I want to explore the intersection of the union of certain sets in my figure.

Describe the solution you'd like

Say for example I have 5 sets of data - set 1 to 5. I am able to generate an intersection upset plot, however I want to also include a bar which takes the union of say set1 + set2, and reports the intersection with the union of say set3+set4+set5. and then add this to the existing intersection plot, possibly color the connection between set1+2 to say red, and then set3+4+5 to blue - signify these are a union.

Describe alternatives you've considered I basically generated a separate upset plot for the two union sets as described, and added to the original intersection set via illustrator - not ideal.

Context (required) Explore the intersection between union of sets within the same plot.

ComplexUpset version: 1.3.3

R version details ```R ```

krassowski commented 1 year ago

An illustration would really help here, it is not immediately clear to me what you are trying to achieve.

sid5427 commented 1 year ago

sure ..

how about something like this -

image

the last bar is showing the intersection of two groups of sets - (set 1 ∪ set 2) ∩ (set 3 ∪ set 4 ∪ set 5).

If I visualize in a venn diagram (see below ) - the value 679 is to be shown in the figure above.

image

I hope this gives an idea of what I am trying to do...