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 colMeans(S, na.rm = TRUE): 'x' must be an array of at least two dimensions #49

Open mooreann opened 4 years ago

mooreann commented 4 years ago

I'm trying to the run the music_prop command and have been getting the following error: Error in colMeans(S, na.rm = TRUE): 'x' must be an array of at least two dimensions Traceback:

  1. music_prop(bulk.eset = nabecBulk, sc.eset = nabecSet, clusters = "Celltype", . samples = "sample", verbose = F)
  2. music_basis(sc.eset, non.zero = TRUE, markers = sc.markers, clusters = clusters, . samples = samples, select.ct = select.ct, cell_size = cell_size, . ct.cov = ct.cov, verbose = verbose)
  3. colMeans(S, na.rm = TRUE)
  4. stop("'x' must be an array of at least two dimensions")

Here is the full write out of the command for reference: Est.prop.nabec = music_prop(bulk.eset = nabecBulk, sc.eset = nabecSet, clusters = 'Celltype', samples = 'sample', select.ct = c('Neuron', 'Oligodendrocyte', 'OPC', 'Astrocyte','Microglia'), verbose = F)

and the expression set of the single cell data: ExpressionSet (storageMode: lockedEnvironment) assayData: 27009 features, 3000 samples element names: exprs protocolData: none phenoData sampleNames: AAACCCAAGACAACAT-1 AAACCCAAGATGAATC-1 ... ATCAGGTGTTTAGAGA-1 (3000 total) varLabels: Celltype cluster sample varMetadata: labelDescription featureData: none experimentData: use 'experimentData(object)' Annotation:

and bulk data: ExpressionSet (storageMode: lockedEnvironment) assayData: 59032 features, 311 samples element names: exprs protocolData: none phenoData: none featureData: none experimentData: use 'experimentData(object)' Annotation:

Any idea what might be causing the problem?

aditisk commented 3 years ago

Hi @mooreann, I am facing a similar problem as described above. Were you able to fix it ? Thanks.

mgr98 commented 3 years ago

Also having a similar problem

xuranw commented 3 years ago

Thank you all for using MuSiC!

The easiest way to cope with this issue is that you randomly split and label cells into different pseudo-samples, say 3 samples. With pseudo-samples, you can run MuSiC without current error messages.

AnthonyX1an commented 1 year ago

Hi @xuranw, I am facing the same problem and I have split data into very small sample but still not work. Could you please give some advice about this issue?