satijalab / seurat

R toolkit for single cell genomics
http://www.satijalab.org/seurat
Other
2.3k stars 918 forks source link

bug about the definetion of RowVarSparse in RunPCA #9396

Open NormalLomo opened 1 month ago

NormalLomo commented 1 month ago

in dimensional_reduction.R there is

RowVar.function <- RowVarSparse in line 869 and

total.variance <- sum(RowVar.function(x = object)) in line 891 while the scale.data is a dgCMatrix.

However the definition of RowVarSparse in utilities.R line 2590 is

RowVarSparse <- function(mat)

so there is a error

Error in RowVar.function(x = object) : unused argument (x = object)

And easily correct it in utilities.R line 2590

RowVarSparse <- function(x) should solve it.

igrabski commented 1 week ago

Hi, thanks for raising this issue -- we have been unable to reproduce this bug. Could you please share a reproducible example of this error?