简体   繁体   English

R中基因组区域的维恩图

[英]Venn Diagram for genome region in R

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? 任何人都可以共享R代码来为两张床的文件做维恩图吗?

The following code can do such things, however, in some server, tiff file cannot be created and opened. 以下代码可以完成这些操作,但是,在某些服务器中,无法创建和打开tiff文件。 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");

在此处输入图片说明在此处输入图片说明

最终,Python通过以下链接为床文件的维恩图提供了一个软件包: http : //pythonhosted.org/pybedtools/index.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM