nf-core / spatialvi

Pipeline for processing spatially-resolved gene counts with spatial coordinates and image data. Designed for 10x Genomics Visium transcriptomics.
https://nf-co.re/spatialvi
MIT License
49 stars 18 forks source link

Use `to_legacy_anndata` function from `spatialdata_io` instead of custom code #75

Open fasterius opened 6 months ago

fasterius commented 6 months ago

Description of feature

We are currently using custom code as a work-around as a replacement for the to_legacy_anndata function from spatialdata_io, which did not exist when the work with SpatialData in this pipeline was initiated. This function is now merged in the SpatialData repo, but there is an issue with using it: https://github.com/scverse/spatialdata-io/issues/134.

As soon as this (and other possible issues) is fixed we should adopt the existing function instead of the custom one we have now.

LucaMarconato commented 6 months ago

Hi, I just fixed the linked issue. If you try the new to_legacy_anndata() please let us know in case the function needs some adjustments. We placed it under the experimental submodule because, as we encourage new packages not to rely on the legacy AnnData representation, we also didn't try using it in real world analyses, just in the ones we tested when developing the function (scanpy and squidpy).