Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cryptic error for multiple testing correction #3

Open
rbutleriii opened this issue May 6, 2020 · 1 comment
Open

Cryptic error for multiple testing correction #3

rbutleriii opened this issue May 6, 2020 · 1 comment

Comments

@rbutleriii
Copy link

Hi, I have multiple sets of gene lists and am running pairwise enrichment using the following function on them:

# function runs enrichment and saves to file for p and padj
# takes two set lists, background gene count and output name and pdf width
enrich = function(list1, list2, background, outname, width=7) {
  # enrichment basic
  gom.obj = newGOM(list1, list2, background)
  pdf(file=paste0(today, nameset, outname, ".pdf"), width=width)
  drawHeatmap(gom.obj, grid.col="Blues")
  dev.off()
  # enrichment multiple testing correction
  pdf(file=paste0(today, nameset, outname, "_padj.pdf"), width=width)
  drawHeatmap(gom.obj, grid.col="Blues", adj.p=T)
  dev.off()
}

Usually works fine, but on one comparison (5 sets x 6 sets), I get three enrichments with the standard Heatmap (0.031, 6e-03, 6e-03), but a cryptic error and a blank pdf for the multiple testing set:

Error in (function (side, at = NULL, labels = TRUE, tick = TRUE, line = NA,  :
  no locations are finite

Am I correct in thinking this means none of the enrichments remained after multiple correction? Could it return an error as such?

@adomingues
Copy link
Collaborator

Hi @rbutleriii,

I am not sure if you found a solution for your problem, but I encountered the issue just now and it is an heatmap.2 issue if all values in the matrix are the same (e.g. if all padj.values are 1).

Reproducible example:

library("gplots")
plot.mat <- matrix(rep(1, 6), , nrow = 3, ncol = 2, dimnames = list(letters[1:3], letters[4:5]))
heatmap.2(plot.mat)

plot.mat <- matrix(rep(0.5, 6), , nrow = 3, ncol = 2, dimnames = list(letters[1:3], letters[4:5]))
heatmap.2(plot.mat)

# replace any number
plot.mat[1, 2] <- 0.01
heatmap.2(plot.mat)

I will try to add an error message for next release.

Thank you for reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants