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

Error in run.RCTD(), could not find function "solveIRWLS.weights" #227

Open
luoyufei opened this issue Jan 24, 2025 · 2 comments
Open

Error in run.RCTD(), could not find function "solveIRWLS.weights" #227

luoyufei opened this issue Jan 24, 2025 · 2 comments

Comments

@luoyufei
Copy link

Hi,

I'm trying to annotate cell type of my spatial transcriptomics data, generated by VISIUM HD.
When i ran RCTD <- run.RCTD(RCTD, doublet_mode = "doublet") , i got the following error:

Loading required package: spacexr
Error in { :
task 1 failed - "could not find function "solveIRWLS.weights""

I digged deeper trying with the 3 functions :
RCTD <-fitBulk(RCTD)
RCTD <- choose_sigma_c(RCTD,)
RCTD <- fitPixels(RCTD, doublet_mode = "doublet")
It output the same error at choose_sigma_c(RCTD) step.

Could you help me to work this out please?
Many thanks

@luoyufei
Copy link
Author

Oh, my problem is just resolved when i specify max_cores = 1 instead of 4 in the previous function create.RCTD(query, reference, max_cores = 1). Maybe due to the multicores configuration on my cloud posit.

@Liuy12
Copy link

Liuy12 commented Feb 20, 2025

I encountered the same issue when setting max_cores higher than 1. For me it's caused by the parallel backend with parallel::makeCluster not working properly. I created a repo here (https://github.com/Liuy12/spacexr), and commented out the parallel backend registering steps within spacexr. After installing this version, it worked for me.

To use multi-core, you can try something like:

library(spacexr)
library(future)
library(doFuture)
registerDoFuture()
plan("multicore", workers = 10)

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