Segmentation turns a noisy per-bin read-depth profile into clean copy-number segments, and it has two error-prone stages. First, normalization must remove GC, mappability, and replication-timing bias so the only remaining variation is copy number; GC correction alone leaves the replication-timing "wave artifact" behind. Second, the segmentation algorithm (CBS, HMM, HaarSeg, fused lasso) must partition the profile, and the choice has a predictable, depth- and event-size-dependent bias. This skill covers bias correction, algorithm selection, parameter tuning, and the diploid-baseline trap that can invert every call.
R -e "BiocManager::install('DNAcopy')" # CBS reference implementation
pip install numpy pandas statsmodels # GC loess normalization
R -e "BiocManager::install('QDNAseq')" # optional: GC/mappability normalization
Inputs: a per-bin depth or copy-ratio table (chrom, position, depth or log2), optionally with GC content and mappability per bin; for bias removal beyond GC, a matched normal or a panel of normals.
Tell the AI agent what to do: - "GC-correct this depth profile and segment it with CBS" - "Choose a segmentation algorithm for my 3x shallow WGS sample" - "Diagnose why my segmentation produced hundreds of tiny segments" - "Explain why a wave artifact remains after GC correction and how to remove it" - "Tune CBS alpha and undo.SD to stop oversegmentation"
"Normalize this WGS depth profile for GC bias, then segment with CBS using DNAcopy and a noise-scaled undo threshold to avoid oversegmentation."
"My exome panel still shows a wavy baseline after GC correction. Explain why a panel of normals is needed and what bias GC correction cannot remove."
"I have 3x shallow WGS. Decide between CBS, HMM, and HaarSeg and justify the choice with the depth-dependent precision/recall trade-off."
"My focal amplifications are being blurred by HMM segmentation. Recommend a fix."
"My segmentation shattered into hundreds of micro-segments. Diagnose oversegmentation and tune the parameters."
"Every call in this whole-genome-doubled tumor has the wrong sign. Diagnose the diploid-baseline centering trap."