seurat icon indicating copy to clipboard operation
seurat copied to clipboard

Adding polygon information Cosmx to Seurat

Open roanvanscheppingen opened this issue 9 months ago • 0 comments

Currently the 'standard' export does not contain the polygon information in the 'spatial' layer, nor the transcript locations. I've been looking into ways to import this layer from a polygons.csv but it's not clear how the data should be structured in order to fit the Seurat. This makes ImageDimPlot and PolyDimPlot unusable. Same goes for the image layer, which is empty in the standard Seurat. (I have resorted to plotting polygons using ggplot)

My polygons.csv has the following structure: How should it be imported into the Seurat?

`spc_tbl_ [2,401,250 × 7] (S3: spec_tbl_df/tbl_df/tbl/data.frame) $ fov : num [1:2401250] 1 1 1 1 1 1 1 1 1 1 ... $ cellID : num [1:2401250] 1 1 1 1 1 1 1 1 1 1 ... $ cell : chr [1:2401250] "c_1_1_1" "c_1_1_1" "c_1_1_1" "c_1_1_1" ... $ x_local_px : num [1:2401250] 92 95 111 119 125 126 126 122 119 113 ... $ y_local_px : num [1:2401250] 996 997 1003 1011 1023 ... $ x_global_px: num [1:2401250] 7652 7655 7671 7679 7685 ... $ y_global_px: num [1:2401250] 132652 132651 132645 132637 132625 ...

  • attr(*, "spec")= .. cols( .. fov = col_double(), .. cellID = col_double(), .. cell = col_character(), .. x_local_px = col_double(), .. y_local_px = col_double(), .. x_global_px = col_double(), .. y_global_px = col_double() .. )`

roanvanscheppingen avatar May 02 '24 14:05 roanvanscheppingen