Usage Guide#
This guide provides examples of how to use TrackCell for reading and analyzing spatial transcriptomics data.
Topics include loading 10x Visium HD / Xenium / Atera data, STOmics (Stereo-seq) GEF data,
polygon visualization, distance metrics, DBSCAN TMA slice separation,
YardCluster spatial clustering (tcl.tl.spatial_cluster),
batch integration (SCT + RPCA / Harmony / BBKNN), and
CellCharter-style post-analysis (automatic resolution selection,
multi-hop aggregation, GMM clustering, connected components, neighborhood
enrichment and differential enrichment between conditions).
Usage Topics:
- Reading SpaceRanger Output
- Atera
- Logging
- Converting annohdcell Output to TrackCell Format
- Xenium TMA Slice Separation (DBSCAN)
- Visualization
- Basic Plotting with Cell Polygons
- Custom Color Palettes
- Axes Frame (
frameon) - Dual-Color Visualization (Fill + Edge)
- Multi-Gene Visualization (cell2location-style)
- Square-bin visualization
- Marking Regions
- Physical Scale Bars
- Circular ROI (point + physical radius)
- Interactive ROI Selection (Jupyter / matplotlib)
- Performance Optimization for Large Datasets
- Computing Distances to a Label
- Distance to Colony Centroids (GC / Tumor Nests)
- Multi-Gene Color Blending
- Spatial Clustering (YardCluster)
- YardCluster scenario guide
- Batch integration (SCT + RPCA / Harmony / BBKNN)