HelenaLC / muscat

Multi-sample multi-group scRNA-seq analysis tools
166 stars 33 forks source link

prepSim error #81

Closed YingxinLin closed 3 years ago

YingxinLin commented 3 years ago

Hi,

Thank you for the great tool!

When I ran prepSim, it throws the follow error:

Error in DataFrame(beta0 = cs[, 1], row.names = rownames(x)) 

the error could be from the following lines

cs <- y$coefficients
x <- x[!rowAnyNAs(cs), ]
bs <- DataFrame(beta0 = cs[, 1], row.names = rownames(x))

where number of rows of x decreases because NA in cs, but cs remain the same.

HelenaLC commented 3 years ago

Thanks for pointing this out. I can't reproduce the error easily, but the lines you posted seam sensible to result in such an error... I have pushed a fix just now (available on master & Bioc devel in a few days).