You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PseudobulkExpression (and AggregateExpression) do not pass user-specified scale.factor to NormalizeData
Reproducing Code Example
library(Seurat)
# create two pseudobulk expression Seurat objects using "groups" metadata annotation of pbmc_smallpb_1e6<- PseudobulkExpression(pbmc_small, return.seurat=T, method="aggregate", group.by="groups", normalization.method="RC", scale.factor=1e6)
pb_default<- PseudobulkExpression(pbmc_small, return.seurat=T, method="aggregate", group.by="groups", normalization.method="RC")
# default scale.factor is used for RC normalisation regardless of whether this is specified above
colSums(pb_1e6[["RNA"]]$data)
# g1 g2 # 10000 10000
colSums(pb_default[["RNA"]]$data)
# g1 g2 # 10000 10000 # you need to rerun Normalize Data directly to use a different scale.factor
colSums(NormalizeData(pb_1e6, normalization.method="RC", scale.factor=1e6))
# g1 g2 # 1e+06 1e+06
Error Message
Additional Comments
I believe this is due to the scale.factor argument specified when using either AggregateExpression or PseudobulkExpression not being passed to NormalizeData in lines 1546-1550 of seurat/R/utilities.R
Issue Description
PseudobulkExpression (and AggregateExpression) do not pass user-specified scale.factor to NormalizeData
Reproducing Code Example
Error Message
Additional Comments
I believe this is due to the scale.factor argument specified when using either AggregateExpression or PseudobulkExpression not being passed to NormalizeData in lines 1546-1550 of seurat/R/utilities.R
Session Info
The text was updated successfully, but these errors were encountered: