Scrna Preprocessing Clustering logo

Scrna Preprocessing Clustering

Community
BioTender-max
scrna-preprocessing-clustering

Standard scRNA-seq preprocessing and clustering with Scanpy. Use for QC, normalization, HVG selection, PCA, neighbor graph construction, UMAP, Leiden clustering, and export of an analysis-ready AnnData object.

Overview

PublisherBioTender-max
Repositoryawesome-bio-agent-skills
Skill namescrna-preprocessing-clustering
Stars
204
Forks
36
Bundled files
2
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by BioTender-max on GitHub. Read the source before you install it.

Installation

Install the Scrna Preprocessing Clustering AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/BioTender-max/awesome-bio-agent-skills/tree/main/skills/bioclaw/scrna-preprocessing-clustering
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/BioTender-max/awesome-bio-agent-skills.git /tmp/awesome-bio-agent-skills
mkdir -p .claude/skills
cp -r /tmp/awesome-bio-agent-skills/skills/bioclaw/scrna-preprocessing-clustering .claude/skills/scrna-preprocessing-clustering
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Scrna Preprocessing Clustering in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Scrna Preprocessing Clustering on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Scrna Preprocessing Clustering is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

scRNA Preprocessing And Clustering

Version Compatibility

Reference examples assume:

  • scanpy 1.10+
  • anndata 0.10+
  • pandas 2.2+
  • matplotlib 3.8+

Before using code patterns, verify installed versions match the environment:

  • Python: python -c "import scanpy, anndata; print(scanpy.__version__, anndata.__version__)"
  • If signatures differ, inspect the installed API and adapt the pattern instead of retrying unchanged.

Overview

Use this skill to turn raw or minimally processed scRNA-seq data into an analysis-ready object with:

  • QC-filtered cells and genes
  • normalized expression values
  • highly variable genes
  • PCA and UMAP embeddings
  • Leiden clusters
  • saved h5ad artifact for annotation, DE, integration, or trajectory analysis

When To Use This Skill

  • raw 10x matrices, filtered count matrices, or h5ad inputs need standard preprocessing
  • the user wants UMAP, clustering, or marker discovery
  • downstream tasks depend on a stable single-cell object rather than ad hoc plots

Quick Route

  • If the input is already a processed h5ad, inspect adata.raw, embeddings, cluster columns, and QC columns before rerunning preprocessing.
  • If the input is raw counts, do QC first and only normalize after filtering obvious low-quality cells.
  • If multiple batches are present, preprocess cleanly first, then consider integration instead of hiding batch effects with aggressive filtering.

Progressive Disclosure

Default Rules

  • Keep raw counts recoverable. Prefer adata.raw = adata.copy() before regression or scaling.
  • Report thresholds explicitly. Do not silently drop cells or genes.
  • Show QC distributions before applying hard filters.
  • Use vector outputs such as .pdf or .svg for final figures when possible.

Expected Inputs

  • 10x directory, .h5, .h5ad, or count matrix
  • cell metadata if available
  • species context for mitochondrial or ribosomal gene detection

Expected Outputs

  • results/processed.h5ad
  • qc/cell_qc_metrics.tsv
  • qc/gene_qc_metrics.tsv
  • figures/qc_violin.pdf
  • figures/pca_variance_ratio.pdf
  • figures/umap_leiden.pdf

Preferred Tools

  • scanpy
  • anndata
  • pandas
  • matplotlib
  • seaborn

Starter Pattern

python
import scanpy as sc

adata = sc.read_10x_mtx("counts/")
adata.var_names_make_unique()
adata.var["mt"] = adata.var_names.str.upper().str.startswith("MT-")
sc.pp.calculate_qc_metrics(adata, qc_vars=["mt"], inplace=True)

adata = adata[
    (adata.obs["n_genes_by_counts"] >= 200)
    & (adata.obs["n_genes_by_counts"] <= 6000)
    & (adata.obs["pct_counts_mt"] < 15),
    :
].copy()

sc.pp.filter_genes(adata, min_cells=3)
sc.pp.normalize_total(adata, target_sum=1e4)
sc.pp.log1p(adata)
adata.raw = adata.copy()

sc.pp.highly_variable_genes(adata, n_top_genes=3000, flavor="seurat_v3")
adata = adata[:, adata.var["highly_variable"]].copy()
sc.pp.scale(adata, max_value=10)
sc.tl.pca(adata, svd_solver="arpack")
sc.pp.neighbors(adata, n_neighbors=15, n_pcs=30)
sc.tl.umap(adata)
sc.tl.leiden(adata, resolution=0.5, key_added="leiden_r05")
adata.write("results/processed.h5ad")

Workflow

1. Load and validate the object

  • confirm orientation is cells by genes
  • make gene names unique
  • record sample IDs and batch labels before merging or filtering

2. Compute QC metrics and inspect distributions

  • n_genes_by_counts
  • total_counts
  • pct_counts_mt
  • optional ribosomal or hemoglobin fractions

Plot distributions before filtering. Thresholds vary by chemistry, tissue, and nucleus versus whole-cell assay.

3. Filter cells and genes

Use dataset-aware thresholds. Good first-pass defaults:

  • min_genes >= 200
  • max_genes <= 5000-8000 to remove likely doublets in many droplet datasets
  • pct_counts_mt < 10-20 depending on tissue stress
  • min_cells >= 3 for genes

4. Normalize, log-transform, and select HVGs

  • normalize with target_sum=1e4
  • log1p
  • select 2000-4000 HVGs
  • save raw counts before heavy transformations

5. Reduce dimensions and cluster

  • PCA on HVGs
  • neighbor graph using 10-30 PCs and 10-30 neighbors as a starting range
  • UMAP for visualization
  • Leiden across a small resolution grid such as 0.2, 0.5, 0.8, 1.0

6. Export analysis-ready artifacts

Always save:

  • processed h5ad
  • QC tables
  • cluster assignments
  • publication-ready QC and UMAP figures

Output Artifacts

  • results/processed.h5ad: main reusable AnnData object
  • results/cluster_assignments.tsv: barcode plus cluster labels
  • qc/filter_summary.tsv: counts before and after filtering
  • figures/umap_leiden.pdf: main embedding figure

Quality Review

  • Median genes per cell should be plausible for the chemistry and tissue.
  • Mitochondrial fraction should not dominate retained cells.
  • PCA variance should decay smoothly rather than showing obvious technical axes only.
  • UMAP should be reviewed together with QC metrics and batch labels, not alone.
  • Cluster labels should not be finalized before marker inspection.

Anti-Patterns

  • reprocessing an already integrated object as if it were raw counts
  • using a single universal mitochondrial threshold for every tissue
  • interpreting UMAP separation as biology before checking batch and QC covariates
  • discarding raw counts needed later for DE or pseudobulk

Related Skills

  • Cell Annotation
  • Cell Communication
  • Trajectory And Lineage
  • Multiome And scATAC

Optional Supplements

  • anndata
  • scanpy

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Scrna Preprocessing Clustering AI skill do?

Standard scRNA-seq preprocessing and clustering with Scanpy. Use for QC, normalization, HVG selection, PCA, neighbor graph construction, UMAP, Leiden clustering, and export of an analysis-ready AnnData object.

Why use Scrna Preprocessing Clustering on TypingMind?

Because you install it once and use it with any model. Scrna Preprocessing Clustering is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Scrna Preprocessing Clustering in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/BioTender-max/awesome-bio-agent-skills/tree/main/skills/bioclaw/scrna-preprocessing-clustering. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Scrna Preprocessing Clustering?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Scrna Preprocessing Clustering?

As many as you like. As long as a model supports skills, you can use Scrna Preprocessing Clustering with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Scrna Preprocessing Clustering AI skill free?

It is published on GitHub by BioTender-max. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