scripts/cnvscope_viz.py builds an interactive HTML report from a Sentieon CNVscope run: a genome overview, then a zoomable view of each chromosome with the normalized read depth, the copy-number calls drawn on top and the mapping quality, plus optional diagnostic tracks. It reads CNVscope mode 0 and mode 1 output, CNVModelApply output, and the combined SV + CNV VCFs of sentieon-cli. A report is a folder of static files, or one .html file, that opens from disk in Chrome.
- Python 3.8 or later, with numpy, plotly 5, jinja2 and vcflib from PyPI (see Install)
- sentieon-cli v2.0.0 or later, or Sentieon 202503.04 or later, whose CNVscope writes the probe dump (
--dump_probes) - Chrome to view reports; Safari works, but zooming is slower
git clone https://github.com/Sentieon/cnv-visualization.git
cd cnv-visualization
python3 -m venv .venv
. .venv/bin/activate
python3 -m pip install -r requirements.txtWe use a virtual environment because requirements.txt pins plotly 5, which would replace a plotly 6 installed in your main Python.
-
Get the VCF and the probe dump of one CNVscope run.
-
sentieon-cli v2.0.0 or later writes both next to its output VCF,
OUT.vcf.gz:OUT_cnv.vcf.gzandOUT_cnv.probesfromdnascope-pangenome --call_svs, orOUT.cnv.vcf.gzandOUT.cnv.probesfromdnascope-hybrid. -
With the sentieon driver, run CNVscope with
--dump_probes, then CNVModelApply:sentieon driver -t 16 -r REF.fa -i SAMPLE.bam --algo CNVscope --model CNV_MODEL \ --sex M --par par_hg38.bed --dump_probes SAMPLE.probes SAMPLE.raw.vcf.gz sentieon driver -t 16 -r REF.fa --algo CNVModelApply --model CNV_MODEL --emit_conf 0 \ --vcf SAMPLE.raw.vcf.gz SAMPLE.cnv.vcf.gz
-
-
Build the report:
python3 scripts/cnvscope_viz.py SAMPLE.cnv.vcf.gz SAMPLE.probes SAMPLE_report
-
Open
SAMPLE_report/index.htmlin Chrome, or serve the folder withpython3 scripts/cnvscope_viz.py --serve SAMPLE_report.
The user guide covers each step:
- Install and Get the input files, including the PAR BED and the sex options
- Build the report and Open and share the report
- Reading the report and Combined SV + CNV calls
- Report builder options and Troubleshooting
- Appendix: the probe dump, build time and size, resolution recipes, scripting hooks
python3 -m pip install pytest
python3 -m pytest -q test/Some tests need bgzip and tabix (htslib) or node on PATH; pytest skips them when the tools are missing.
BSD 2-Clause License; see LICENSE.
Questions and issues: support@sentieon.com