服务热线
178 0020 3020
#获得两个差异表达基因集的韦恩图和基因名
library(VennDiagram)
#设置当前工作目录,所下载的数据或者生成的数据都在如下目录下
setwd("D:/geo/GSE70689/")
#读取差异基因
CBD_Cntr_data = read.csv("CBD-Cntr_defference_expression_genes.csv", header = T)
CBD_LPS_LPS_data = read.csv("CBD_LPS-LPS_defference_expression_genes.csv", header = T)
#获得差异基因的symbol
CBD_Cntr =as.character(CBD_Cntr_data$X)
CBDLPS_LPS =as.character(CBD_LPS_LPS_data$X)
venn.diagram(
x= list("CBD_Cntr" = CBD_Cntr, "CBDLPS_LPS" = CBDLPS_LPS),
filename = "venn.png",
height = 800,
width = 800,
resolution =300,
imagetype="png",
col="transparent",
fill=c("blue","green"),
alpha = 0.50,
cex=1,
cat.cex=0.5
)
#取得两个个组差异基因的交集
DEG = intersect(CBD_Cntr, CBDLPS_LPS)
DEG
附件