SCDC
SCDC copied to clipboard
SCDC_Ensembl issue
Hi,
I am running the tutorial from the page and having a similar issue posted by other users as well.
I am testing the "Mouse Mammary Gland Data Analysis" part and when I run the following code, I get the following error:
bulk10x <- readRDS("peroubulk10x_fvb34.rds")
qc.perou<- readRDS("./SCDC/qc_perou.rds")
qc.tmouse<- readRDS("./SCDC/qc_tmouse.rds")
perou <- qc.perou$sc.eset.qc
tmouse <- qc.tmouse$sc.eset.qc
perou$metacluster2[perou$md_cluster %in% c( "immune")] <- "immune"
perou$metacluster2[perou$md_cluster %in% c("basal","luminal","fibroblast","endothelial")] <- "BaLuFibEndo"
perou.subcl <- SCDC_prop_subcl_marker(bulk.eset = bulk10x, sc.eset = perou,
ct.varname = "md_cluster", fl.varname = "metacluster2",
sample = "subj",
ct.sub = c("endothelial","fibroblast","immune",
"luminal","basal"),
ct.fl.sub = unique(perou$metacluster2),
select.marker = T, LFC.lim = 5)
tmouse$metacluster2[tmouse$md_cluster %in% c("immune")] <- "immune"
tmouse$metacluster2[tmouse$md_cluster %in% c("endothelial", "fibroblast","luminal","basal")] <- "BaLuFibEndo"
tmouse.subcl <- SCDC_prop_subcl_marker(bulk.eset = bulk10x, sc.eset = tmouse,
ct.varname = "md_cluster", fl.varname = "metacluster2",
sample = "subj", ct.sub = c("endothelial","fibroblast",
"immune","luminal","basal"),
ct.fl.sub = unique(tmouse$metacluster2), select.marker = T,
LFC.lim = 5)
ens_subcl_perou10x <- SCDC_ENSEMBLE(bulk.eset = bulk10x,
prop.input = list(tmouse.subcl = tmouse.subcl, perou.subcl = perou.subcl),
ct.sub = c("endothelial","fibroblast","immune","luminal","basal"),
search.length = 0.01, grid.search = T)
Using user-input estimated proportion list ... 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 2 variables
Could you tell me what went wrong here?
Hi! Thanks for using SCDC and sorry for the occurred error! Please make sure you are using the latest version. Yes, this issue has been reported before and I think it's been corrected in the current version. In the old version, one step of estimating the yhat matrix was missed. So if you want to correct that manually, add the following before the SCDC_ENSEMBLE step: `yhat.10x.perou <- perou.subcl$sc.basis$basis.mvw %*% t(perou.subcl$prop.est)[colnames(perou.subcl$sc.basis$basis.mvw),]
yhat.10x.tmouse <- tmouse.subcl$sc.basis$basis.mvw %*% t(tmouse.subcl$prop.est)[colnames(tmouse.subcl$sc.basis$basis.mvw),]
perou.subcl$yhat <- yhat.10x.perou
tmouse.subcl$yhat <- yhat.10x.tmouse`
Please let me know if you still have any problem. Thanks again.