Error when running run.CSIDE.replicates, doublet_mode not found in myRCTD@config
Hello,
I ran run.RCTD.replicates on multiple replicates (visium data) with doublet_mode 'full' and there is a RCTDmode 'full' stored in myRCTD@config. When I further ran run.CSIDE.replicates, error message shows up:
run.CSIDE.replicates: running CSIDE for replicate 1
**Error in if (myRCTD@config$doublet_mode == "multi") {: argument is of length zero Traceback:
- run.CSIDE.replicates(myRCTD.reps, cell_types, explanatory.variable.replicates = exvar_list_nc, . cell_type_threshold = 2, doublet_mode = F, weight_threshold = 0.95, . population_de = T)
- run.CSIDE.single([email protected][[i]], explanatory.variable.replicates[[i]], . cell_types = cell_types, cell_type_threshold = cell_type_threshold, . gene_threshold = gene_threshold, doublet_mode = doublet_mode, . weight_threshold = weight_threshold, sigma_gene = sigma_gene, . PRECISION.THRESHOLD = PRECISION.THRESHOLD, test_genes_sig = test_genes_sig_individual, . cell_types_present = cell_types_present, fdr = fdr, log_fc_thresh = log_fc_thresh, . test_error = test_error)
- aggregate_cell_types(myRCTD, r1, doublet_mode = doublet_mode)**
It looks like myRCTD@config$doublet_mode, which does not exist, is being called by the function aggregate_cell_types: link. As there is no doublet_mode in the config, the error happened. I am not sure if I misunderstood something but run.CSIDE.replicates worked when I added doublet_mode 'full' to the config.
Hello,
I came across the same issue with the packageVersion("spacexr" = ‘2.2.1’. But I solved it using the recommendation in #142 .
Hi DanielZucha, rpisalive Did you fix your issue? I had the similar problem since I updated the latest version, 2.2.1. I just don't know where to insert the following code as suggested in #142. myRCTD@config$doublet_mode = myRCTD@config$RCTDmode
Hello @glzhang90095 , rather than modifying the original code, I simply added a slot to create myRCTD@config$doublet_mode == 'full' so that myRCTD@config$doublet_mode == "full" could be found when the function aggregate_cell_types is calling it. I had multiple samples so I added myRCTD@config$doublet_mode == 'full' for each sample. By doing that, I did not see the error again.
@rpisalive Thanks for your quick response! I followed your suggestion and added the following setting between "run.RCTD.replicates" command and "run.CSIDE.replicates" command, and it worked!
[email protected][1][[1]]@config$doublet_mode = 'full' [email protected][2][[1]]@config$doublet_mode = 'full' [email protected][3][[1]]@config$doublet_mode = 'full' [email protected][4][[1]]@config$doublet_mode = 'full'
Hello @glzhang90095 , rather than modifying the original code, I simply added a slot to create myRCTD@config$doublet_mode == 'full' so that myRCTD@config$doublet_mode == "full" could be found when the function aggregate_cell_types is calling it. I had multiple samples so I added myRCTD@config$doublet_mode == 'full' for each sample. By doing that, I did not see the error again.
Hello and sorry for the late response. I confirm that I implemented solution identical as outlined by @rpisalive. Happy coding!