Open rronen opened 6 years ago
Hi, sorry for slow response here, I am abroad on vacation with limited time and access to a computer. Thanks for reporting this bug and suggesting the fix. I will implement it as soon as possible!
Update (>1 year later :) it is also necessary to add drop=FALSE
in the following section:
# Normalize ES:
ES <- gsStatsAll[, iContrast]
if(signMethod == "geneperm") {
tmp <- randBgMat[as.character(sizeGS), , drop=FALSE] # HERE
} else {
tmp <- randBgMat
}
First, thanks for making piano. It is a super useful package.
I've had some cases where the fdr procedure implemented in
fdrGSEA.R
fails with:which happens if
iGeneSet
contains only a single element.Introducing
drop=FALSE
in the two relevant lines seems to resolve the issue. I.e., changingtmp[iGeneSet, ]
totmp[iGeneSet, , drop=FALSE]
.