Skip to content
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

Seurat wrapper not working for Seurat v5 objects #81

Open
FloWuenne opened this issue Sep 22, 2023 · 2 comments
Open

Seurat wrapper not working for Seurat v5 objects #81

FloWuenne opened this issue Sep 22, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@FloWuenne
Copy link

Describe the bug
I am trying to run vitessceR using Seurat v5 objects as input. I get the following error:

Warning: Overwriting previous file data/seuratdata/A/0/seurat.zarr.h5Seurat
Creating h5Seurat file for version 3.1.5.9900
Adding counts for RNA
Adding data for RNA
Adding scale.data for RNA
Adding variable features for RNA
Error in if (ncol(x = x[[]])) { : argument is of length zero

To Reproduce
Analyze a seurat object using the seurat v5 installation and try to run the example Seuratwrapper code on that object.

Expected behavior
The expected behaviour is to get the vitessceR dashboard for the seurat object processed as in :
https://vitessce.github.io/vitessceR/articles/seuratdata.html

Screenshots
If applicable, add screenshots to help explain your problem.

Environment:

  • Release or git hash: vitessceR_0.99.0
  • Operating system: MacOS Ventura 13.5 (22G74)
  • R version: R version 4.2.3 (2023-03-15
  • RStudio version: 2023.06.0

I would be happy to help update the wrapper, if you can point me towards the files that need be to adjusted for the v5 format!

Thanks for looking into this and keep up the great work with this package, I really enjoy the vitessce dashboards!

@FloWuenne FloWuenne added the bug Something isn't working label Sep 22, 2023
@FloWuenne
Copy link
Author

FloWuenne commented Feb 25, 2024

@keller-mark Any plans for adding support for Seurat v5 object structure?

@keller-mark
Copy link
Member

Hi @FloWuenne,
I definitely would like to add support for the v5 objects, just have not had a chance to look into how the objects changed from v4 to v5. I think the place that would need updating would be here where the Seurat object is converted to an AnnData object https://github.com/vitessce/vitessceAnalysisR/blob/a8511e6a87c1b0c4c33bf7482825db6292a02028/R/data_to_zarr.R#L13 It seems that the SeuratDisk package we currently use for that has not been updated to support v5 as the error you report here is also reported there in mojaveazure/seurat-disk#166

Ideally this can be accomplished with the AnnDataR package once there is support for Seurat v5 and Zarr.

I also realize some of the documentation is out of date - We now have an AnnDataWrapper class that can be used once the data is in the AnnData format, which serves as a unified way to configure Vitessce from different types of R single cell data structures, for example here

w <- AnnDataWrapper$new(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants