xuranw / MuSiC

Multi-subject Single Cell Deconvolution
https://github.com/xuranw/MuSiC
GNU General Public License v3.0
234 stars 94 forks source link

music_prop.cluster: Error in if (length(S) != ncol(D)) { : argument is of length zero #94

Open sarahbonnin opened 2 years ago

sarahbonnin commented 2 years ago

Hello,

I am getting the following error with music_prop.cluster:

Error in if (length(S) != ncol(D)) { : argument is of length zero

I ran the function code line by line and realized that the error arises - I think - because, for one sample and one cell type, c.marker ends up with only one gene (c.marker = intersect(group.markers[[j]], names(Yjg.temp))). The issue comes from my data: there are 4 marker genes for this particular cell type, and 3 of them get eliminated because of 0 counts in one sample.

I was wondering if there is a way to get around this? Can I just set an option to ignore such cases? Or would you advice to simply add up a small value to all counts (I tried with adding up 0.1 to all raw counts, and it works, but is it ok to do this?)?

I input raw counts for both bulk and single-cell data sets.

Thank you!!

Best wishes