R包:VennDiagram韦恩图
加载R包
library(VennDiagram)
数据
# Prepare character vectors
v1 <- c("DKK1", "NPC1", "NAPG", "ERG", "VHL", "BTD", "MALL", "HAUS1")
v2 <- c("SMAD4", "DKK1", "ASXL3", "ERG", "CKLF", "TIAM1", "VHL", "BTD", "EMP1", "MALL", "PAX3")
v3 <- c("PAX3", "SMAD4", "DKK1", "MALL", "ERG", "CDKN2A", "DENR", "NPC1", "NAPG")
# Create a list of vectors
vlist <- list(v1, v2, v3)
names(vlist) <- c("list1", "list2", "list3")
图1
venn.diagram(vlist[1:2],
filename="Venn_2way.png",
imagetype="png")
图2
venn.diagram(vlist,
filename="Venn_3way.png",
imagetype="png")
图3
venn.diagram(vlist,
filename="Venn_3way_more.png",
imagetype="png",
main="Venn diagram",
sub="3-way",
main.col="red",
fill=c("lightgreen", "lightblue", "lightsalmon"),
col=c("lightgreen", "lightblue", "lightsalmon"),
cat.col=c("green", "blue", "salmon"))
参考
- https://biocorecrg.github.io/CRG_RIntroduction/venn-diagram-function-from-venndiagram-package.html
原文地址:https://blog.csdn.net/H20230717/article/details/142492742
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!