-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvolcanolots.R
33 lines (26 loc) · 1.02 KB
/
volcanolots.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
library(EnhancedVolcano)
wd <- "~/Documents/summer_research_2023-main/bulkrna/deseq2"
setwd(wd)
folders <- c("Control-vs-PMC",
"Control-vs-oxLDL-24h",
"Control-vs-oxLDL-48h",
"Control-vs-oxLDL-PMC-24h",
"Control-vs-oxLDL-PMC-48h")
for (f in folders){
csv_file <- read.csv(paste(wd, f, "Differential_expression_analysis_table.csv", sep="/"))
pdf(file = paste(wd, "/images/volcanoplots/", f, ".pdf", sep=""), width = 10)
plot <- EnhancedVolcano(csv_file,
lab = csv_file$Gene.name,
x = 'log2FoldChange',
y = 'pvalue',
pCutoff = 0.05,
FCcutoff = 1,
title = f,
legendPosition = "right",
legendLabSize = 12,
labSize = 4,
drawConnectors = TRUE,
max.overlaps = 45)
print(plot)
dev.off()
}