split-purification

Purify Xenium and VisiumHD spatial transcriptomics data using SPLIT with RCTD deconvolution results.

Updated May 28, 2026
One-click install
npx skills add https://github.com/cpanse/skills --skill split-purification-cpanse
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: split-purification
Source: https://github.com/cpanse/skills/tree/main/single-cell-spatial-general/skills/split-purification
Command: npx skills add https://github.com/cpanse/skills --skill split-purification-cpanse

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Spatial transcriptomics data from Xenium and VisiumHD platforms suffers from transcript diffusion between neighboring cells, contaminating cell type assignments and degrading downstream analysis quality. This Skill removes that spatial contamination using the SPLIT algorithm on top of RCTD deconvolution results. ## Core Features & Use Cases - Spatial Contamination Removal: Run SPLIT::purify() on matched count matrices and RCTD objects to produce purified gene expression data with improved cell type specificity. - Single and Multi-Sample Workflows: Process individual samples or batch-process cohorts sample-by-sample with memory management via chunk_size and parallel workers. - Quality Control and Comparison: Generate UMAP comparisons, QC metric tables, and per-cell-type purity rate analyses to validate purification improvements. - Use Case: After annotating a Xenium dataset with RCTD, purify the counts to remove contaminated cells, then compare original versus purified UMAPs to confirm sharper cell type boundaries before downstream analysis. ## Quick Start Ask the agent to run SPLIT purification on your spatial Seurat object using the accompanying RCTD results and compare the original and purified UMAP plots.

Frequently Asked Questions about split-purification

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I remove spatial contamination from Xenium data?

Run SPLIT::purify() on your Xenium count matrix together with an RCTD object from spacexr. Match cell barcodes between the two inputs first, then create a purified Seurat object from the resulting purified counts and process it with standard normalization and UMAP steps.

What is the difference between SPLIT and RCTD for spatial transcriptomics?

RCTD performs cell type deconvolution and annotation, while SPLIT purifies the count data by removing transcripts contaminated by neighboring cells. SPLIT requires RCTD results as input, so RCTD must be run first before purification.

Does SPLIT work with the Bioconductor version of spacexr?

No, SPLIT requires the spacexr package installed from GitHub (dmcable/spacexr), not the Bioconductor version. If you encounter RCTD compatibility errors, remove the Bioconductor package and reinstall from GitHub.

Why does SPLIT match so few cells between spatial and RCTD data?

Cell barcode formats often differ between the spatial object and RCTD results, such as added prefixes. Inspect the barcode formats of both, strip prefixes with pattern matching, and build a mapping table before intersecting the cell sets.

How much memory and runtime does SPLIT purification need?

A Xenium dataset of about 20K cells takes roughly 4 minutes and 21 GB of memory, while VisiumHD with about 100K cells takes around 10 minutes and 52 GB. Reduce chunk_size and n_workers or raise future.globals.maxSize if you hit memory errors.

Is high cell loss after SPLIT purification normal?

Yes, retaining 40-70% of cells is typical because SPLIT discards contaminated cells to improve data quality. The trade-off yields improved cell type specificity, clearer UMAP separation, and sharper spatial boundaries for downstream analysis.