Agent skill · Data & Analytics

bio-spatial-transcriptomics-spatial-neighbors

Build spatial neighbor graphs for spatial transcriptomics data using Squidpy. Compute k-nearest neighbors, Delaunay triangulation, and radius-based connectivity for downstream spatial analyses. Use when building spatial neighborhood graphs.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill spatial-neighbors-gptomics-bioskills-2 --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 5 KB
Bundled scripts: none
Path: skills/ai-ml/spatial-neighbors-gptomics-bioskills-2/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Spatial Neighbor Graphs Build spatial neighbor graphs for connectivity-based analyses. ## Required Imports ```python import squidpy as sq import scanpy as sc import numpy as np ``` ## Build K-Nearest Neighbors Graph ```python # Build spatial KNN graph sq.gr.spatial_neighbors(adata, n_neighs=6, coord_type='generic') # Check the graph print(f"Connectivities shape: {adata.obsp['spatial_connectivities'].shape}") print(f"Distances shape: {adata.obsp['spatial_distances'].shape}") ``` ## Build Delaunay Triangulation Graph ```python # Delaunay triangulation (natural neighbors) sq.gr.spatial_neighbors(adata, delaunay=True, coord_type='generic') ``` ## Radius-Based Neighbors ```python # Connect all spots within a radius sq.gr.spatial_neighbors(adata, radius=100, coord_type='generic') ``` ## For Visium Data (Grid Structure) ```python # For Visium hexagonal grid, use n_rings sq.gr.spatial_neighbors(adata, n_rings=1, coord_type='grid') # 6 immediate neighbors sq.gr.spatial_neighbors(adata, n_rings=2, coord_type='grid') # Extended neighborhood ``` ## Access Neighbor Information ```python # Get connectivities as sparse matrix conn = adata.obsp['spatial_connectivities'] print(f'Edges in graph: {

What's inside
Steps it walks through
  1. Required Imports
  2. Build K-Nearest Neighbors Graph
  3. Build Delaunay Triangulation Graph
  4. Radius-Based Neighbors
  5. For Visium Data (Grid Structure)
  6. Access Neighbor Information
  7. Get Neighbors for a Specific Spot
  8. Build Expression-Based Neighbors
  9. Combine Spatial and Expression Neighbors
  10. Visualize Neighbor Graph
  11. Compute Graph Statistics
  12. Store Multiple Neighbor Graphs
  13. Related Skills
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the bio-spatial-transcriptomics-spatial-neighbors skill do?

Build spatial neighbor graphs for spatial transcriptomics data using Squidpy. Compute k-nearest neighbors, Delaunay triangulation, and radius-based connectivity for downstream spatial analyses. Use when building spatial neighborhood graphs.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill spatial-neighbors-gptomics-bioskills-2 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going