drighelli / SpatialExperiment

55 stars 20 forks source link

Basic import of seqFISH from Spatial Genomics genePS into SpatialExperiment #157

Closed methornton closed 3 months ago

methornton commented 4 months ago

Hello!

I have some seqFISH data from Spatial Genomics generated by their 'genePS' system. I was wondering if anyone had some code to import this data into a SpatialExperiment S4 R/Bioconductor class object? It seems like the import functions were developed for the 10X Visium.

I did find a tutorial from a Hackathon, but it was for multimodal data and required the data to be run through smfish-hmrf, which would be ideal normally. I don't have the extra information to use it.

I also posted this on the Bioconductor support website, here, []https://support.bioconductor.org/p/9159361/(url)

The output data per ROI is in three CSV files which are structured like this:


    *_CellCoordinates.csv
    label,area,center_x,center_y
    1,4293,23720,1512
    2,6549,24498,1530
    3,2670,23152,1514
    4,4639,23537,1515

    *_CellxGene.csv
        ITGB1   NR4A1   THBS1   HIF1A   ******    ID2   CD37    DUSP2   ETS1  (600 gene entries)    
    1   0   0   2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   1   0   0   0   0   0   0   0   0   0   0   
    2   0   1   0   0   0   0   0   0   0   0   0   3   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
    3   0   0   1   0   0   0   0   1   1   0   0   1   0   0   1   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   1   0   0   1   0   1   0   0   0   1   0   0   0   0   

    *TranscriptList.csv
    name,x,y,z
    ITGB1,13841,3777,1
    ITGB1,13850,3773,1
    ITGB1,14866,3292,1
    ITGB1,14894,3774,1

This was all I was given to work with (so far). I will track down the images for all 7 ROI. Any advice or information that you can share with me is greatly appreciated. Thank you.

LiNk-NY commented 4 months ago

Thanks Matt for the issue. Is this supported, Dario? @drighelli

HelenaLC commented 3 months ago

Since we’re “outsourcing” readers, perhaps better to address this to SpatialExperimentIO? Read10xVisium (the only reader we ever had) is being deprecated, and we have agreed to not include readers in the S4 class package.

methornton commented 3 months ago

@HelenaLC Ok. I am grateful for your efforts. The reader for 10XVisum was like a 'selling point' for the whole 'SpatialExperiment' S4 class. It's in the short description of the package from BiocViews. I kind of understand the S4 object, but I am always uncertain how to make sure my format is fully complete, that's why I like the readers. Although sure, it could be considered a little lazy. I guess that there is an accepted method to import seqFISH data into seurat. There are also accepted methods for exporting from seurat into spatialexperiment. If anyone needs a work around.

HelenaLC commented 3 months ago

Absolutely agree that readers are necessary when both class and the data coming in are quite complex! I was only saying that these are now being implemented in other packages, e.g., SpatialExperimentIO and VisiumIO, so it’s now sensible to drop them from SPE. Keeping them separate helps keeping dependencies low for packages building on the S4 class, and making each package more easily maintainable and robust. Note that, previously, “plain” 10x single-cell data could be reading using DropletUtils not, say, the SCE package.

methornton commented 3 months ago

@HelenaLC Oh Wow. I though that was a function in SpatialExperiment. SpatialExperimentIO is a whole package for import of spatial data! Thank you!! I'll ask them about it.

HelenaLC commented 3 months ago

Continued here

drighelli commented 3 months ago

@methornton @LiNk-NY Sorry for my late reply, I was out on vacation, I can see that you already managed with Estella to create a dedicated function in the SpatialExperimentIO package. Thanks @HelenaLC for handling this.