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 when running run.CSIDE.replicates, doublet_mode not found in myRCTD@config #177

Open
rpisalive opened this issue Sep 11, 2023 · 5 comments

Comments

@rpisalive
Copy link

rpisalive commented Sep 11, 2023

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:

  1. 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)
  2. 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)
  3. 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.

@DanielZucha
Copy link

Hello,

I came across the same issue with the packageVersion("spacexr" = ‘2.2.1’. But I solved it using the recommendation in #142 .

@glzhang90095
Copy link

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

@rpisalive
Copy link
Author

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.

@glzhang90095
Copy link

@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.

@DanielZucha
Copy link

Hello and sorry for the late response. I confirm that I implemented solution identical as outlined by @rpisalive. Happy coding!

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

3 participants