Skip to content

Make CellTrek compatible with Seurat v5 (5.3.0) - #48

Open
WandeRum wants to merge 2 commits into
mainfrom
seurat-v5-compat
Open

Make CellTrek compatible with Seurat v5 (5.3.0)#48
WandeRum wants to merge 2 commits into
mainfrom
seurat-v5-compat

Conversation

@WandeRum

Copy link
Copy Markdown
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

Rum Wei and others added 2 commits August 22, 2026 23:38
- 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant