-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Hi,
I have been trying to make BatchQC work for the past two days to no avail. I keep getting the below error:
Quitting from lines 256-274 (batchqc_report.Rmd)
Error in if (spvaltext2 == 0) { : missing value where TRUE/FALSE needed
Having a closer look the problem seemed to appear in lines 263-264:
pval <- batchQC_shapeVariation(lcounts_adj, batch, plot = TRUE, groupCol =
rainbow(nlevels(bf))[bf])
Inside the batchQC_shapeVariation function, I tried to narrow down the problem to see where it occurs. My findings were that in line 34 (batch_ps <- batchEffectPvalue(gnormdata, sortgroups, robust=robustGene)) the function batchEffectPvalue returns the below:
batch_ps Named num [1:4] 0 0 NaN NaN
These two NaNs are producing the problem since the NaN in the if (spvaltext2 == 0) { cannot give TRUE or FALSE.
Inside the function batchEffectPvalue everything seems to run smoothly until we reach the
skewbatch <- unlist(lapply(1:length(batch2), function(x) apply(data[,batch2[[x]]], 1, skewness)))
kurtbatch <- unlist(lapply(1:length(batch2), function(x) apply(data[,batch2[[x]]], 1, kurtosis)))
By having a look at the skewbatch and kurtbatch objects I saw that there are some NaNs present. I believe that this is causing the problem downstream.
Now, I don't know whether this is a problem of skewness and kurtosis functions or is a problem with my data. I tried both raw counts and quantile normalized read counts (as suggested by you). I also filtered the quantile normalized counts for low standard deviation and made sure that none of my batches contain genes with only zeroes (as suggested in your website). I don't know what else I can do. I even thought of adding a 0 in the report_option_binary option to skip the creation of this graph but I am not sure about that since I might be leaving out an important part of the batchQC analysis.
Can you please help me?
Best regards,
Lefteris
PhD candidate, Newcastle University, UK