squidpy icon indicating copy to clipboard operation
squidpy copied to clipboard

Import from QuPath or CODEX Dataset

Open andreevg04 opened this issue 1 year ago • 1 comments

Dear Community,

I am working on CODEX Datasets and want to use squidpy to analyze the spatial charateristics. Unfortunately I cant seem to generate the anndata object from the .csv export from QuPath. The QuPath .csv is structured as each row is a single cell with columns having marker expressions, columns storing the centroids (X and Y) and different extra data like compartments etc. How to create the anndata object to be able to process it through squidpy especially generating the adata.obsm "spatial".

Best Wishes!!!!

andreevg04 avatar Aug 12 '24 15:08 andreevg04

Hi @andreevg04 , unforutnatley I don't have a lot of experience with qupath. Can I suggest to take a look at this tutorials from spatialdata https://spatialdata.scverse.org/en/latest/tutorials/notebooks/notebooks/examples/models2.html to understand how to import the output of qupath into spatialdata, and hence being able to use it also in squidpy?

How to create the anndata object to be able to process it through squidpy especially generating the adata.obsm "spatial".

the tutorial above should also provide an answer to this question.

There is a similar tutorial in squidpy: https://squidpy.readthedocs.io/en/latest/notebooks/tutorials/tutorial_read_spatial.html but I would suggest you to take a look to spatialdata

If you manage to work it out, it would be very nice if you can report back, since I'm sure it would be useful to many other users who work with both qupath and squidpy, thank you!

giovp avatar Aug 19 '24 07:08 giovp