-
Notifications
You must be signed in to change notification settings - Fork 1
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
Update util.py #21
Update util.py #21
Conversation
csr_array will mess up downstream cause Anndata won't accept it and can't coerce it, switched to using csr_matrix instead. You also can't just lock it to 0.9.1 Anndata version since the new squidpy and scanpy functions will throw a fit for newer functions like reading in visium data.
Thanks for the pull request Alex! Can you elaborate? In particular, I don't have the best test set up right now, but in what situations does Furthermore, I believe that the AnnData version is not "locked" to |
Scanpy and Squidpy added functions that directly read in visium data; if you want those functions to work, you have to install a later version of Anndata, which my conda solver put at version 0.10.9. Your .toml allows greater than, it should be equal if the specific version of anndata is essential. But if you make it equal, it'll likely be unsolvable for more recent versions of Squidpy and Scanpy. However, these later versions of anndata no longer permit csr_arrays to be assigned to .obsm, so every instance where you use csr_array has to be replaced with csr_matrix to avoid throwing an error. I've run the code and I believe it's a drop in replacement that works fine, however there other instances in your code base where it also needs to be fixed that I've recently discovered and haven't submitted a PR for yet. |
I see... that's really annoying, since the SciPy official documentation recommends switching to their new array interface: https://docs.scipy.org/doc/scipy/reference/sparse.html I feel that Scanpy/Squidpy should enable sparse arrays to be saved in But thanks for finding this; will try to work with the Scanpy developers to figure out a resolution. |
Good news: I think |
I'll have to check for the exact line but I think the error isn't fixed by this, as it's a coerce array error that gets raised when it's a csr_array. |
I see, but I was digging deeper into the |
Hey @alexanderchang1, I made many changes to Popari, including a hotfix for a Squidpy, which is not compatible with the most recent version of AnnData. I'm hosting the hotfix on my own GitHub, which means that unfortunately the most up-to-date version of Popari can't yet be uploaded to PyPI. Instead, just |
Closing this as solved by more recent iterations of Popari. One thing to note, there is currently a pin for In any case, if you want to use Popari you should just create a new environment for it and install the pinned dependencies there (just run |
csr_array will mess up downstream cause Anndata won't accept it and can't coerce it, switched to using csr_matrix instead. You also can't just lock it to 0.9.1 Anndata version since the new squidpy and scanpy functions will throw a fit for newer functions like reading in visium data.