2

There is no option with vennDiagram() in the limma package to remove the box frame from the Venn diagram. So can anyone tell me how I can adjust the source code to fix that? I also want to remove the number in the corner.

I appreciate it.

  • 1
    Note that the number in the bottom right corner is not the total but the number of observations that are not in any of the groups. So a label `"Total: ..."` would be incorrect. – Maurits Evers Aug 09 '18 at 01:10

1 Answers1

1

Here is a quick&dirty fix. I modified the vennDiagram source code, and created a new function my.VennDiagram which I left as a GitHub gist (on account of the vennDiagram code being rather long).

Here is an example based on the example given in the vennDiagram documentation.

library(limma)
Y <- matrix(rnorm(100*6),100,6)
Y[1:10,3:4] <- Y[1:10,3:4]+3
Y[1:20,5:6] <- Y[1:20,5:6]+3
design <- cbind(1,c(0,0,1,1,0,0),c(0,0,0,0,1,1))
fit <- eBayes(lmFit(Y,design))
results <- decideTests(fit)
a <- vennCounts(results)

library(devtools)
source_gist("https://gist.github.com/mevers/9c846e6293db44dd37695c46b8f2b6a2")
my.vennDiagram(a)

enter image description here

I make no claim that this works for all cases. You may need to make some more adjustments.

Maurits Evers
  • 49,617
  • 4
  • 47
  • 68