Tarek Hallal
Tarek Hallal

Reputation: 1

Venn diagram in R completely blank

I am trying to create a Venn diagram for common differentially expressed genes across 3 data sets. I created a list that contains the differentially expressed genes, then I used the venn.diagram() function with the following arguments: x (which is my list of gene names in the three data sets) , filename,category.names and output. However, the Venn diagram is turning out completely blank, no category names nor numbers inside intersections. My code looks like this:

venn.diagram(up, filename = 'venn_up.png', category.names = c('up_PC3', 'up_LAPC4', 'up_22Rv1'), output = TRUE)

Has anyone faced a similar problem? Thanks all!

Upvotes: 0

Views: 539

Answers (1)

Quinten
Quinten

Reputation: 41523

Without reproducible dataset it is hard, so I created one:

genes <- paste("gene",1:1000,sep="")
x <- list(
  up_PC3 = sample(genes,300), 
  up_LAPC4 = sample(genes,525), 
  up_22Rv1 = sample(genes,440)
)

You can use the following code to run a Venn diagram:

library(VennDiagram)
venn.diagram(x, filename = "venn_up.png", category.names = c('up_PC3', 'up_LAPC4', 'up_22Rv1'))

Than check at the right folder of your working directory for the output:

enter image description here

Upvotes: 0

Related Questions