meichendong / SCDC

SCDC
42 stars 10 forks source link

"Not enough valid cell type!" what is a good ct.sub parameter? #32

Open sarahbonnin opened 2 years ago

sarahbonnin commented 2 years ago

Hello,

I was wondering how you decide for the "ct.sub" parameter, i.e. "subset of cell types that are selected to construct basis matrix" ?

I get the "Not enough valid cell type!".

How does this error occur? I didn't quite understand exactly how I can optimize this parameter: do you choose cell types that are the most represented in the single-cell RNA-seq dataset?

Thank you!

sarahbonnin commented 2 years ago

Hello,

Regarding this issue, I realized that by setting weight.basis to FALSE, the error disappeared.

Essentially, with my data, sc.basis$basis.mvw contains only NA, so when sc.basis$basis is used instead, there is no problem.

  if (weight.basis){
    basis.mvw <- sc.basis$basis.mvw[, ct.sub]
  } else {
    basis.mvw <- sc.basis$basis[, ct.sub]
  }

What can be the problem here? Is it ok to set weight.basis to FALSE?

Thank you