cnio-bu / beyondcell

Beyondcell is a computational methodology for identifying tumour cell subpopulations with distinct drug responses in single-cell RNA-seq and Spatial Transcriptomics data.
Other
40 stars 4 forks source link

Error in bcRegressOut #148

Open mpaya opened 7 months ago

mpaya commented 7 months ago

While running bcRegressOut(), it stops with the following error:

k.neighbors must be lower than the number of complete cases in @normalized slot: 0. 

The data I'm working with have a high proportion of NA and all samples have at least one missing value. I was indicated to replace these missing values by 0, meaning no enrichment for that drug signature, and recompute values, step after which regression worked well.

# Replace NAs by 0s
bc@normalized[is.na(bc@normalized)] <- 0
bc <- bcRecompute(bc, slot = "normalized")`

Thanks for the support!

SGMartin commented 7 months ago

Thanks for the report @mpaya. Our main developer @mj-jimenez has just returned from holidays and will take a look at the issue ASAP.