Fix Interaction between UpdateSeuratObject and VisiumV1 Objects#277
Closed
YoukaiFromAccounting wants to merge 2 commits intomainfrom
Closed
Fix Interaction between UpdateSeuratObject and VisiumV1 Objects#277YoukaiFromAccounting wants to merge 2 commits intomainfrom
YoukaiFromAccounting wants to merge 2 commits intomainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is a continuation of: satijalab/seurat#10265
Currently, attempting to perform Spatial plotting using VisiumV1 objects on Seurat versions 5.4.0+ and SeuratObject versions 5.3.0+ result in the following errors:
Running UpdateSeuratObject on the V1 object does not resolve this issue. This is because with current UpdateSpatialPlot logic, the coords_x_orientation slot for an object's image will only be updated if that image inherits from the FOV class. While VisiumV2 objects inherit from FOV, VisiumV1 objects do not, merely inheriting from SpatialImage. This means that with existing logic, VisiumV1 objects will never be updated to have the coords_x_orientation slot:
To address this, changes in both Seurat and SeuratObject are required. On the SeuratObject side, UpdateSeuratObject should be mended to update coords_x_orientation for both FOV-type objects (VisiumV2) and VisiumV1 class objects. Additionally, the boundaries slot of the object should only be updated for VisiumV2+.