Open Lukadon77 opened 6 months ago
I met the same question!!! Do you figure out how to fix it? I actually don't really know what steps should be done to get the correct rds file as the input for beyondcell.
@Lukadon77 @Jojojo-1990
Hey, sorry for the late reply
Unfortunately, this is a common issue caused by the imputation step of the regression. At the moment, we suggest just replacing the NaN values with 0s. See the following code snippet:
# Do not allow NaNs
bc@normalized[is.na(bc@normalized)] <- 0
bc <- bcRecompute(bc, slot = "normalized")
bc <- bcRegressOut(bc = bc, vars.to.regress = c("nFeature_RNA"))
when I regressout the bc S4 object bcRegressOut(bc, add.DSS = T, vars.to.regress = c("nFeature_RNA")) it stops with the following error:
Error in rep(1, ncol(dist)) : nvalid 'times' argument.
How can I fix this bug?