In 2023_r46_volcano/r46.R
1.
dat2$regulate <- ifelse(dat2$log2FoldChange >= 0, 'up', 'down')
dat2$regulate[dat2$padj > 0.05] = 'no'
dat2$regulate[abs(dat2$log2FoldChange) < 1] <- 'no'
The code segment is redundant and can be simplified to:
dat2$regulate <- ifelse(dat2$padj > 0.05 | abs(dat2$log2FoldChange) < 1, 'no', ifelse(dat2$log2FoldChange >= 0, 'up', 'down'))
geom_vline(xintercept = c(-log2(1.5),log2(1.5)), colour="gray88", linetype="dashed")
Incorrect xintercept in geom_vline
In 2023_r46_volcano/r46.R
1.
The code segment is redundant and can be simplified to:
Incorrect
xinterceptingeom_vline