jingshuw / SAVERX

R package for transfer learning of single-cell RNA-seq denoising
29 stars 9 forks source link

Denoised matrix contains NaN #4

Open MaxKman opened 5 years ago

MaxKman commented 5 years ago

Hey,

I ran SAVERX on my data and am quite happy with the results. However I noticed, that the denoised matrix contains NaN for some genes (but not all cells for these gene). It's a bit unclear to me what this means and can get clumsy to work with downstream. Can you explain?

Best Max

jingshuw commented 5 years ago

Hi Max, sorry for the late reply. If you still have the denoised results saved, to help me understand the issue, could you check if the denoised matrix before shrinkage ('est.before.shrinkage') have NaNs at same entries? Thanks!

MaxKman commented 5 years ago

Hi, sorry for the late reply. Now I checked.

image

For now I am setting the NaNs to 0 to be able to work with the matrix. Do you think that's legit?

mmfalco commented 4 years ago

Any clue about this? I have the same issue. Is it ok to set this NaN to 0? (in my case 2% of the matrix)

jingshuw commented 4 years ago

Yes, you can set it to 0. The issue should be in the shrinkage step. If before shrinkage the predicted relative true gene expression is 0 by autoencoder, then the inverse variance weighting in the shrinkage step may yield NaN as