This skill covers quality control, filtering, and normalization for spatial transcriptomics data, with the decisions forked by platform class. Sequencing/spot data (Visium, Visium HD, Slide-seq, Stereo-seq) and imaging/in-situ data (Xenium, MERSCOPE/MERFISH, CosMx, seqFISH) need different QC floors and, critically, different normalization. The central reframe is that in spatial data library size carries biology rather than pure technical depth, so the scRNA reflex of dividing it out removes real spatially-structured signal and degrades downstream domain detection. The skill gives per-platform QC floors, the negative-control false-discovery metric for imaging specificity, and a normalization decision table that steers skewed targeted panels toward cell-area normalization instead of Pearson residuals.
pip install squidpy scanpy anndata spatialdata
Tell your AI agent what you want to do: - "QC and normalize my Visium data" - "Set QC floors for my Xenium cells without deleting real cells" - "Compute the negative-control false-discovery rate for my MERFISH panel" - "Normalize my imaging data by cell area instead of library size" - "Show QC metrics on the tissue to check for spatial artifacts"
"My Xenium cells have about 100 transcripts each -- what count floor should I use so I do not delete real lymphocytes?"
"Run QC on my Visium section using tissue-appropriate UMI, gene, and mito thresholds and show me where the cut spots fall."
"Compute the negative-control-probe and blank-barcode false-discovery rate for my imaging panel and drop the controls before clustering."
"Should I normalize my spatial data at all, given that library size tracks cellularity? Pick a method for my skewed targeted panel."
"Normalize my Xenium data by segmented cell area rather than total counts and explain why Pearson residuals would not fix the panel-skew bias."
"Map total counts and genes per cell onto the tissue to check for an edge or permeabilization gradient before I threshold."
min_counts=500 floor deletes nearly every imaging cell (their vectors are tens-to-low-hundreds of transcripts) -- use ~10 transcripts/cell, a community convention, not a vendor spec.