This skill covers creating visualizations for spatial transcriptomics data using Squidpy and Scanpy, including tissue plots with gene expression and cluster overlays.
pip install squidpy scanpy matplotlib
# Optional for interactive:
pip install napariTell your AI agent what you want to do:
- "Plot gene expression on the tissue"
- "Show clusters on the spatial plot"
"Plot CD3D expression on the tissue"
"Show expression of these marker genes spatially"
"Visualize clusters on the tissue image"
"Color spots by cluster"
"Create a multi-panel figure with clusters and markers"
"Save a high-resolution spatial plot"
- Load spatial data with coordinates
- Create matplotlib figure
- Plot spots colored by requested variable
- Optionally overlay on tissue image
- Save or display figure
- spot_size - Adjust based on spot density
- vmin/vmax - Use percentiles (e.g., 'p99') for outlier-robust scaling
- alpha_img - Control tissue image transparency
- frameon=False - Cleaner look for publication figures