Question: SC3_estimate_k formatting error?
1
22 months ago by
alexandriapinto110 wrote:

Hello,

I am trying to get an estimation of the number of single cell clusters exist in my data. My code is as follows:

primedsce <- SingleCellExperiment(assays = list(counts = primedData))
primedsce <- calculateQCMetrics(primedsce,feature_controls = list(ERCC=primedmatchesERCC,MT = primedmatchesMT))

​exprs(primedsce)<-log2(counts(primedsce)+1)

primedsce <- sc3_prepare(primedsce,ks = 2:5)

primedsce <- sc3_estimate_k(primedsce)


After running estimate_k, I will get this error:

Estimating k...

Error in eigen(sigmaHatNaive, symmetric = TRUE, only.values = TRUE) :

infinite or missing values in 'x'

All of the values in count are either 0 or a real number. None are infinite. When I was looking at the reference code for sc3, I saw this "# important: normcounts have the same zeros as raw counts (fpkm)." Can anyone clarify what this comment means or explain what I am doing wrong?




scater sc3 • 718 views
modified 21 months ago by Vladimir Kiselev150 • written 22 months ago by alexandriapinto110
0
22 months ago by
Sanger Institute, Cambridge, UK

I sent you the dataset, it is rather large though. Thank you for any help you can give me!

have you been able to reproduce the error?

Very sorry, have been busy resubmitting a paper, will get back to this issue this week. Hope it's ok for you. Sorry again.

Of course! No rush!

0
21 months ago by
Sanger Institute, Cambridge, UK

Hi!

I looked at your data and found that it is very shallowly sequenced. In fact there were about 40 cells with all zeros in your matrix. When estimating k SC3 scales the data and if all values are zeros they will become NA after scaling and that is exactly what it was complaining about. Therefore we always recommend doing Quality Control and filtering bad cells from your data before doing clustering. You can see how we usually do it in our course. If I follow our QC instruction there is no error. Here I provide my steps, so that you can reproduce.

Hope this helps!

Cheers,

Hi again, I am getting the same error as before but this time I have done all the QC steps. No cells are empty or infinite. I don't really understand why it's not working.