Skip to content

Commit

Permalink
Update 1_plots.R
Browse files Browse the repository at this point in the history
  • Loading branch information
xjsun1221 authored Mar 3, 2021
1 parent 23a9146 commit 05e14cb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/1_plots.R
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,14 @@ draw_volcano <- function(deg,lab=NA,pvalue_cutoff = 0.05,logFC_cutoff= 1,pkg = 1
dat = switch(EXPR = pkg,
v1 = deg[,c(2,5)],
v2 = deg[,c(1,4)],
v3 = deg[,c(1,4)],
v4 = deg[,c(1,4)])
v3 = deg[,c("logFC", "P.Value")],
v4 = deg[,c("logFC", "P.Value")])
}else{
dat = switch(EXPR = pkg,
v1 = deg[,c(2,6)],
v2 = deg[,c(1,5)],
v3 = deg[,c(1,5)],
v4 = deg[,c(1,5)])
v3 = deg[,c("logFC", "adj.P.Val")],
v4 = deg[,c("logFC", "adj.P.Val")])
}
colnames(dat)[1:2]=c("logFC","P.value")
#logFC_cutoff <- with(dat,mean(abs(logFC)) + 2*sd(abs(logFC)) )
Expand Down

0 comments on commit 05e14cb

Please sign in to comment.