biomate-ai/biomate-bioconductor-kb/despace
Claude Code and agent skill by biomate-ai/biomate-bioconductor-kb
- community
Checking that the SKILL.md file is still in the repository.
Intuitive framework for identifying spatially variable genes (SVGs) via edgeR, a popular method for performing differential expression analyses. Based on pre-annotated spatial clusters as summarized spatial information, DESpace models gene expression using a negative binomial (NB), via edgeR, with spatial clusters as covariates. SVGs are then identified by testing the significance of spatial clusters. The method is flexible and robust, and is faster than the most SV methods. Furthermore, to the
Install
npx vskill@latest install biomate-ai/biomate-bioconductor-kb/despaceSKILL.md
The same SKILL.md was published earlier as biomate-ai/biomate-bioconductor-kb/despace.
DESpace
Workflows
Standard Workflow
Identify spatially variable genes (SVGs) across tissue regions globally or within individual spatial clusters for single or multiple biological replicates.
Inputs are a SpatialExperiment object with annotated spatial clusters; outputs are gene-level and cluster-level spatial variability statistics.
Differential Spatial Patterns
Identify genes with differential spatial expression patterns (DSPs) across multiple experimental conditions or time points.
Inputs are a combined multi-sample SpatialExperiment object; outputs are joint gene-level and cluster-level spatially variable gene statistics across replicates.
When to Use
- Identifying spatially variable genes (SVGs) from spatial transcriptomics data using
svg_test. - Testing spatial variability within individual spatial clusters using
individual_svg. - Jointly modeling multiple biological replicates to find consistent spatial patterns using
replicates = TRUEinsvg_test. - Combining gene-level and cluster-level results to filter for highly or lowly abundant SVGs using
top_results.
When NOT to Use
- For spatial clustering itself, use
BayesSpaceorstLearnbecauseDESpacerequires pre-annotated spatial clusters as input. - For single-cell RNA-seq differential expression without spatial coordinates, use standard
edgeRorDESeq2becauseDESpaceis designed for spatially resolved transcriptomics.
Data Requirements
- Input Format: A
SpatialExperimentorSingleCellExperimentobject. - Structure: Must contain spatial coordinates (e.g.,
array_row,array_col) and pre-annotated spatial clusters (e.g.,layer_guess_reordered) incolData. - Normalization: Raw count matrix in the
countsassay (modeled via negative binomial inedgeR).
Key Parameters
- spe: The input
SpatialExperimentorSingleCellExperimentobject. - cluster_col: Column name in
colData(spe)containing spatial clusters. - sample_col: Column name in
colData(spe)containing sample IDs (for multi-sample). - replicates (
FALSE): Logical indicating whether to fit the multi-sample model. - edgeR_y: Pre-computed
DGEListobject containing dispersion estimates to speed upindividual_svg. - verbose (
TRUE): Logical to print progress and statistics. - high_low (
"both"): Filter intop_resultsto select"high","low", or"both"abundant genes.
Best Practices
- Perform quality control filtering to remove low-quality spots (e.g., low library size, high mitochondrial ratio) and lowly abundant genes (e.g., detected in < 20 spots) before testing.
- Use pre-computed gene-level dispersion estimates (
estimated_y) inindividual_svgto significantly speed up computation. - Ensure cluster labels are consistent across multiple samples when performing multi-sample joint testing.
- Visualize the spatial expression of top SVGs using
FeaturePlotwith cluster outlines.
Common Pitfalls
- Inconsistent cluster labels across samples: Ensure that cluster names refer to the same spatial region across all samples before running multi-sample joint testing.
- Slow computation in individual cluster tests: Pass the
estimated_yfromsvg_testto theedgeR_yparameter inindividual_svgto avoid re-estimating dispersions. - Including low-quality spots: Apply spot-level QC (e.g., using
scuttle::addPerCellQC) and filter out genes with low counts before runningsvg_test.
Alternatives
edgeRfor non-spatial differential expression analysis.BayesSpacefor subspot-resolution spatial clustering.SpatialLIBDfor interactive visualization and exploration of DLPFC spatial data.
Citations
- Robinson, M. D., McCarthy, D. J., & Smyth, G. K. (2010). edgeR: a Bioconductor package for differential expression analysis of digital gene expression data. Bioinformatics, 26(1), 139-140.
- Maynard, K. R. et al. (2021). Transcriptome-scale spatial gene expression in the human dorsolateral prefrontal cortex. Nature Neuroscience, 24(3), 425-436.
References
- Homepage: bioconductor.org/packages/DESpace
- Vignette: https://bioconductor.org/packages/release/bioc/vignettes/DESpace/inst/doc/DESpace.html
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/transcriptomics/despace/SKILL.md
Popularity
- Repository stars
- 805
- Repository forks
- 67
- 7-day trend score
- 33
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/biomate-ai/biomate-bioconductor-kb/despace)