xuranw / MuSiC

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

Error in nnls(D.weight, Y.weight) : #80

Open woshiyangsi opened 3 years ago

woshiyangsi commented 3 years ago

Hi, When i use the function of music_prop.cluster(),i get the error:

Est.pbmc.bulk = music_prop.cluster(bulk.eset = bulk.eset, sc.eset = SC.eset, clusters = 'celltype', group.markers = Ipmarkers,groups = 'clusterType', samples = 'orig.ident', clusters.type = clusters.type) Start: cluster estimations... Creating Relative Abundance Matrix... Creating Variance Matrix... Creating Library Size Matrix... Start: cell type estimations... Creating Relative Abundance Matrix... Creating Variance Matrix... Creating Library Size Matrix... Used 20064 common genes... X811_4 has common genes 16608 ... Error in nnls(D.weight, Y.weight) : NA/NaN/Inf in foreign function call (arg 1)

Looking forward your reply Siyu.

nroak commented 3 years ago

I have the same issue in this step. Can you please let me know what's causing it?

anmol20334 commented 2 years ago

I am facing the same issue. Could you guys please help!

WuRAFY commented 2 years ago

Hi, I recently encounter this problem. Here are some of my findings, hope they are helpful to you.

I have 5 cell types(column names below) in a cell group. Note that one cell type "plasma-20" only exists in one patient "RM11_01".

  patient      plasma-11 plasma-14 plasma-20 plasma-6 plasma-7
  RM02_01        39         5         0      175      143
  RM06_01       112         4         0      150      160
  RM07_01        25         2         0      100       64
  RM10_01        41         1         0      149       90
  RM11_01       326       338       27      517      498
  RM12_01        14         3         0        7        7

When I included this cell group in my data, such error happened. But when I remove "plasma-20" from my data, music_prop.cluster will output normal results.

It seems that music_prop.cluster does not allow such cell types(only exist in one patient). So it is unfriendly for analysing tumor samples (malignant cells from different patients usually do not cluster together).