saezlab / DOT

DOT
https://saezlab.github.io/DOT/
GNU General Public License v3.0
6 stars 0 forks source link

AnnData as input to setup.srt() #5

Open EST09 opened 2 weeks ago

EST09 commented 2 weeks ago

Hi,

Thank you for this package. It looks great and I'm really looking forward to using it!

I'm struggling a little with setting up my srt object with an anndata input. I load the anndata from a h5ad file

Screenshot 2024-06-20 at 11 35 52

and then try

dot.srt <- setup.srt(srt_data=ex_anndata$X, srt_coords=ex_anndata$obsm["spatial"]) My ex_anndata$X seems to be a matrix

Screenshot 2024-06-20 at 11 36 34

and my coordinates from ex_anndata$obsm["spatial"] are the same length as my matrix

Screenshot 2024-06-20 at 11 37 08 Screenshot 2024-06-20 at 11 37 36

Please could I check if there's something I'm missing?

I can load from a standard xenium output using the Seurat LoadXenium() function but I've changed the segmentation and saved to a xenium experiment format with sopa, and then Seurat is having trouble with the cell_feature_matrix.zarr.zip files which is why I've gone the h5ad anndata route.

Thank you,

Best wishes, Emily

EST09 commented 2 weeks ago

sorry I'd supplied srt_data it as spot x gene - transposed it now. Thank you!