SCDC icon indicating copy to clipboard operation
SCDC copied to clipboard

Fix proportion estimation for NA values

Open yoda-vid opened this issue 2 years ago • 0 comments

Thanks for your deconvolution software. I encountered an error during proportion estimation where some NA common genes would be found for some bulk cells. Here is an example stacktrace:

WNNLS Converged at iteration 2
ACACACTTTCTACACG-1_10 has common genes 70 ...
WNNLS Converged at iteration 3
ACACATGATCAAATCT-1_10 has common genes NA ...
ERROR [2022-06-09 15:40:26] NA/NaN/Inf in foreign function call (arg 5)

Compact call stack:
  1 #7: source(parsed$script)
  2 deconvolve_scdc.R#13: tryCatchLog::tryCatchLog({
  3 deconvolve_scdc.R#65: SCDC::SCDC_prop(bulk.eset = eset.integ, sc.eset = eset.ref, sample = "sample", ct.varname = "Class", ct.sub = as.character(unique(eset.ref$Class)))
  4 Deconvolution.R#606: nnls::nnls(A = basis.mvw.temp, b = xbulk.temp)


Error in nnls::nnls(A = basis.mvw.temp, b = xbulk.temp) : 
  NA/NaN/Inf in foreign function call (arg 5)

I was able to work around it by skipping these cells and recording their indices to remove the barcodes. I am not sure if this is the best solution though and wanted to share it here in case it is useful or if there is a better approach.

Might be related to #17, #18.

yoda-vid avatar Jun 09 '22 07:06 yoda-vid