Question: SC3_estimate_k formatting error?
1
gravatar for alexandriapinto1
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
ADD COMMENTlink modified 21 months ago by Vladimir Kiselev150 • written 22 months ago by alexandriapinto110
Answer: SC3_estimate_k formatting error?
0
gravatar for Vladimir Kiselev
22 months ago by
Sanger Institute, Cambridge, UK
Vladimir Kiselev150 wrote:

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

ADD COMMENTlink written 22 months ago by Vladimir Kiselev150

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

ADD REPLYlink written 22 months ago by alexandriapinto110

have you been able to reproduce the error?

ADD REPLYlink written 21 months ago by alexandriapinto110

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 REPLYlink written 21 months ago by Vladimir Kiselev150

Of course! No rush! 

ADD REPLYlink written 21 months ago by alexandriapinto110
Answer: SC3_estimate_k formatting error?
0
gravatar for Vladimir Kiselev
21 months ago by
Sanger Institute, Cambridge, UK
Vladimir Kiselev150 wrote:

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 COMMENTlink written 21 months ago by Vladimir Kiselev150

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 REPLYlink written 19 months ago by alexandriapinto110

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

ADD REPLYlink written 19 months ago by Vladimir Kiselev150
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 141 users visited in the last hour