meichendong / SCDC

SCDC
42 stars 9 forks source link

SCDC_prop issues - Error in execution #20

Closed pallavisurana1 closed 3 years ago

pallavisurana1 commented 3 years ago

Hi i am using the Xin dataset from MUSIC and testing it with SCDC.

est.xin.props = SCDC_prop(bulk.eset = eset.bulkc.xin$Bulk.counts, sc.eset = xin.eset, cluster = 'cellType', sample = 'SubjectName', ct.sub = xin$cellType %>% levels(), truep = NULL)

I get the following error. Kindly help me out. I am using the pseudo bulk counts from MUSICs functions.

Error in countmat[, ct_sample.id %in% id] : (subscript) logical subscript too long

This is the traceback of the error (if this helps) 6: as.matrix(countmat[, ct_sample.id %in% id]) 5: FUN(X[[i]], ...) 4: lapply(X = X, FUN = FUN, ...) 3: sapply(unique(ct_sample.id), function(id) { y = as.matrix(countmat[, ct_sample.id %in% id]) apply(y, 1, sum, na.rm = TRUE)/sum(y) }) 2: SCDC_basis(x = sc.eset, ct.sub = ct.sub, ct.varname = ct.varname, sample = sample, ct.cell.size = ct.cell.size) 1: SCDC_prop(bulk.eset = eset.bulkconstruct.xin$Bulk.counts, sc.eset = xin, cluster = "cellType", sample = "SubjectName", ct.sub = xin$cellType %>% levels(), truep = NULL)

pallavisurana1 commented 3 years ago

i was able to resolve it - thanks :)