bio-single-cell-clustering
Dimensionality reduction and clustering for single-cell RNA-seq using Seurat (R) and Scanpy (Python). Use for running PCA, computing neighbors, clustering with Leiden/Louvain algorithms, generating UMAP/tSNE embeddings, and visualizing clusters.
npx skills add majiayu000/claude-skill-registry --skill clustering --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.
# Single-Cell Clustering Dimensionality reduction, neighbor graph construction, and clustering. ## Scanpy (Python) ### Required Imports ```python import scanpy as sc import matplotlib.pyplot as plt ``` ### PCA ```python # Run PCA sc.tl.pca(adata, n_comps=50, svd_solver='arpack') # Visualize variance explained sc.pl.pca_variance_ratio(adata, n_pcs=50) # Visualize PCA sc.pl.pca(adata, color='n_genes_by_counts') ``` ### Determine Number of PCs ```python # Elbow plot to choose number of PCs sc.pl.pca_variance_ratio(adata, n_pcs=50, log=True) # Typically use 10-50 PCs based on elbow n_pcs = 30 ``` ### Compute Neighbors ```python # Build k-nearest neighbor graph sc.pp.neighbors(adata, n_neighbors=15, n_pcs=30) ``` ### Clustering (Leiden - Recommended) ```python # Leiden clustering (preferred over Louvain) sc.tl.leiden(adata, resolution=0.5) # Higher resolution = more clusters sc.tl.leiden(adata, resolution=1.0, key_added='leiden_r1') # View cluster sizes adata.obs['leiden'].value_counts() ``` ### Clustering (Louvain) ```python # Louvain clustering (alternative) sc.tl.louvain(adata, resolution=0.5) ``` ### UMAP ```python # Compute UMAP embedding sc.tl.umap(adata, min_dist=0.3, spread=1.0)
- Scanpy (Python)
- Required Imports
- PCA
- Determine Number of PCs
- Compute Neighbors
- Clustering (Leiden - Recommended)
- Clustering (Louvain)
- UMAP
- tSNE
- Complete Clustering Pipeline
- Exploring Different Resolutions
- PAGA (Trajectory Inference)
- Seurat (R)
- Required Libraries
What does the bio-single-cell-clustering skill do?
Dimensionality reduction and clustering for single-cell RNA-seq using Seurat (R) and Scanpy (Python). Use for running PCA, computing neighbors, clustering with Leiden/Louvain algorithms, generating UMAP/tSNE embeddings, and visualizing clusters.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill clustering --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.
