You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am able to run calculateDiffMeth on my dataset when dispersion='none', but get the following error when dispersion='MN':
two groups detected:
will calculate methylation difference as the difference of
treatment (group: 1) - control (group: 0)
Error in if (is.na(p.value)) { : argument is of length zero
Calls: calculateDiffMeth ... .calculateDiffMeth -> simplify2array -> mclapply -> lapply -> FUN
Based on the calculateDiffMeth source code perhaps adding isTRUE to the if(is.na(p.value))) in the following could help:
do F-test when overdispersion >1 given
test=ifelse(test=="F" & phi>1,"F","Chisq")
Hi, I am able to run calculateDiffMeth on my dataset when dispersion='none', but get the following error when dispersion='MN':
two groups detected:
will calculate methylation difference as the difference of
treatment (group: 1) - control (group: 0)
Error in if (is.na(p.value)) { : argument is of length zero
Calls: calculateDiffMeth ... .calculateDiffMeth -> simplify2array -> mclapply -> lapply -> FUN
Based on the calculateDiffMeth source code perhaps adding isTRUE to the if(is.na(p.value))) in the following could help:
do F-test when overdispersion >1 given
test=ifelse(test=="F" & phi>1,"F","Chisq")
p.value=switch(test,
F={
pf(deviance/phi, ddf, (length(w)-nprm), lower.tail = FALSE)
},
Chisq={
pchisq(deviance/phi, 1, lower.tail = FALSE)
})
if(is.na(p.value)) {
warning("Replacing NaN with 1.")
p.value <- 1
}
The text was updated successfully, but these errors were encountered: