What problem does it solve? Spatial transcriptomics platforms like Xenium and MERFISH produce per-cell transcript counts too sparse for direct CNV inference, making tumor subclone detection noisy and unreliable without a specialized smoothing and analysis pipeline. ## Core Features & Use Cases - Neighbor-Based Smoothing: Applies the Jensen et al. 2025 InSituCNV k-NN smoothing method before CNV inference, dramatically improving signal quality on sparse spatial data. - R-to-Python-to-R Pipeline: Converts Seurat objects to AnnData, runs infercnvpy with reference-cell baselining, and merges CNV scores and subclone labels back into Seurat. - Subclone & Chromosome-Arm Analysis: Performs melanoma-only re-clustering for intra-tumor heterogeneity and extracts chromosome-arm scores (e.g., chr3 monosomy, chr8q gain in uveal melanoma) with spatial visualization guidance. - Use Case: Given a Xenium uveal melanoma sample with RCTD cell type annotations, run the full pipeline to identify malignant subclones carrying chr3 loss and chr8q gain, then produce spatial CNV maps and an HTML report. ## Quick Start Ask the agent to run InSituCNV CNV inference on your Xenium Seurat object using macrophages as the diploid reference and merge the subclone results back into Seurat.