PaulingLiu / ROGUE

Assessing the purity of single cell population
BSD 3-Clause "New" or "Revised" License
96 stars 12 forks source link

Error in predLoess #3

Closed dm8000 closed 3 years ago

dm8000 commented 3 years ago

Hello

I got the following error after trying to run rogue.

> rogue.res <- rogue(expr, labels = meta$leiden_0.8, samples = meta$Treatment, platform = "UMI", span = 0.6)
Error in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x else if (is.data.frame(newdata)) as.matrix(model.frame(delete.response(terms(object)),  : 
  NA/NaN/Inf in foreign function call (arg 5)

In the context, each sample is one treatment.

This is what my dataframes look like

> expr[1:5,1:5]
      V1 V2 V3 V4 V5
Rp1    0  0  0  0  0
Sox17  0  0  0  0  0
St18   0  0  0  0  0
Mybl1  0  0  0  0  0
Sulf1  0  0  0  0  1
> meta[1:5,1:5]
  orig.ident nCount_RNA nFeature_RNA percent.mt timpoint
1    Benitez        318          278  0.9433962       NA
2    Benitez        811          580  0.2466091       NA
3    Benitez        476          392  0.6302521       NA
4    Benitez        302          268  0.3311258       NA
5    Benitez        645          485  0.3100775       NA
PaulingLiu commented 3 years ago

Hi @dm8000. A larger span value, for example 0.9, might address this. Please let me know if this works.

rogue.res <- rogue(expr, labels = meta$leiden_0.8, samples = meta$Treatment, platform = "UMI", span = 0.9)
dm8000 commented 3 years ago

This worked! Thank you!