Error in nnet::nnet.default(x, y, w, mask = mask, size = 0, skip = TRUE, :
NA/NaN/Inf in foreign function call (arg 2)
Error in doTryCatch(return(expr), name, parentenv, handler) :
ERROR encountered in building a model for cell SRR1039513
I'm not sure exactly sure what is wrong, but I'm working a data set for which SCDE does not work for. I am by no means an expert with statistics, but this error happens when I try to run this code:
o.ifm <- scde.error.models(
counts=rw,
groups=factors,
n.cores=ncores,
threshold.segmentation = TRUE,
save.crossfit.plots = FALSE,
save.model.plots = FALSE,
verbose = 1
)
I have provided an example with data already loaded as well as an R script to reproduce the error. It is attached here:
https://drive.google.com/open?id=0B4cbZugzH_96ZWdxby1PRlJOWkU
Inside, there is a function that I am using to perform the entirety of the SCDE process for me.