StatBiomed / SpatialDM

Spatial direct messaging detected by bivariate Moran
https://spatialdm.readthedocs.io
Apache License 2.0
24 stars 5 forks source link

Load 10xgenomics Visium data using scanpy #26

Closed maiskovich closed 1 year ago

maiskovich commented 1 year ago

Hello,

Thank you for sharing the package.

I am trying to load some Visium data following the tutorial. In there, I see that the data is loaded as adata1 = sdm.datasets.dataset.melanoma(), I thought that I could just do adata = sc.read_visium("visium_ov_orig") to load my own files(using a Visium h5 file, this can be replicated with this file ), but then, I am getting errors in other parts of the tutorial, it starts failing when I call: sdm.extract_lr(adata, 'human', min_cell=3) with the error: pandas.errors.InvalidIndexError: Reindexing only valid with uniquely valued Index objects

Is there a different way to load this data? I tried checking the codebase and couldn't find a method that seemed more suitable.

Thank you