Skip to content

Commit

Permalink
Remove Pearson's correlation from SPLOM of q-values
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Prostko committed Feb 15, 2023
1 parent 8ea951b commit f9bbfdc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions util/pairs_panels_idline.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# just copy & paste from pairs.panels source code
# y=x identity line instead of lm=T
# when cor = FALSE, then upper.panel = NULL
# col.points and cex.points arg added when lm=TRUE

pairs.panels.idline <- function (x, smooth = TRUE, scale = FALSE, density = TRUE, ellipses = TRUE,
Expand Down Expand Up @@ -240,13 +241,13 @@ pairs.panels.idline <- function (x, smooth = TRUE, scale = FALSE, density = TRUE
lower.panel = panel.smoother, pch = pch, ...)
}
else {
pairs(x, diag.panel = panel.hist.density, upper.panel = panel.smoother,
pairs(x, diag.panel = panel.hist.density, upper.panel = NULL,
lower.panel = panel.smoother, pch = pch, ...)
}
}
else {
if (!cor) {
pairs(x, diag.panel = panel.hist.density, upper.panel = panel.lm,
pairs(x, diag.panel = panel.hist.density, upper.panel = NULL,
lower.panel = panel.lm, pch = pch, ...)
}
else {
Expand Down
4 changes: 3 additions & 1 deletion util/plotting_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,9 @@ source('util/pairs_panels_idline.R')

scatterplot_ils <- function(dat, cols, stat, spiked.proteins, refCond){
select.stat <- match.arg(stat, c('p-values', 'log2FC', 'q-values'))
title <- paste("Pearson's correlation of", select.stat)
if (select.stat == 'log2FC') {
title <- paste("Pearson's correlation of", select.stat)
} else title = ''
contrast.names <- unlist(lapply(stri_split(cols, fixed='_'), function(x) x[2]))

# align rows (proteins) between DEA variants
Expand Down

0 comments on commit f9bbfdc

Please sign in to comment.