SC3_estimate_k formatting error?
2
1
Entering edit mode
@alexandriapinto1-13151
Last seen 6.8 years ago

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?



sc3 scater • 2.7k views
ADD COMMENT
0
Entering edit mode
@vladimir-kiselev-9342
Last seen 5.6 years ago
Sanger Institute, Cambridge, UK

Could you please share your dataset with me, so that I can reproduce your error? Please share it with vk6@sanger.ac.uk.

ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

have you been able to reproduce the error?

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

Of course! No rush! 

ADD REPLY
0
Entering edit mode
@vladimir-kiselev-9342
Last seen 5.6 years ago
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, 

Vlad

ADD COMMENT
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

I am afraid I need to look at your dataset, could you please share it with me again?

ADD REPLY

Login before adding your answer.

Traffic: 803 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6