Closed SuMi300 closed 1 year ago
Hey! That seems odd, can you attach the rda dataset and excel you use in the example so I can try to reproduce it?
Thanks for this! I can replicate the issue and have added a fix in live version v1.8.2 and dev version v1.9.2. The code will run with both now. The live version should be available in bioconductor after a few days but for now, feel free to install the dev version (master branch) directly from github. The issue was that we didn't pass all parameters to check_ewce_genelist_inputs
in the generate_bootstrap_plots
so some default values were used whereas in bootstrap_enrichment_test
all parameters were passed.
Give it a try and let me know if there are any issues?
Cheers, Alan.
Dear Alan,
A (very) belated thank you for looking at the issue. I have gotten back to it myself last week, and after updating many things in R (as always this takes time), I was very happy to see the above issue was fixed!
I have one remark about the code still: as I understand it, it's supposed to only plot (bootstrap)graphs for significant cell types? However, when I run it, it does still plot all cell types graphs in the end output. Even though it does tell me while running only 2 cell types are significant and remain.
Could you still have a look at that?
Thanks in advance, Cheers,
Suzanne
I have one remark about the code still: as I understand it, it's supposed to only plot (bootstrap)graphs for significant cell types? However, when I run it, it does still plot all cell types graphs in the end output. Even though it does tell me while running only 2 cell types are significant and remain.
Hi @SuMi300 you are correct about this. This feature stopped working when I refactored the code recently. But I've just added it back in and seems to working now. You can install the latest version on GitHub. Apologies for that, and thanks for bringing it to our attention.
1. Bug description
Since you made some of the latest changes, the function 'generate_bootstrap_plots' keep giving me this error: "Error in check_ewce_genelist_inputs(sct_data = sct_data, hits = hits, : At least four genes which are present in the single cell dataset & background gene set are required to test for enrichment."
When I use the sct_data, my background list and my list of hits as input for the bootstrap_enrichment_test it works, no error. But with the exact same parameters as input for generate_bootstrap_plots, it gives the error.
I can't seem to figure out where the issue is, but I guess somehow either the background or the ctd_data get modified during processing and don't have comparable gene names anymore. Maybe by this part of what happens in the package?: _Standardising sct_data. Converting to sparse matrix. Aligning celltype names with standardisectd format.
Console output
Expected behaviour
I would have expected the single cell dataset and background list to have identical gene names (mouse) so all background list proteins would be findable in the single cell datase and this function would work and give me graphs; I don't understand how the same input DOES work for when I do the bootstrap_enrichment_test just before.
2. Reproducible example
Data
ctd: list of 1, see screenshot
bg: 5553 objects of 1 variable (1 excel column with mouse gene names(Chr type))
hits: 92 objects of 2 variables (2 excel columns, 1st with mouse gene names (Chr type), 2nd with fold change(num type))
3. Session info
(Add output of the R function
utils::sessionInfo()
below. This helps us assess version/OS conflicts which could be causing bugs.)