YosefLab/scone

Error in get_normalized due to no imputation / return_norm = "no"

Opened this issue · 3 comments

The help for get_normalized indicates that

If ‘scone’ was run with ‘return_norm="no"’, this function will
compute the normalized matrix on the fly.

Unfortunately, doesn't seem to work for me because of some error in computing the imputation:

> tmp <- get_normalized(scone_obj, "none,fq,ruv_k=3,no_bio,batch")
Error in x@imputation_fn[[params[1]]](assay(x), impute_args) :
  attempt to apply non-function
> traceback()
3: .local(x, method, ...)
2: get_normalized(scone_obj, "none,fq,ruv_k=3,no_bio,batch")
1: get_normalized(scone_obj, "none,fq,ruv_k=3,no_bio,batch")
> package.version("scone")
[1] "1.4.0"

The issue derives from:

imputed <- x@imputation_fn[[params[1]]](assay(x), impute_args)

as impute_args has been set to NULL by L38.

Hey @diyadas - thanks for reporting this! What does scone_obj@imputation_fn look like for this object?

Hi!

> scone_obj@imputation_fn
list()

That's interesting because the default is list(none=impute_null). Maybe this was overwritten at some point?