Create SpatialData from Akoya Phenocycler qptiff

Hi, I am trying to create a SpatialData using Akoya Phenocycler qptiff files. I have tried by renaming the qptiff to tif and taking the txt export from QuPath for cell segmentation and converting it to csv. When I ran the code, I keep getting a ValueError: no types given issue. This is the line I used:

sd = spatialdata_io.codex(“./”, fcs=False)

I was just wondering if anyone have protocols doing this process? Thank you in advance!

Hi, thanks for reaching out! I will share the link to this conversation to LLehner, who wrote the reader for CODEX data and could help with this.

Is the data that you are using public? A code for a reproducible working example on public data would help us investigate the problem.

1 Like

Hi Luca! Thanks for the reply! Unfortunately the data I am working with is not public :grimacing:

Would it maybe be possible to send an anonymized portion of it via email? You could maybe for each file delete all the rows but a few, change gene names/expression, crop images etc. If that is feasible please reach out to me via Zulip so that I can give you my email for data sharing.

Alternatively, could you please verify if the bug occurs also on a public dataset?

Thank you.

Hi Luca. I am going to have to consult my supervisor on what I am allowed to share in terms of the image. Sorry for all the protocols. I can send you a sample of the csv file I have. Can you send me your email address?

How I got this was I loaded my qptiff file into QuPath. Then I segmented the cells and exported this data out using the QuPath export functions. The export comes out with a txt file. I manually converted it into a csv so that it can be used for SpatialData.

For the tif file, I straight up renamed my qptiff file to tif and it seemed to work for other pipelines that I have worked with. I am not 100% sure if this is the right way to do it.

Sure, you can use the send email button form here.

Anyway, since the data sharing process may be time consuming and since as I have now understood the object that you have is not a standard CODEX dataset but already a slightly processed one, I think the best is to construct the initial SpatialData object from the raw codex() data and then to construct a new object where you cherrypick elements from the CODEX SpatialData object and the new data from QuPath. Would this work for you?