openproblems: Spatial decomposition: cell2location/RCTD/destVI benchmark results don't make sense

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the main branch of openproblems.

I see that cell2location benchmark results as well as results for other methods such as RCTD don’t make sense (https://openproblems.bio/benchmarks/spatial_decomposition/pancreas_alpha_0_5). The accuracy and ranking are very unexpected - I would expect (from best to worst):

  1. Cell2location
  2. RCTD, Cell2location amortised, potentially DestVI
  3. Stereoscope
  4. NNLS, NMF-reg, SeuratV3, NMF? (not sure where to place NMF)
  5. Random assignment (baseline)

However, it seems that only NMF and Stereoscope are doing better than a random baseline. In addition, cell2location amortised is better than standard cell2location.

Would be great to investigate what happened before reporting these results in a publication @LuckyMD @scottgigante .

Where can I see the run time conditions for the number of iterations, other hyperparameter settings, and whether the training was performed on GPU/CPU? Maybe there is a bug in metric computation and the outputs of models are not normalised to proportions?

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 35 (18 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks for the report @vitkl! @giovp is already looking into this. Hopefully we will find the cause soon.

Improved benchmarks are uploaded at https://openproblems.bio/benchmarks/spatial_decomposition/. Mostly match your expectations, except for Cell2location.

Are the defaults ever overwritten?

Not in the automated benchmark. Override is there for you if you want to run the methods yourself with different params.

What is needed to be installed to run the simple python option?

If you’re not adding new dependencies,

pip install --editable .
pip install -r docker/openproblems-python-extras/requirements.txt

should do the job. You only need docker images if a) you can’t install the deps locally e.g. in a virtualenv or b) you are running the tests locally as described in CONTRIBUTING.

Questions about the datasets and methods in this task are better posed to @giovp than to me.

How is the value of these two arguments set?

Unless set manually, the defaults are set in the function. https://github.com/openproblems-bio/openproblems/blob/main/openproblems/tasks/spatial_decomposition/methods/cell2location.py#L38

Similarly, I see that Tabula Muris Senis data has both Smart-seq2 and droplet-based 10x. Do you include both in the simulation?

No. We use only 10x data from lung at the 30m time point. https://github.com/openproblems-bio/openproblems/blob/main/openproblems/tasks/spatial_decomposition/datasets/tabula_muris_senis.py#L10

Another issue is scRNA batch effects resulting in weird simulated data.

We keep only one batch of the pancreas data for this reason. https://github.com/openproblems-bio/openproblems/blob/main/openproblems/tasks/spatial_decomposition/datasets/pancreas.py#L28

This is CPU-based training, right?

Yes.

Is it possible to look at the predictions of this workflow rather than just r^2?

You can run the methods yourself. Either use the CLI (see CONTRIBUTING.md) or simply

import openproblems
adata = openproblems.tasks.spatial_decomposition.datasets.pancreas_alpha_1(test=False)
adata = openproblems.tasks.spatial_decomposition.methods.cell2location(adata)

and your results will be in adata.obsm["proportions_pred "] as described in the task API.

I can add a simulation dataset that accounts both for cell type co-occurrence and samples spatially smooth cell type densities. Is this possible?

That would be great!