Detect somatic CNVs from WES/WGS/targeted BAMs (CNVkit v0.9.x). Bin coverage in target/antitarget regions, normalize vs reference, segment with CBS/HMM, call amps/dels, scatter/diagram plots, purity/ploidy, VCF/SEG export. CLI plus Python API (cnvlib). Use GATK CNV for deep WGS with population controls; use CNVkit for targeted/exome where antitarget bins matter.
SkillScore91Maintained
Automatic
◆Research pack
Last verified 9/3/2026
What it changes
Passed 20 of 22 test cases with the skill, and 14 of 22 without it.
Without skill64%
With skill91%
Checks it passed that the model alone missed
includes --split
specifies --purity auto
recommends Control-FREEC
and 3 more in the full report
6 fixed14 passed either way2 still failing0 broke
Pass-rate lift
+27 pp
Tokens
+330%
Agent turns
0%
Response time
-32%
Model gemini-3.6-flashMeasured 9/3/2026v2 · latest is v320 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
This benchmark measured an earlier version of the skill.
See it in action
One of 6 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 6
Prompt
Before calculating coverage, how do we split our capture target BED file (`targets.bed`) into optimal bin sizes and annotate it with gene names from `refFlat.txt` to produce `targets.split.bed`?
What was checked, without and with the skill
Checked
Without skill
With skill
uses cnvkit.py target
Passed
Passed
includes --annotate refFlat.txt
Passed
Passed
includes --split
Missed
Passed
case-08 · gemini-3.6-flash · 9/3/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md633 linessingle file
CNVkit Copy Number Analysis
Overview
CNVkit detects somatic copy number variants (CNVs) from whole-exome sequencing (WES), whole-genome sequencing (WGS), or targeted panel BAM files. It calculates read depth in both on-target (capture) bins and off-target (antitarget) bins, corrects for GC bias and library depth, segments the log2 copy ratio profile with circular binary segmentation (CBS) or a hidden Markov model (HMM), and calls amplifications and deletions. CNVkit provides both a CLI (cnvkit.py) and a Python API (cnvlib) for integration into analysis pipelines, and produces scatter plots, chromosome diagrams, heatmaps, and export files in VCF, BED, and SEG formats.
When to Use
Calling somatic copy number variants from tumor-normal paired exome (WES) or targeted panel sequencing
Detecting copy number alterations in tumor-only samples using a pooled normal reference
Running CNV analysis on whole-genome sequencing (WGS) data with the --method wgs mode
Estimating tumor purity and ploidy for samples where purity is unknown, to interpret copy ratio calls
Generating SEG format copy number files for GISTIC2, cBioPortal, or IGV visualization
Use omics-plotting SKILL for generic coverage/log2-ratio figures from exported tables; genome-wide CNV views use cnvkit.py scatter/diagram
Use GATK CNV (gatk DenoiseReadCounts / gatk ModelSegments) instead for deep WGS cohorts with large matched panel-of-normals (PoN); CNVkit is better suited for targeted/exome data
Use Control-FREEC instead when you need allele-frequency-based B-allele fraction modeling alongside CNV calling
Prerequisites
Software: CNVkit v0.9.x, Python 3.8+, R (for CBS segmentation), samtools
Python packages: cnvlib (installed as part of CNVkit), matplotlib, pandas
Input files: sorted, indexed BAM files (tumor ± matched normal); BED file of capture targets; reference genome FASTA; access to R with DNAcopy package for CBS
Data requirements: minimum ~50× mean target coverage for WES; WGS works at 20-30×
Check before installing: The tool may already be available in the current environment (e.g., inside a pixi / conda env). Run command -v cnvkit.py first and skip the install commands below if it returns a path. When running inside a pixi project, invoke the tool via pixi run cnvkit.py rather than bare cnvkit.py.
# Install CNVkit via conda (recommended — handles R/DNAcopy dependency)
conda install -c bioconda cnvkit
# Or via pip (requires R + DNAcopy already installed)
pip install cnvkit
# Verify
cnvkit.py version
# cnvkit 0.9.10
# Install R DNAcopy (for CBS segmentation)
Rscript -e 'if (!requireNamespace("BiocManager")) install.packages("BiocManager"); BiocManager::install("DNAcopy")'