0

You know sometimes we need to compare the overlap or shared regions for two bed files, sure we can do it step by step. Anybody can share a R code to do Venn Diagram for two bed files?

Shicheng Guo
  • 1,233
  • 16
  • 19

2 Answers2

1

The following code can do such things, however, in some server, tiff file cannot be created and opened. you can use this code in your own laptop.

if(!require(VennDiagram)){source("http://www.bioconductor.org/biocLite.R"); biocLite("VennDiagram")}
venn.plot <- venn.diagram(list(A = 1:150, B = 121:170),col=c("blue","red"),fill=c(1:3),lwd=2, filename="Venn_2set_simple.tiff");
venn.plot <- venn.diagram(list(A = 1:150, B = 121:170, C = 101:200), col=c(1:3),fill=c(1:3),lwd=2, filename="Venn_3set_simple.tiff");

enter image description hereenter image description here

Shicheng Guo
  • 1,233
  • 16
  • 19
0

Acutally, Python have a package for such venn diagram for bed file as the following link: http://pythonhosted.org/pybedtools/index.html

Shicheng Guo
  • 1,233
  • 16
  • 19