satijalab / seurat

R toolkit for single cell genomics
http://www.satijalab.org/seurat
Other
2.3k stars 917 forks source link

Option to add fluorescence (DAPI, others?) image in ImageDimPlot/ImageFeaturePlot #8099

Closed dpcook closed 4 months ago

dpcook commented 11 months ago

Hi all,

Ideally it would be possible to add an aligned image (eg. DAPI, or an IF stain) to ImageDimPlot() and ImageFeaturePlot(), similar to the addition of the H&E to Visium data in SpatialDimPlot(). This could then be used to produce figures that look like the ISH image. Eg. from Xenium Explorer: image

In terms of implementation, I suspect it would be most ideal for LoadXenium/LoadNanostring/etc to grab optionally grab and store the standard morphology image (eg. morphology_mip/focus.ome.tif). Not sure if FOVs are set up in a way that could support that though.

rsatija commented 11 months ago

I like this idea. Do Xenium and Nanostring each have these types of images included by default for each FOV?

dpcook commented 11 months ago

morphology_mip.ome.tif (max intensity projection) and morphology_focus.ome.tif (2D autofocus) are standard outputs included with each Xenium run. They're pyramidal TIFs of the DAPI stain. Seems like it would be pretty straight forward to work with.

I don't know what Nanostring's default export format is now. It seems to have undergone some changes recently. For a while, a RawMorphologyImages directory would have TIF files for each FOV, and one of the channels would be the isolated DAPI (I don't know how standardized the channel ordering is) -- though signal was always super low in any of the files I looked at and would need an auto contrast. Alternatively, the CellComposite directory would have JPEGs with the merged fluorescence channels for each FOV.

Perhaps another hurdle implementing it with LoadNanostring is that the CSV files often contain all FOVs merged, with the specific FOV specified in the cell metadata. And at the moment (as far as I know), LoadNanostring() ignores that and stores it as a single FOV in the Seurat object. So you would have images for each FOVs, but an object with only a single FOV specified in the assay.

alikhuseynov commented 11 months ago

If I can add here, for Xenium, the only way we could load the ome.tif (eg, 2D morphology_mip.ome.tif) in R was with RBioFormats::read.image see this relevant discussion -> https://github.com/pachterlab/SpatialFeatureExperiment/issues/10 In read.image the resolution arg can be used to load desired lower resolution image from OME TIFF (since full resolution image can be quite large), then that image can be converted to terra SpatRaster class or similar to overlay in a plot with segmentation polygons and molecule coords.

igrabski commented 4 months ago

Hi, thanks for the suggestion! Unfortunately we don't currently have the bandwidth to add this to our roadmap for now, but if you are interested, we would definitely be happy to consider a pull request, or we may circle back to this in the future.