MultiK icon indicating copy to clipboard operation
MultiK copied to clipboard

Error in simpleLoess: Invalid 'x'

Open chrarnold opened this issue 2 years ago • 5 comments

I am trying to run MultiK for a Seurat object created based on a scRNA count matrix (28791 features across 5000 samples within 1 assay). However, this is what happens:

> multik <- MultiK(seu.obj, reps=10)
[1] "Rep: 1"
Error in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,  : 
  invalid 'x'

Any idea what causes this?

chrarnold avatar Oct 11 '22 12:10 chrarnold

@chrarnold Hi! Sorry I have never seen such error before. Did you get the message immediately after you ran Multik()?

siyao-liu avatar Oct 11 '22 13:10 siyao-liu

Yes, it happens 30 seconds or so after I run MultiK as posted above.

chrarnold avatar Oct 11 '22 13:10 chrarnold

@chrarnold hmm..., did you use normalized counts in your seurat object?

siyao-liu avatar Oct 11 '22 13:10 siyao-liu

I just checked again and it turned out the matrix contained some NA values by mistake that caused the error. It seems to work now, and I will close this once confirmed. Thanks for the quick reply, appreciated!

Do you think your approach is equally suitable also for scATAC data which contains a large percentage of 0s, much more than scRNA? We talk about >80-90% zeros I think generally speaking.

chrarnold avatar Oct 11 '22 14:10 chrarnold

@chrarnold Glad you figured out the issue that was causing the error. MultiK was developed specifically for scRNAseq data which typically contains more than 70-80% of 0s. I don't think the high proportion of 0s in scATAC data would be a problem. I would recommend you to look at the workflow/steps for clustering scATAC data and compare with scRNAseq. If they are similar, you can probably try to apply MultiK to scATAC data.

siyao-liu avatar Oct 11 '22 14:10 siyao-liu