immunogenomics / symphony

Efficient and precise single-cell reference atlas mapping with Symphony
GNU General Public License v3.0
95 stars 22 forks source link

Error in irlba(ref_exp_scaled, nv = 20) #38

Closed Lila3141 closed 1 year ago

Lila3141 commented 1 year ago

Dear Symphony developer team, First of all, thanks a lot for this great package and vignette!

Following the steps of vignette, I got good results with all my data sets except with one for which I am running into following error:

s = irlba(ref_exp_scaled, nv = 20) Error in irlba(ref_exp_scaled, nv = 20) : BLAS/LAPACK routine 'DLASCLS' gave error code -4

I noticed that there are many NAs (115200) in the ref_exp_scaled (1:789, 1:19200), which might cause this problem. Running ref_exp_scaled = singlecellmethods::scaleDataWithStats(ref_exp, vargenes_means_sds$mean, vargenes_means_sds$stddev, 1) does not give an error and ref_exp, vargenes_means_sds$mean and vargenes_means_sds$stddev do not contain any NAs. For troubleshooting, I tried to run the contents of the function scaleDataWithStats, but can't find the function scaleRowsWithStats_dgc. My dataset is unfortunately not public. ref_exp is a Large dgCMatrix with 472536288 elements, 387.6 MB.

Do you have any idea what could cause this problem? Thanks a lot in advance!

Lila3141 commented 1 year ago

I found the reason. The one dataset that was giving me this error was missing some of the highly variable genes from my var_genes list.