Skip to content

Commit

Permalink
fixed bug with renamed variable
Browse files Browse the repository at this point in the history
  • Loading branch information
jvanheld committed Sep 23, 2018
1 parent 8a7322b commit 5216b01
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/RSnakeChunks/R/ma_plot_multi_test_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ MAplot.MultiTestTable <- function(
}

## Legend for the points, depending on their status + display options
nb.positives <- sum(positive, na.rm = TRUE)
nb.positives <- sum(multitest.table.sorted$is.positive, na.rm = TRUE)
nb.negatives <- nb.tests - nb.positives
legend.table <- rbind(
legend.table,
Expand All @@ -251,9 +251,9 @@ MAplot.MultiTestTable <- function(
if (full.legend) {
legend.pch <- c(as.vector(legend.table$pch), -1,-1,-1,-1)
legend(legend.corner,
c(paste(sep="","N=",nrow(multitest.table)),
paste(sep="", sum(positive), " positives (",control.type," <= ", alpha, ")"),
paste(sum(!positive), "negatives"),
c(paste(sep = "","N=", nrow(multitest.table)),
paste(sep = "", sum(multitest.table.sorted$is.positive), " positives (", control.type, " <= ", alpha, ")"),
paste(sum(!multitest.table.sorted$is.positive), "negatives"),
paste(sep="", "P-value <= ", alpha, ": ", sum(multitest.table[,"p.value"] <= alpha)),
paste(sep="", "FDR <= ", alpha, ": ", sum(multitest.table[,"fdr"] <= alpha)),
paste(sep="", "E-value <=", alpha, ": ", sum(multitest.table[,"e.value"] <= alpha)),
Expand All @@ -268,8 +268,8 @@ MAplot.MultiTestTable <- function(
} else {
legend(legend.corner,
# c(paste(sep="", control.type," = ", alpha),
# paste(sep="", sum(positive), " positives"),
# paste(sum(!positive), "negatives")
# paste(sep="", sum(multitest.table.sorted$is.positive), " positives"),
# paste(sum(!multitest.table.sorted$is.positive), "negatives")
# ),
legend=as.vector(legend.table$legend),
pch=as.vector(legend.table$pch),
Expand Down

0 comments on commit 5216b01

Please sign in to comment.