Agent skill

Bio Spatial Transcriptomics Spatial Statistics

by majiayu000 in majiayu000/claude-skill-registry

Compute spatial statistics for spatial transcriptomics data using Squidpy.

MITAuto-check passedData & Analytics

Install Bio Spatial Transcriptomics Spatial Statistics

skills CLI
$ npx skills add majiayu000/claude-skill-registry --skill bio-spatial-transcriptomics-spatial-statistics -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install majiayu000/claude-skill-registry bio-spatial-transcriptomics-spatial-statistics --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/majiayu000/claude-skill-registry.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/ai-ml/spatial-statistics-gptomics-bioskills-2 .claude/skills/bio-spatial-transcriptomics-spatial-statistics && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
bio-spatial-transcriptomics-spatial-statistics
GitHub stars
666
Used in
2 other repos
Token cost
~1.4k tokens
SKILL.md length
63 words
Files
2
Skills in repo
1,273
Repo updated
First seen
Licence
MIT

At a glance

Compute spatial statistics for spatial transcriptomics data using Squidpy.

  • Computing spatial autocorrelation
  • SKILL.md covers Required Imports, Compute Spatial…, Interpret Moran's I and Compute Geary's C, plus 11 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Co-occurrence statistics

What it does

Bio Spatial Transcriptomics Spatial Statistics is an agent skill from majiayu000/claude-skill-registry. Compute spatial statistics for spatial transcriptomics data using Squidpy. Calculate Moran's I, Geary's C, spatial autocorrelation, co-occurrence analysis, and neighborhood enrichment. Use when computing spatial autocorrelation or co-occurrence statistics.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `metadata.json`).

It sits in Data & Analytics, covering Statistics and Bioinformatics. The repository describes itself as: Searchable Claude Code skills catalog with source-linked guides and generated registry artifacts. The licence is MIT.

When your agent uses it

  • Computing spatial autocorrelation
  • Co-occurrence statistics

Example prompts

  • “s I, Geary”
  • “/bio-spatial-transcriptomics-spatial-statistics”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 2d14a69. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Bio Spatial Transcriptomics Spatial Statistics loads about 1.4k tokens when it runs. Until then it costs about 76 tokens; SKILL.md has 63 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~76
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from majiayu000/claude-skill-registry at commit 2d14a69, republished under its MIT licence (© majiayu000). 63 words, ~1,370 tokens.

Download SKILL.mdSave it as .claude/skills/bio-spatial-transcriptomics-spatial-statistics/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
bio-spatial-transcriptomics-spatial-statistics
description
Compute spatial statistics for spatial transcriptomics data using Squidpy. Calculate Moran's I, Geary's C, spatial autocorrelation, co-occurrence analysis, and neighborhood enrichment. Use when computing spatial autocorrelation or co-occurrence statistics.
tool_type
python
primary_tool
squidpy

Spatial Statistics

Compute spatial statistics and identify spatially variable features.

Required Imports

python
import squidpy as sq
import scanpy as sc
import pandas as pd
import numpy as np

