Make CellTrek compatible with Seurat v5 (5.3.0) - #48
Open
WandeRum wants to merge 2 commits into
Open
Conversation
WandeRum
commented
Aug 23, 2026
Collaborator
- Replace direct assay-slot access (@data/@counts/@scale.data) with version-agnostic GetAssayData()/SetAssayData() across celltrek.R, scoexp.R, FindCorMarkers.R
- Make DimReduc keys v5-compliant (celltrek_/pca_/umap_/tsne_)
- Read ST coordinates via GetTissueCoordinates() (VisiumV1 + VisiumV2/FOV); guard image@coordinates writes to VisiumV1
- Add traint(coord_df=) to supply spatial coordinates directly and bypass image-structure/naming differences (errors clearly if unresolved)
- Switch interpolation dependency akima -> interp (DESCRIPTION/NAMESPACE)
- Update README tutorial code for v5 (HVFInfo, GetAssayData)
- Add local functional tests and result figures; bump version to 0.0.95
- Replace direct assay-slot access (@data/@counts/@scale.data) with version-agnostic GetAssayData()/SetAssayData() across celltrek.R, scoexp.R, FindCorMarkers.R - Make DimReduc keys v5-compliant (celltrek_/pca_/umap_/tsne_) - Read ST coordinates via GetTissueCoordinates() (VisiumV1 + VisiumV2/FOV); guard image@coordinates writes to VisiumV1 - Add traint(coord_df=) to supply spatial coordinates directly and bypass image-structure/naming differences (errors clearly if unresolved) - Switch interpolation dependency akima -> interp (DESCRIPTION/NAMESPACE) - Update README tutorial code for v5 (HVFInfo, GetAssayData) - Add local functional tests and result figures; bump version to 0.0.95 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
GetTissueCoordinates() rescales VisiumV1 coordinates by the image scale factor (~5.8x smaller), which shrank spot distances and made the fixed repel_r over-disperse the charting into a uniform blob. traint() now prefers the image @coordinates[,coord_xy] slot (VisiumV1, original scale) and only falls back to GetTissueCoordinates() for classes lacking it (VisiumV2/FOV). Verified on both VisiumV1 (brain) and VisiumV2 (stxBrain). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.