How to properly subset by FOV #862
Replies: 2 comments 1 reply
-
So, trying to make some progress on a workaround, and it looks like it is easy enough to drop the extra images: # dropping images
gobj@images = gobj@images[1]
gobj@largeImages = gobj@largeImages[1:3] However, the issue is the features/polygons. Looks like I am then trying to filter A thought just occurred, if I subset the expression matrix, and the features/cell_polygons remain, are the downstream analyses (spatial network, cell-cell interaction, etc) going to include any features outside of my subset expression matrix? |
Beta Was this translation helpful? Give feedback.
-
@rbutleriii I believe that @jiajic has been working on a tutorial on the different options of subsetting spatial data and we hope to put that online in the near future. For the images we currently don't really have a solution and your workaround setting those to NULL is probably a good idea for now. |
Beta Was this translation helpful? Give feedback.
-
I have a CosMx slide that looks at multiple tissue sections per slide (different experimental groups). I want to split the slide by each brain slice, which itself has multiple fovs:

This can be easily accomplished on the cell_ID side with expression metadata:
However the images, LargeImages and the global subcellular features remain. So even though I can plot the single slice without images

(or even with images if just looking at cell polygons)

once I plot the features, all the other fovs are displayed

Is there a way to drop images and/or features points by fov?
Beta Was this translation helpful? Give feedback.
All reactions