I would like to display gene set intersections in an upset-style plot, but with a difference from the standard upset plot...
Specifically, I would like to have the vertical bars for intersection counts show marginal counts as opposed to exclusive counts.
For example, suppose A has 6 genes, B has 5 genes and C has 4 genes. And, A and B have 4 genes in common and A,B,C has 1 gene in common, I would like the bar for the A-B intersection to have height=4 rather than 3 as in a conventional upset plot.
What I have been doing is using UpSetR to create the bottom part, i.e. the set count bars and the depiction of the intersections, and creating a separate top piece in ggplot that has marginal intersections as I would like them and 'pasting' the two pieces together.
Is anyone aware of R code that would accomplish this in a less manual way?
Could you provide some code showing how UpSetR works with your example? I think that the A-B intersection of the upset plot would already show a height of 4, but I might not understand what you mean.