bio-spatial-transcriptomics-spatial-preprocessing
Quality control, filtering, normalization, and feature selection for spatial transcriptomics data. Calculate QC metrics, filter spots/cells, normalize counts, and identify highly variable genes. Use when filtering and normalizing spatial transcriptomics data.
npx skills add majiayu000/claude-skill-registry --skill spatial-preprocessing-gptomics-bioskills-2 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Spatial Preprocessing QC, filtering, normalization, and feature selection for spatial data. ## Required Imports ```python import squidpy as sq import scanpy as sc import numpy as np import matplotlib.pyplot as plt ``` ## Calculate QC Metrics ```python # Calculate standard QC metrics sc.pp.calculate_qc_metrics(adata, inplace=True) # View QC columns print(adata.obs[['total_counts', 'n_genes_by_counts']].describe()) print(adata.var[['total_counts', 'n_cells_by_counts']].describe()) ``` ## Calculate Mitochondrial Content ```python # Mark mitochondrial genes adata.var['mt'] = adata.var_names.str.startswith('MT-') # Calculate percent mitochondrial sc.pp.calculate_qc_metrics(adata, qc_vars=['mt'], inplace=True) print(f"Mean MT%: {adata.obs['pct_counts_mt'].mean():.1f}") ``` ## Visualize QC Metrics on Tissue ```python # Plot QC metrics spatially sq.pl.spatial_scatter(adata, color=['total_counts', 'n_genes_by_counts', 'pct_counts_mt'], ncols=3) # Or with Scanpy sc.pl.spatial(adata, color=['total_counts', 'n_genes_by_counts'], spot_size=1.5) ``` ## QC Metric Distributions ```python fig, axes = plt.subplots(1, 3, figsize=(12, 4)) axes[0].hist(adata.obs['total_counts'], bins=50) axes[0].set_
- Required Imports
- Calculate QC Metrics
- Calculate Mitochondrial Content
- Visualize QC Metrics on Tissue
- QC Metric Distributions
- Filter Spots
- Filter Genes
- Normalization
- SCTransform-like Normalization
- Highly Variable Genes
- Spatially Variable Genes
- Combine HVG and SVG
- Scale Data
- PCA
What does the bio-spatial-transcriptomics-spatial-preprocessing skill do?
Quality control, filtering, normalization, and feature selection for spatial transcriptomics data. Calculate QC metrics, filter spots/cells, normalize counts, and identify highly variable genes. Use when filtering and normalizing spatial transcriptomics data.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill spatial-preprocessing-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.
