Error models error: in nnet::nnet.default: NA/NaN/Inf in foreign function call (arg 2)

1,153 views
Skip to first unread message

Austin T

unread,
Jan 26, 2016, 12:36:16 AM1/26/16
to SCDE
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.

Jean Fan

unread,
Jan 28, 2016, 8:02:05 AM1/28/16
to SCDE
Hi Austin,

I was not able to open your data for some reason and ran into the following error:
Error: bad restore file magic number (file may be corrupted) -- no data loaded
In addition: Warning message:
file ‘test_env.rds’ has magic number 'X'
  Use of save versions prior to 2 is deprecated

I assume 'SRR1039513' is a sample/column name. Can you check if that column in your rw counts matrix has any 0 or NA/NaN/Inf values? 

Austin T

unread,
Jan 29, 2016, 11:03:14 PM1/29/16
to SCDE
Yes; in fact, it has multiple zeroes. It does not contain NA, though.

Jean Fan

unread,
Jan 31, 2016, 5:25:56 PM1/31/16
to SCDE
Hum, some zeros should be fine. Can you provide me the rw count matrix as an .RData file instead?

Austin T

unread,
Feb 4, 2016, 6:47:00 PM2/4/16
to SCDE
Hi Jean,

Please excuse the late reply. The attached is a new version using the Rdata instead. Please find it here: https://drive.google.com/file/d/0B4cbZugzH_96VVVTa1pUZ3pPRjA/view?usp=sharing

Austin

Austin T

unread,
Feb 22, 2016, 10:48:59 PM2/22/16
to SCDE
Hi,

Was there any problems with the data, or is it all good?

Austin

jeanfanph...@gmail.com

unread,
Feb 23, 2016, 8:53:49 AM2/23/16
to Austin T, SCDE
Hi Austin,
Thanks for checking in. I haven't been able to figure out what is causing the error yet. 

Is there anything about SRR1039513 that's very different from the other samples either in terms of run or library size, mapping rate, etc? Have your tested whether the models can be built without this sample? That will help us narrow down if it's this particular sample causing errors with modeling or something else.
--
You received this message because you are subscribed to the Google Groups "SCDE" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singlecellsta...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jean Fan

unread,
Feb 29, 2016, 9:51:16 AM2/29/16
to SCDE, ayta...@gmail.com
Hi Austin,

Apologies for the delay. I had a chance to look over your data. I was able to run your error model building code successfully and was not able to reproduce the error. I recommend trying to do a fresh installation of scde. 

If you would like me to send you the o.ifm object and the associated error model plots, please email me at jea...@fas.harvard.edu and I can send them your way.

On a side note, your data looks beautiful. Are these single cells or bulk samples?

Best,
Jean
To unsubscribe from this group and stop receiving emails from it, send an email to singlecellstats+unsubscribe@googlegroups.com.

Austin T

unread,
Mar 1, 2016, 4:57:10 PM3/1/16
to SCDE, ayta...@gmail.com
Hi Jean,

Updating the package did me good. Everything seems to work fine now! The data is single-cell glioblastoma that's available of NCBI, I believe.

Sincerely,
Austin
To unsubscribe from this group and stop receiving emails from it, send an email to singlecellsta...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages