Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling scone with run=TRUE Error #102

Open
e-arslan opened this issue Jul 30, 2019 · 1 comment
Open

Calling scone with run=TRUE Error #102

e-arslan opened this issue Jul 30, 2019 · 1 comment

Comments

@e-arslan
Copy link

Maybe I'm missing some obvious point but whenever I try to run sample code:

 my_scone <- scone(my_scone,
                    scaling=scaling,
                    run=TRUE,
                    eval_kclust = 2:6,stratified_pam = TRUE,
                    return_norm = "in_memory",
                    zero = "postadjust")

I get the following error:

Error in imputation[[im_params[i]]](assay(x), impute_args) : 
   attempt to apply non-function
@ibishof
Copy link

ibishof commented Dec 31, 2020

I had the same issue. I resolved it by using the code at: https://bioconductor.org/packages/release/bioc/vignettes/scone/inst/doc/sconeTutorial.R

oppose to the code at:
https://bioconductor.org/packages/release/bioc/vignettes/scone/inst/doc/sconeTutorial.html

The main difference I see is that the imputation is largely commented out in the Tutorial.R version (works) and is still present in the Tutorial.html (broken).

-----More specifically------
fnr_out = estimate_ziber(x = expr, bulk_model = TRUE,
pos_controls = rownames(expr) %in% hk,
maxiter = 10000)

imputation=list(none=impute_null, # No imputation
expect=impute_expectation) # Replace zeroes

impute_args = list(p_nodrop = fnr_out$p_nodrop, mu = exp(fnr_out$Alpha[1,]))

my_scone <- scone(my_scone,
imputation = imputation, impute_args = impute_args,
scaling=scaling,
k_qc=3, k_ruv = 3,
adjust_bio="no",
run=FALSE)

-----Should be replaced with------
my_scone <- scone(my_scone,
scaling=scaling,
k_qc=3, k_ruv = 3,
adjust_bio="no",
run=FALSE)

head(get_params(my_scone))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants