-
Notifications
You must be signed in to change notification settings - Fork 908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to subset Xenium/ spatial object by cells and keep only molecules within these cells? #9085
Comments
This is actually for |
first of all, please provide your run code.
hope this helps |
I tried both
All the plots look the same, it seems the molecules slot was unchanged. |
ok, my function is only a temporary solution and I haven't experimented much with |
I was only trying to visualize the
I do manage to subset the molecules this way but they still fall outside of cells used for subsetting, making the visualization not really intuitive. |
In my image, the cells are subsetting appropriately and when I look inside the assay I believe they are subsetting appropriately as well. I think the only problem is in the FOV molecules slot where that does not work well at all. The problem being that crop is based on coordinates rather than cells which does not help. I have looked through your code base and it is very helpful but I am not seeing how it would apply to this problem? |
the code can be optimized if one knows which molecules belong to which cells and uses that info to subset mols as well. |
When I subset a Xenium object, the molecules of the parent object are not touched. I'm not sure if this is the expected behavior but I was wandering if the was a way to keep only the molecules within the cells of the smaller object.
Thanks!
The text was updated successfully, but these errors were encountered: