scanpy icon indicating copy to clipboard operation
scanpy copied to clipboard

add support for Visium HD Spatial Gene Expression data

Open 111-dep opened this issue 10 months ago • 11 comments

What kind of feature would you like to request?

Additional function parameters / changed functionality / changed defaults?

Please describe your wishes

10X updated to Space Ranger v3.0, and the output files differ from the v2.0 version. Scanpy is unable to read the output files from v3.0. Can you add support for Space Ranger v3.0?

111-dep avatar Apr 02 '24 09:04 111-dep

@giovp @LucaMarconato, could you advise here?

ivirshup avatar Apr 02 '24 21:04 ivirshup

Yes, this is a suggestion, and I hope you will consider it.

111-dep avatar Apr 03 '24 01:04 111-dep

Hi, we implemented a reader for Visium HD data in spatialdata-io; an example notebook showing its usage can be found here: https://github.com/scverse/spatialdata-notebooks/blob/main/notebooks/examples/technology_visium_hd.ipynb.

You can use scanpy directly on the AnnData objects that are parsed. For instance, in the last part of the notebook where we download the cluster information, you could instead use scanpy to preprocess/qc the data and then identify the clusters.

Hope this helps 😊

LucaMarconato avatar Apr 03 '24 03:04 LucaMarconato

Thank you very much. This solution perfectly solved the problem.

111-dep avatar Apr 03 '24 08:04 111-dep

Has the format changed for all assays, or is this specific to visium HD?

And is there significant analysis that can be done on these without taking into account extra spatial information?

I would be inclined to say that the visium IO functions in scanpy should be deprecated/ replaced with a light wrapper around: spatialdata_io.experimental.to_legacy_anndata(spatialdata_io.visium(*args, **kwargs)) or just accessing the AnnData from spatialdata_io.visium_hd.

But if there is significant burden involved in the dependencies of spatialdata, then maybe we could implement something lighter here for now.

ivirshup avatar Apr 03 '24 09:04 ivirshup

Has the format changed for all assays, or is this specific to visium HD?

Do you refer to the support for multiple annotation tables or also to other parts of the specs? Visium HD and MCMICRO are currently the only technologies making use of multiple tables.

just accessing the AnnData from spatialdata_io.visium_hd

I would favor this approach. I would call to_legacy_anndata() only if it is essential to have the spatial information is obsm.

LucaMarconato avatar Apr 03 '24 18:04 LucaMarconato

Hi, we implemented a reader for Visium HD data in spatialdata-io; an example notebook showing its usage can be found here: https://github.com/scverse/spatialdata-notebooks/blob/visium_hd/notebooks/examples/technology_visium_hd.ipynb.

You can use scanpy directly on the AnnData objects that are parsed. For instance, in the last part of the notebook where we download the cluster information, you could instead use scanpy to preprocess/qc the data and then identify the clusters.

Hope this helps 😊

Hi, the link seems to be invalid. Is there any alternative links?

QuinceyLv avatar Apr 07 '24 07:04 QuinceyLv

Hi, we implemented a reader for Visium HD data in spatialdata-io; an example notebook showing its usage can be found here: https://github.com/scverse/spatialdata-notebooks/blob/visium_hd/notebooks/examples/technology_visium_hd.ipynb. You can use scanpy directly on the AnnData objects that are parsed. For instance, in the last part of the notebook where we download the cluster information, you could instead use scanpy to preprocess/qc the data and then identify the clusters. Hope this helps 😊

Hi, the link seems to be invalid. Is there any alternative links?

Would you please try this link? https://github.com/scverse/spatialdata-notebooks/blob/main/notebooks/examples/technology_visium_hd.ipynb

111-dep avatar Apr 07 '24 07:04 111-dep

Hi, we implemented a reader for Visium HD data in spatialdata-io; an example notebook showing its usage can be found here: https://github.com/scverse/spatialdata-notebooks/blob/visium_hd/notebooks/examples/technology_visium_hd.ipynb. You can use scanpy directly on the AnnData objects that are parsed. For instance, in the last part of the notebook where we download the cluster information, you could instead use scanpy to preprocess/qc the data and then identify the clusters. Hope this helps 😊

Hi, the link seems to be invalid. Is there any alternative links?

Would you please try this link? https://github.com/scverse/spatialdata-notebooks/blob/main/notebooks/examples/technology_visium_hd.ipynb

Great help. Thanks!

QuinceyLv avatar Apr 07 '24 07:04 QuinceyLv