-
Notifications
You must be signed in to change notification settings - Fork 8
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
SignedGenesets gives NaN
s for valType %in% c("r", "f")
#31
Comments
Interestingly, |
Ok, I think I got it. Then:
Which leads to Inf. Ok; maybe fair enough for But for p-values this leads to overly optimistic/pessimistic estimates.Basically, p-values will be always 0 or 1. This probably means that p-values are "too extreme" in all the cases. Maybe in this case the correct way would be to compute two different p-values and use something like Fisher's method to aggregate them? |
Here's an example. With totally random signature covering 95 genes out of 100, we always get a skewed p-value distibution: set.seed(42)
ngenes <- 100
nsamples <- 1000
m <- matrix(rnorm(ngenes * nsamples), ncol=nsamples)
rownames(m) <- paste0("g", seq_len(nrow(m)))
colnames(m) <- paste0("s", seq_len(ncol(m)))
# using all the genes except for the last five
big_signature <- sample(c("pos", "neg"), ngenes - 5, replace = TRUE)
random_sign <- BioQC::SignedGenesets(list(
list(
name = "random signature",
pos = paste0("g", which(big_signature == "pos")),
neg = paste0("g", which(big_signature == "neg"))
)
))
hist(BioQC::wmwTest(m, random_sign, valType="p.less")) Created on 2021-08-12 by the reprex package (v2.0.1) |
I think one way to resolve this problem is the following:
|
Hi @Accio ,
I noticed that
wmwTest()
onSignedGenesets
returnsNaN
s forvalType
s"r"
and"f"
. Not sure if that is intentional.Created on 2021-08-12 by the reprex package (v2.0.1)
The text was updated successfully, but these errors were encountered: