Estimate cell type composition in spatial transcriptomics spots using reference-based deconvolution. Use cell2location, RCTD, SPOTlight, or Tangram to infer cell type proportions from scRNA-seq references.
SkillScore59Maintained
Automatic
◆Research pack
Last verified 8/2/2026
What it changes
Passed 13 of 22 test cases with the skill, and 8 of 22 without it.
Without skill36%
With skill59%
Checks it passed that the model alone missed
Visualization uses the Reds color map.
Slices are rendered using matplotlib.patches.Wedge.
The code passes cell_count_cutoff=5 to filter_genes.
and 4 more in the full report
6 fixed7 passed either way8 still failing1 broke
Pass-rate lift
+23 pp
Tokens
+72%
Agent turns
0%
Response time
-30%
Model gemini-3.6-flashMeasured 8/2/2026v113 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 6 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 6
Prompt
Before setting up reference and spatial models in cell2location, what initial preprocessing step is necessary regarding gene features in `adata_vis` and `adata_ref`?
What was checked, without and with the skill
Checked
Without skill
With skill
Shared gene features are identified using np.intersect1d.
Missed
Passed
Slicing on both AnnData objects is performed to ensure identical gene order and dimension.
Passed
Passed
case-13 · gemini-3.6-flash · 8/2/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md287 linessingle file
Spatial Deconvolution
Estimate cell type composition in spatial spots using scRNA-seq references.
Required Imports
import scanpy as sc
import anndata as ad
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
Overview
Deconvolution estimates cell type proportions in each spatial spot using a reference single-cell dataset. Essential for Visium data where spots contain multiple cells.
Using cell2location
import cell2location
from cell2location.utils.filtering import filter_genes
from cell2location.models import RegressionModel
# Load reference scRNA-seq
adata_ref = sc.read_h5ad('reference_scrna.h5ad')