BayraktarLab / cell2location

Comprehensive mapping of tissue cell architecture via integrated single cell and spatial transcriptomics (cell2location model)
https://cell2location.readthedocs.io/en/latest/
Apache License 2.0
321 stars 58 forks source link

Compatibility issues with scvi-tools #385

Open ori-kron-wis opened 1 month ago

ori-kron-wis commented 1 month ago

Hello,

Im the current maintainer of scvi-tools. While testing for a new release, I found out your latest pypi release is not compatible with scvi-tools since march23 (probably since scvi-tools version 1.1.0 or even before that) More specifically cell2location v0.1.3 still uses an scvi-tools util function that is called parse_use_gpu_arg and it was changed since then to parse_device_args. as a result this is not working: from cell2location.models import Cell2location

However, I do see that your current main branch does support that. So the question is whether you are going to release a new version 0.1.4 to pypi soon? otherwise, please suggest to install the correct scvi-tools versions in your manuals for it to work (as I will do the same)

nsdelablancac commented 1 month ago

Hi all,

I successfully used this nice tool at the beginning of the year in my ST data. Then, I had to wipe my computer and reinstall all my programs. Now, I’m also having a lot of problems with dependencies in cell2location, including the one @ori-kron-wis mentioned. I created a conda environment just for install it and followed the instructions, but they have not work. Could you please provide all the required modules and versions to correctly import and run cell2location?

Thank you in advance for your help. Sincerely,

Nuria

vitkl commented 1 month ago

Hi @ori-kron-wis

Thank you for getting to me about this. Apologies for the late reply - I was on annual leave, and I am currently under a lot of pressure to finalise various projects before I move to my next position and deal with the uncertainty of the move and some aspects of the Ukraine situation.

I created a new release https://pypi.org/project/cell2location/0.1.4/ from the cell2location master branch which should hopefully resolve this issue.

I would expect the following instructions to work too @nsdelablancac : https://github.com/BayraktarLab/cell2location?tab=readme-ov-file#conda-environment-for-a100-gpus

I am focusing my efforts on cell2location on the new release https://github.com/BayraktarLab/cell2location/pull/337 with bug fixes, support for larger datasets and changes to the model - in particular support for using segmented cell counts and other changes to the model that are going to become useful in the future. It depends on https://github.com/scverse/scvi-tools/pull/2695. Finalising both is a lot of work so it will likely take until the end of 2024. I tested installing those scvi-tools and cell2location branches into a clean environment ~1.5 months ago - so that should also work.

Please let me know if the new release works with your tests.

ori-kron-wis commented 1 month ago

Thanks @vitkl I can confirm our test and tutorial now work with the PYPI release.

nsdelablancac commented 1 month ago

Hi all! @vitkl , thanks a lot for your help. It worked.