bio-copy-number-copy-ratio-segmentation
Normalize read-depth copy-ratio profiles and segment them into copy-number regions using circular binary segmentation (CBS, DNAcopy), hidden Markov models, HaarSeg, and fused-lasso methods. Covers GC-content, mappability, and replication-timing (wave-artifact) bias correction, panel-of-normals/PCA denoising, diploid-baseline centering, and algorithm selection by sequencing depth and event size. Use when choosing a segmentation algorithm, correcting depth bias, diagnosing oversegmentation or a mis-centered baseline, tuning CBS or HMM parameters, or understanding why a downstream CNV caller prod
npx skills add BioTender-max/awesome-bio-agent-skills --skill copy-ratio-segmentation --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
## Version Compatibility Reference examples tested with: R 4.3+ with DNAcopy 1.76+, Python 3.10+ with numpy 1.26+, pandas 2.2+; QDNAseq 1.38+ (optional, GC/mappability normalization). Before using code patterns, verify installed versions match. If versions differ: - R: `packageVersion('DNAcopy')` then `?segment` to confirm arguments - Python: `pip show numpy pandas` If code throws an error, introspect the installed package and adapt the example. CBS lives in Bioconductor `DNAcopy`; HMM segmentation is provided by caller-specific backends (CNVkit uses `pomegranate`; HaarSeg has its own R/Python packages). # Copy-Ratio Segmentation **"Turn noisy per-bin depth into clean copy-number segments"** -> Two stages, both error-prone. First, normalize the depth profile so the only remaining variation is copy number (not GC, mappability, or replication timing). Second, partition the normalized profile into segments of constant copy number. The segmentation algorithm choice has a *predictable* bias signature, and the diploid-baseline choice can invert every call. - R: `DNAcopy::segment` (CBS, the reference implementation) - Python: HMM via `pomegranate`; HaarSeg via `haarseg` - The output feeds
- Version Compatibility
- Stage 1: Why Depth Is Biased Before It Is Copy Number
- Stage 2: Segmentation Algorithm Taxonomy
- Decision Tree
- Bias Correction — GC Loess Normalization
- Segmentation — CBS with DNAcopy
- Failure Modes
- Oversegmentation / hyperfragmentation
- The diploid-baseline centering trap
- CBS recall degrades at low depth
- CBS fragments across assembly gaps
- HMM EM converges to a local optimum
- Reconciliation: When Segmentations Disagree
- Quantitative Thresholds
What does the bio-copy-number-copy-ratio-segmentation skill do?
Normalize read-depth copy-ratio profiles and segment them into copy-number regions using circular binary segmentation (CBS, DNAcopy), hidden Markov models, HaarSeg, and fused-lasso methods. Covers GC-content, mappability, and replication-timing (wave-artifact) bias correction, panel-of-normals/PCA denoising, diploid-baseline centering, and algorithm selection by sequencing depth and event size. Use when choosing a segmentation algorithm, correcting depth bias, diagnosing oversegmentation or a mis-centered baseline, tuning CBS or HMM parameters, or understanding why a downstream CNV caller prod
How do I install it?
Run `npx skills add BioTender-max/awesome-bio-agent-skills --skill copy-ratio-segmentation --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From BioTender-max/awesome-bio-agent-skills, a repository with 135 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
