Open hahia opened 1 year ago
Hi @hahia
If you can train the model on full data, I would strongly recommend continuing to do so, but instead replacing the mod.export_posterior
with a more memory-efficient alternative by computing the quantiles directly rather than using 1000 samples (default):
adata_vis = mod.export_posterior(
adata_vis, use_quantiles=True,
# choose quantiles
add_to_obsm=["q05","q50", "q95", "q0001"],
sample_kwargs={'batch_size': 2500, 'use_gpu': True}
)
note that you would also have to specify mod.plot_QC(summary_name= 'q50')
instead of mod.plot_QC(summary_name= 'means')
(default).
Hi @vitkl,
I'm having the same error as above, running out of memory when running mod.export_posterior
.
I'm trying to run mod.export_posterior
by computing quantiles directly, as explained in your reply above, however, I am getting the following error:
TypeError: export_posterior() got an unexpected keyword argument 'use_quantiles'
Is there any way to fix this? Thank you!
Version of cell2location: 0.1
For the quantiles option you need to install the latest cell2location version from GitHub
Great, thank you for your help, I'll try installing the latest version
Hello, thank you for this valuable tool. I have a question regarding memory usage in Cell2Location. During the deconvolution step, I'm encountering an 'out of memory' issue with the following code
To address this, I'm considering splitting the data and running Cell2Location for each sub-data. Will the results be the same in this case?