meichendong / SCDC

SCDC
42 stars 9 forks source link

error with SCDC_ENSEMBLE #24

Open zh-zhang1984 opened 3 years ago

zh-zhang1984 commented 3 years ago

Hi,Thank you for your excellent package for deconvolution analysis; I run into the following error, Do you have any hints to solve this issue?

GSE134347.ens <- SCDC_ENSEMBLE(
  bulk.eset = eset134347[,eset134347$`disease state:ch1`=="sepsis"],
  sc.eset.list = list(sc.eset = sc.eset), 
  ct.varname = "Neutrophil_finer",
  sample = "SampleName", truep = NULL, 
  ct.sub =  unique(sc.eset@phenoData@data$Neutrophil_finer), search.length = 0.01, 
  grid.search = T)  
GSM3943001 has common genes 473 ...
WNNLS Converged at iteration 176
GSM3943002 has common genes 473 ...
WNNLS Converged at iteration 182
GSM3943003 has common genes 473 ...
WNNLS Converged at iteration 184
Searching ENSEMBLE weight by Sum of Squared Errors or Sum of Abs Errors ......
Searching ENSEMBLE weight by LAD -- Minimizing mAD of Y measurement
Error in lsfit(x, y, intercept = FALSE) : only 0 cases, but 1 variable

TRACE BACK:

Error in lsfit(x, y, intercept = FALSE) : only 0 cases, but 1 variable
4.
stop(sprintf(paste0(ngettext(nry, "only %d case", "only %d cases"), ", ", ngettext(ncx, "but %d variable", "but %d variables")), nry, ncx), domain = NA)
3.
lsfit(x, y, intercept = FALSE)
2.
L1pack::lad(y ~ . - 1, data = dt, method = c("BR", "EM"))
1.
SCDC_ENSEMBLE(bulk.eset = eset134347[, eset134347$`disease state:ch1` == "sepsis"], sc.eset.list = list(sc.eset = sc.eset), ct.varname = "Neutrophil_finer", sample = "SampleName", truep = NULL, ct.sub = unique(sc.eset@phenoData@data$Neutrophil_finer), search.length = 0.01, grid.search = T)
meichendong commented 3 years ago

Hi @zh-zhang1984 , Sorry for the late response. My first guess would be there is some issue in the individual deconvolution procedure. Have you ever tried to run deconvolution separately to see whether they all work? Maybe for the single cell samples, there is/are individual(s) that do not have cells from certain major cell types? I will be glad to help! Please feel free to send more details to meichen@live.unc.edu

Best, Meichen

Dongxu-Zheng commented 2 years ago

Hi, I also came across this problem. Is there any solution? Thanks for any suggestions!

Cheers, Dongxu

meichendong commented 2 years ago

Hi @Dongxu-Zheng , do you have a toy example for me to try? My email is meichen@live.unc.edu

Dongxu-Zheng commented 2 years ago

Hi @Dongxu-Zheng , do you have a toy example for me to try? My email is meichen@live.unc.edu

Hi, thanks for your quick reply. There is a point I would like to make sense, which is if the scRNA-seq and bulk RNA-seq are not coming from the same tissue, can I do this analysis? I assume that a TF activation can make the bulk-RNA-seq has a cell population similar to a specific type of cell within the scRNA-seq. But if it is impossible, then I think that is the reason why I had such ERROR:

Searching ENSEMBLE weight by Sum of Squared Errors or Sum of Abs Errors ...... Searching ENSEMBLE weight by LAD -- Minimizing mAD of Y measurement Error in lsfit(x, y, intercept = FALSE) : only 0 cases, but 1 variable

Could you please give me some hints? Thank you in advance!

Cheers, Dongxu

meichendong commented 2 years ago

Hi @Dongxu-Zheng , if the single cell data and bulk data are from different tissues, you might want to consider whether they are comparable. Is it difficult to find public/other single-cell reference datasets for the same tissue? Since most deconvolution methods are based on the regression, like Y=XB + e, it is important that the single cell data can reflect the underlying features of bulk data. Could you give me more information of your data? -- In the bulk dataset, how many samples there are? -- In the scRNA-seq datasets, how many subjects are available? Thanks for your feedback!