RGLab / MAST

Tools and methods for analysis of single cell assay data in R
226 stars 57 forks source link

Error message from filter #38

Closed JohnReid closed 9 years ago

JohnReid commented 10 years ago

Any idea what could cause this error?

assay.f <- SingleCellAssay::filter(assay, groups="time") Error in apply(abs(z.exprs) > sigmaContinuous, 1, sum, na.rm = T) : dim(X) must have a positive length

the assay was built like:

assay <- SingleCellAssay(dataframe=ncounts.m, idvars="cell", cellvars="time", primerid="tx", featurevars="symbol", measurement="log.count")

time is a factor with 5 levels of which 3 are used.

Thanks

gfinak commented 10 years ago

I suspect the filtering is not dropping unused levels, and thus z.exprs is empty. As a quick fix, perhaps refactor time to include only the levels used. Can you post a small reproducible example?

JohnReid commented 10 years ago

First, I guess that perhaps this filter only makes sense for qPCR data. Is it worth applying it to RNA-seq data?

Second, when I try to refactor time to only use the 3 levels, I get these errors:

Error in combine(pDataX, pDataY) : data.frames contain conflicting data: non-conforming colname(s): time In addition: Warning messages: 1: In alleq(x[sharedRows, nm, drop = FALSE], y[sharedRows, nm, drop = FALSE]) : Component 1: target is NULL, current is character 2: In FUN(c("time", "wellKey", "cell")[[3L]], ...) : data frame column 'time' shared rows not all equal

Sorry that I don't have an example I can send you smalll or otherwise.

gfinak commented 9 years ago

Quoting

Hi, Thanks for the quick response. I've managed to work out that I had a typo in my hypothesis >argument to zlm.SingleCellAssay. I had inadvertently capitalised Time which slipped by without a >warning. So sorry for the noise.