satijalab / seurat

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

fovs are not captured by ImageDimPlot function #9321

Closed elifozcelik closed 1 month ago

elifozcelik commented 1 month ago

Hi, I am using CosMX Nanostring data in my analysis and trying to plot fovs in my images. I have assigned fovs in my metadata but I am getting the following error:

> ImageDimPlot(cancer, fov= "C16_S1_1", axes = TRUE)
Error in ImageDimPlot(cancer, fov = "C16_S1_1", axes = TRUE) : 
  No compatible spatial coordinates present

What is the reason for this? How should I assign fovs? I am also including my metadata and the Images section of the object. Thank you so much.

> cancer@images
$C16.S1
Spatial coordinates for 40995 cells and 979 molecules
 First 10 molecules: AATK, ABL1, ABL2, ACE, ACE2, ACKR1
Default segmentation boundary: segmentation 
 1 other segmentation boundaries present: centroids 
Associated assay: Nanostring 
Key: Nanostring_ 
> head(cancer@meta.data)
              orig.ident nCount_Nanostring nFeature_Nanostring cell_ID fov Area
C16.S1_1_1 SeuratProject               275                 121 c_1_1_1   1 7108
C16.S1_2_1 SeuratProject               346                 148 c_1_1_2   1 4956
C16.S1_3_1 SeuratProject               397                 136 c_1_1_3   1 5115
C16.S1_4_1 SeuratProject               451                 186 c_1_1_4   1 4791
C16.S1_5_1 SeuratProject               249                 151 c_1_1_5   1 3016
C16.S1_6_1 SeuratProject               186                 110 c_1_1_6   1 2511
           AspectRatio Width Height Mean.CD298 Max.CD298 Mean.PanCK Max.PanCK
C16.S1_1_1        0.86   101    117      20935     58000      13867     31104
C16.S1_2_1        0.54    65    121      15491     34400       9561     34240
C16.S1_3_1        1.09    86     79      13940     28672       8934     21552
C16.S1_4_1        1.46   102     70      13167     38448       4048     26160
C16.S1_5_1        1.54    86     56      17725     49152       1398     28480
C16.S1_6_1        1.05    59     56      28386     59040        188      1008
           Mean.CD45 Max.CD45 Mean.CD3 Max.CD3 Mean.DAPI Max.DAPI Run_name
C16.S1_1_1       232     1104      175     720      3128    12256  Run5525
C16.S1_2_1       254     3040      139     608      2544    11424  Run5525
C16.S1_3_1       155      592       90     512       301     7440  Run5525
C16.S1_4_1      1018     6128      198    1184      3515    17008  Run5525
C16.S1_5_1       876     4272      200     672      6667    17072  Run5525
C16.S1_6_1      1501     3552      505    2400      5406    12960  Run5525
           Slide_name ISH.concentration Dash tissue slide_ID_numeric
C16.S1_1_1   R5525_S1               1nM    3    C16                1
C16.S1_2_1   R5525_S1               1nM    3    C16                1
C16.S1_3_1   R5525_S1               1nM    3    C16                1
C16.S1_4_1   R5525_S1               1nM    3    C16                1
C16.S1_5_1   R5525_S1               1nM    3    C16                1
C16.S1_6_1   R5525_S1               1nM    3    C16                1
           Run_Tissue_name log10totalcounts   IFcolor nb_clus leiden_clus
C16.S1_1_1          C16_S1         2.439333 #75FF66FF       j           5
C16.S1_2_1          C16_S1         2.539076 #80CE51FF       j           5
C16.S1_3_1          C16_S1         2.598791 #4EC134FF       j           5
C16.S1_4_1          C16_S1         2.652246 #FF5773FF       j           5
C16.S1_5_1          C16_S1         2.396199 #FF1E74FF     pDC           8
C16.S1_6_1          C16_S1         2.269513 #FF04FFFF     pDC           8
                    nclust        id              **specific_fovs**
C16.S1_1_1 niche5 C16.S1_1_1      C16_S1_1
C16.S1_2_1 niche5 C16.S1_2_1      C16_S1_1
C16.S1_3_1 niche5 C16.S1_3_1      C16_S1_1
C16.S1_4_1 niche5 C16.S1_4_1      C16_S1_1
C16.S1_5_1 niche5 C16.S1_5_1      C16_S1_1
C16.S1_6_1 niche2 C16.S1_6_1      C16_S1_1
dcollins15 commented 1 month ago

Hi @elifozcelik ,

Thank you for reaching out! We’re always grateful when folks take the time to help make Seurat better 🙂

Unfortunately, with the details provided, we cannot reproduce your issue. To help us better understand and resolve this issue, please ensure that you provide the following information when reporting a bug:

  1. Describe your issue:

    • A clear and concise description of what the bug is — avoid just pasting in the error message.
  2. Reproducing Code Example:

    • Provide a minimal reproducible example that demonstrates the issue using one of the datasets available through SeuratData. Paste the code in a code block.
    • Since you're error pertains to a custom dataset, make sure to include all of the steps taken to generate it.
  3. Error Message:

    • If any, paste the full error message (starting from line Traceback) in a code block.
    • If no error is raised, consider writing a simple test case that explicitly raises an error if the
  4. System Information:

    • Run sessionInfo() and paste the result in a code block.

We’re going to go ahead and close this issue for now, but once you’ve gathered these details, we strongly encourage you repost and we will be more than happy to help you resolve the problem.