Compute Spatial Autocorrelation (Moran's I)

python
# Requires spatial neighbors
sq.gr.spatial_neighbors(adata, coord_type='generic', n_neighs=6)

# Compute Moran's I for all genes (can be slow)
sq.gr.spatial_autocorr(adata, mode='moran')

# Or for specific genes
sq.gr.spatial_autocorr(adata, mode='moran', genes=['GENE1', 'GENE2', 'GENE3'])

# Results stored in adata.uns['moranI']
moran_results = adata.uns['moranI']
print(moran_results.head(20))

Interpret Moran's I

python
# Moran's I ranges from -1 to 1
# I > 0: positive spatial autocorrelation (similar values cluster)
# I = 0: random spatial distribution
# I < 0: negative spatial autocorrelation (dissimilar values cluster)

# Get significantly spatially variable genes
svg = moran_results[moran_results['pval_norm'] < 0.05].sort_values('I', ascending=False)
print(f'Found {len(svg)} spatially variable genes (p < 0.05)')
print('\nTop 10 spatially variable genes:')
print(svg.head(10)[['I', 'pval_norm']])

Compute Geary's C

python
# Alternative spatial autocorrelation measure
sq.gr.spatial_autocorr(adata, mode='geary')

# Results in adata.uns['gearyC']
geary_results = adata.uns['gearyC']
# C < 1: positive spatial autocorrelation
# C = 1: random
# C > 1: negative spatial autocorrelation

Co-occurrence Analysis

python
# Analyze co-localization of cell types/clusters
# First, ensure you have cluster labels
sc.pp.neighbors(adata)
sc.tl.leiden(adata)

# Compute co-occurrence
sq.gr.co_occurrence(adata, cluster_key='leiden')

# Results in adata.uns['leiden_co_occurrence']
# Visualize co-occurrence
sq.pl.co_occurrence(adata, cluster_key='leiden')

Interpret Co-occurrence

python
co_occ = adata.uns['leiden_co_occurrence']
occ_matrix = co_occ['occ']  # Occurrence matrix
interval = co_occ['interval']  # Distance intervals

# occ_matrix[i, j, k] = occurrence of cluster j around cluster i at distance interval k
print(f'Occurrence matrix shape: {occ_matrix.shape}')
print(f'Distance intervals: {interval}')

Neighborhood Enrichment

python
# Test if clusters are enriched in each other's neighborhoods
sq.gr.nhood_enrichment(adata, cluster_key='leiden')

# Results in adata.uns['leiden_nhood_enrichment']
# zscore > 0: clusters co-localize more than expected
# zscore < 0: clusters avoid each other

# Visualize
sq.pl.nhood_enrichment(adata, cluster_key='leiden')

Extract Enrichment Z-scores

python
enrichment = adata.uns['leiden_nhood_enrichment']
zscore = enrichment['zscore']
clusters = adata.obs['leiden'].cat.categories

# Convert to DataFrame
zscore_df = pd.DataFrame(zscore, index=clusters, columns=clusters)
print('Neighborhood enrichment z-scores:')
print(zscore_df)

Ripley's Statistics

python
# Ripley's K/L function for point pattern analysis (single-cell resolution data)
sq.gr.ripley(adata, cluster_key='leiden', mode='L')

# Results in adata.uns['leiden_ripley']
sq.pl.ripley(adata, cluster_key='leiden')

Centrality Scores

python
# Compute centrality of each cell type
sq.gr.centrality_scores(adata, cluster_key='leiden')

# Results in adata.uns['leiden_centrality_scores']
centrality = adata.uns['leiden_centrality_scores']
print(centrality)

Interaction Matrix

python
# Build interaction matrix between clusters
sq.gr.interaction_matrix(adata, cluster_key='leiden')

# Results in adata.uns['leiden_interactions']
interactions = adata.uns['leiden_interactions']
print(interactions)

Custom Spatial Statistic

python
from scipy.stats import pearsonr

def spatial_correlation(adata, gene1, gene2):
    '''Compute spatial correlation between two genes'''
    expr1 = adata[:, gene1].X.toarray().flatten()
    expr2 = adata[:, gene2].X.toarray().flatten()
    r, p = pearsonr(expr1, expr2)
    return r, p

r, p = spatial_correlation(adata, 'GENE1', 'GENE2')
print(f'Spatial correlation: r={r:.3f}, p={p:.2e}')

Local Moran's I (LISA)

python
from esda.moran import Moran_Local
from libpysal.weights import KNN

# Build weights matrix
coords = adata.obsm['spatial']
w = KNN.from_array(coords, k=6)
w.transform = 'r'

# Compute local Moran's I for a gene
gene_expr = adata[:, 'GENE1'].X.toarray().flatten()
lisa = Moran_Local(gene_expr, w)

# Add to adata
adata.obs['GENE1_lisa'] = lisa.Is
adata.obs['GENE1_lisa_q'] = lisa.q  # Quadrant (HH, HL, LH, LL)

Batch Spatial Statistics

python
# Compute Moran's I for top variable genes only
hvg = adata.var_names[adata.var['highly_variable']][:500]
sq.gr.spatial_autocorr(adata, mode='moran', genes=hvg)

results = adata.uns['moranI']
significant = results[results['pval_norm'] < 0.01]
print(f'{len(significant)} genes with significant spatial autocorrelation')
  • spatial-neighbors - Build spatial graphs (prerequisite)
  • spatial-domains - Identify spatial domains
  • spatial-visualization - Visualize spatial statistics

© majiayu000, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/ai-ml/spatial-statistics-gptomics-bioskills-2 of majiayu000/claude-skill-registry.

  • SKILL.md
  • metadata.json

Open the folder on GitHubat commit 2d14a69

Used in 2 other repositories

We found 3 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in majiayu000/claude-skill-registry, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Bio Spatial Transcriptomics Spatial Statistics next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Bio Spatial Transcriptomics Spatial Statistics compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Bio Spatial Transcriptomics Spatial Statistics this skillmajiayu000/claude-skill-registry6662 repos~1.4kAutomated safety check: PassMIT
Gwas Databasedavila7/claude-code-templates32k10 repos~5kAutomated safety check: PassMIT
Bio Metagenomics VisualizationGPTomics/bioSkills1.2k1 repos~3.7kAutomated safety check: PassMIT
Bio Population Genetics Scikit Allel AnalysisGPTomics/bioSkills1.2k1 repos~5kAutomated safety check: PassMIT
Bio Sequence StatisticsGPTomics/bioSkills1.2k1 repos~3.2kAutomated safety check: PassMIT
Bio Spatial Transcriptomics Spatial StatisticsGPTomics/bioSkills1.2k1 repos~4.7kAutomated safety check: PassMIT

Similar skills

  • Gwas Database

    davila7/claude-code-templates

    Query NHGRI-EBI GWAS Catalog for SNP-trait associations. An agent skill from davila7/claude-code-templates.

    32k GitHub starsUsed in 10 repos~5k tokens
    Data & AnalyticsAuto-check passed
  • Turns a shotgun profiler table (MetaPhlAn relative abundance, Bracken counts, HUMAnN function tables) into honest figures and defensible community statistics with phyloseq, vegan, microViz, and…

    1.2k GitHub starsUsed in 1 repo~3.7k tokens
    Data & AnalyticsAuto-check passed
  • In-memory Python population genetics with scikit-allel - GenotypeArray/HaplotypeArray/AlleleCountsArray, diversity (pi, theta, Tajima's D), SFS, FST (Weir-Cockerham, Hudson, Patterson), f3/D…

    1.2k GitHub starsUsed in 1 repo~5k tokens
    Data & AnalyticsAuto-check passed
  • Bio Sequence Statistics

    GPTomics/bioSkills

    Calculate assembly and sequence statistics (N50/L50, auN, NG50/NGA50, length distribution, GC content with ambiguity handling, summary reports) using Biopython.

    1.2k GitHub starsUsed in 1 repo~3.2k tokens
    Data & AnalyticsAuto-check passed
  • Detects spatially variable genes, spatial autocorrelation, and cell-type colocalization for spatial transcriptomics using Squidpy with PySAL/esda for local statistics.

    1.2k GitHub starsUsed in 1 repo~4.7k tokens
    Data & AnalyticsAuto-check passed
  • Bio Vcf Statistics

    GPTomics/bioSkills

    Compute and interpret VCF quality-control metrics (Ti/Tv, het/hom, novel/known, missingness, HWE, contamination, relatedness) with bcftools stats, vcftools, plot-vcfstats, and identity tools…

    1.2k GitHub starsUsed in 1 repo~4.9k tokens
    Data & AnalyticsAuto-check passed

More from majiayu000/claude-skill-registry

All 1,273 skills in this repo
  • Deep Research

    majiayu000/claude-skill-registry

    Multi-source deep research using firecrawl and exa MCPs. An agent skill from majiayu000/claude-skill-registry.

    666 GitHub starsUsed in 6 repos~1.1k tokens
    Auto-check passed
  • Exa Search

    majiayu000/claude-skill-registry

    Neural search via Exa MCP for web, code, and company research.

    666 GitHub starsUsed in 5 repos~856 tokens
    Auto-check passed
  • Fal AI Media

    majiayu000/claude-skill-registry

    Unified media generation via fal.ai MCP — image, video, and audio.

    666 GitHub starsUsed in 5 repos~1.7k tokens
    Auto-check passed
  • Pyzotero

    majiayu000/claude-skill-registry

    Interact with Zotero reference management libraries using the pyzotero Python client.

    666 GitHub starsUsed in 5 repos~1.6k tokens
    Auto-check: notes
  • Bgpt Paper Search

    majiayu000/claude-skill-registry

    Search scientific papers and retrieve structured experimental data extracted from full-text studies via the BGPT MCP server.

    666 GitHub starsUsed in 4 repos~619 tokens
    Auto-check: notes
  • Bio Alignment Pairwise

    majiayu000/claude-skill-registry

    Perform pairwise sequence alignment using Biopython Bio.Align.PairwiseAligner.

    666 GitHub starsUsed in 4 repos~1.7k tokens
    Auto-check passed

Questions about Bio Spatial Transcriptomics Spatial Statistics

What does Bio Spatial Transcriptomics Spatial Statistics do?

Compute spatial statistics for spatial transcriptomics data using Squidpy. Bio Spatial Transcriptomics Spatial Statistics is an agent skill from majiayu000/claude-skill-registry. Compute spatial statistics for spatial transcriptomics data using Squidpy.

When should I use Bio Spatial Transcriptomics Spatial Statistics?

Bio Spatial Transcriptomics Spatial Statistics fits situations like: computing spatial autocorrelation; co-occurrence statistics.

How do I install Bio Spatial Transcriptomics Spatial Statistics in Claude Code?

Run `npx skills add majiayu000/claude-skill-registry --skill bio-spatial-transcriptomics-spatial-statistics -a claude-code`. Or copy the skill folder (skills/ai-ml/spatial-statistics-gptomics-bioskills-2 in majiayu000/claude-skill-registry) into .claude/skills/bio-spatial-transcriptomics-spatial-statistics in your project. Claude Code loads it when a task matches its description.

How do I install Bio Spatial Transcriptomics Spatial Statistics in Codex?

Run `npx skills add majiayu000/claude-skill-registry --skill bio-spatial-transcriptomics-spatial-statistics -a codex`. Or copy the skill folder (skills/ai-ml/spatial-statistics-gptomics-bioskills-2 in majiayu000/claude-skill-registry) into .agents/skills/bio-spatial-transcriptomics-spatial-statistics in your project. Codex loads it when a task matches its description.

Can I use Bio Spatial Transcriptomics Spatial Statistics in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add majiayu000/claude-skill-registry --skill bio-spatial-transcriptomics-spatial-statistics -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/bio-spatial-transcriptomics-spatial-statistics, .gemini/skills/bio-spatial-transcriptomics-spatial-statistics, .github/skills/bio-spatial-transcriptomics-spatial-statistics and .opencode/skills/bio-spatial-transcriptomics-spatial-statistics in your project.

What does Bio Spatial Transcriptomics Spatial Statistics need to run?

SKILL.md names no scripts, command-line tools or credentials: Bio Spatial Transcriptomics Spatial Statistics is instructions for the agent only. Our summary lists: Python 3.

Does Bio Spatial Transcriptomics Spatial Statistics access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Bio Spatial Transcriptomics Spatial Statistics safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Bio Spatial Transcriptomics Spatial Statistics use?

Bio Spatial Transcriptomics Spatial Statistics is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Bio Spatial Transcriptomics Spatial Statistics use?

About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Bio Spatial Transcriptomics Spatial Statistics?

Skills that share tags, products or a category with Bio Spatial Transcriptomics Spatial Statistics: Gwas Database (davila7/claude-code-templates, 32k stars), Bio Metagenomics Visualization (GPTomics/bioSkills, 1.2k stars), Bio Population Genetics Scikit Allel Analysis (GPTomics/bioSkills, 1.2k stars) and Bio Sequence Statistics (GPTomics/bioSkills, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Bio Spatial Transcriptomics Spatial Statistics?

majiayu000 (a GitHub user) maintains it in majiayu000/claude-skill-registry, which has 666 GitHub stars. The repository holds 1,273 skills in this directory. The repository was last updated on October 7, 2026.

Source: majiayu000/claude-skill-registry on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.