CNVkit detects copy number variants from targeted (panel, exome) and whole-genome sequencing using read depth. It combines on-target and off-target ("antitarget") reads to recover genome-wide resolution from hybrid-capture data. CNVkit is a depth-only caller: it produces relative log2 copy ratios, not absolute integer copy number, tumor purity, or allele-specific state. Use it as a fast screening caller and escalate to an allele-specific caller (ASCAT/Sequenza/FACETS/PureCN) when absolute CN, loss of heterozygosity, purity, or whole-genome-doubling status is needed.
conda install -c bioconda cnvkit # pulls DNAcopy (CBS) and dependencies
pip install pomegranate # only if HMM segmentation is needed
Inputs: aligned/sorted/indexed BAM files; a target BED (capture regions); the reference FASTA used for alignment; optionally refFlat.txt for gene annotation. For best results, collect 5-20 process-matched normal samples (same capture kit, same lab) for a panel of normals.
Tell the AI agent what to do: - "Call CNVs from my tumor-normal exome pair with CNVkit" - "Build a panel of normals from my 12 control exomes, then call CNVs on the tumors" - "My panel is amplicon-based - run CNVkit in the correct mode" - "Diagnose why my tumor-only CNVkit calls look noisy and recurrent across samples" - "Convert CNVkit log2 segments to purity-corrected integer copy number"
"Run CNVkit on this tumor-normal exome pair, drop low-coverage bins, and call purity-corrected integer copy number given an estimated tumor purity of 0.6."
"Build a pooled CNVkit reference from these 15 matched normals, then process all tumor BAMs against it and report MAD for each."
"This is a 50-gene multiplex-PCR amplicon panel - configure CNVkit appropriately and explain why antitarget bins must be dropped."
"I have no matched or pooled normal for this FFPE tumor. Tell me whether CNVkit can still be used and what the limitations of a flat reference are."
"My CNVkit profile shows the whole genome as gained. Diagnose whether this is a centering artifact and what to do about whole-genome doubling."
"CNVkit and GATK disagree on a focal amplification. Walk through how to reconcile depth-only callers and decide which to trust."
--drop-low-coverage for any tumor, FFPE, or low-input sample; zero-coverage bins are otherwise miscalled as homozygous deletions.--method amplicon for multiplex-PCR panels; antitarget bins are pure noise there.cnvkit.py metrics output: < 0.5 acceptable, < 0.3 good, > 0.5 unreliable.