Detect structural variants from long-read alignments using Sniffles, cuteSV, and SVIM...
Reference examples tested with: Sniffles 2.2+, cuteSV 2.1+, minimap2 2.28+, samtools 1.19+, truvari 4.0+.
Before using code patterns, verify installed versions match. If versions differ:
<tool> --version then <tool> --help to confirm flagsResults depend on inputs that outlive the binary version - record them:
--tandem-repeats) drives the FP rate in repeats more than any other setting. Record which TR BED was used.If code throws an error, introspect the installed tool (sniffles --help, cuteSV --help) and adapt the example to the actual API rather than retrying.
"Find structural variants in my long reads" -> Map with the SV-ready preset (soft-clipped supplementaries), call with a TR-aware caller, and benchmark stating the region set and Truvari params.
sniffles --input aln.bam --vcf svs.vcf --reference ref.fa --tandem-repeats TR.bedLong reads are the killer app for SVs: a single read spans the breakpoint (within-read CIGAR or split alignment) and resolves repeats short reads cannot. By convention SV = >=50 bp; the 30-100 bp range is a VNTR-dominated gray zone where callers disagree most.
In tandem repeats and segmental duplications, the same biological event has many valid VCF encodings - a deletion can be written as the reciprocal insertion on the other allele, and a VNTR expansion's breakpoints slide freely across repeat units. Consequently:
--tandem-repeats makes clustering repeat-aware (widening the merge window inside annotated TRs) - the single biggest FP-reduction lever, not a nicety.truvari refine exists precisely to re-harmonize representations within TR regions; benchmarking TR-dense regions without it systematically understates recall.| Tool | Regime | Best for | Citation |
|---|---|---|---|
| Sniffles2 | germline + population + mosaic | the default germline workhorse; cohort joint genotyping; .snf merge | Smolka 2024 Nat Biotechnol 42:1571 |
| cuteSV | germline | high sensitivity, speed; per-platform tuning required | Jiang 2020 Genome Biol 21:189 |
| SVIM | germline | scores (not hard-filters) SVs; good INS detection | Heller 2019 Bioinformatics 35:2907 |
| pbsv | germline (PacBio) | two-step discover->call; official PacBio tool | PacBio (no journal paper) |
| NanoVar | germline, low-depth | 4-8x ONT clinical | Tham 2020 Genome Biol 21:56 |
| dipcall / SVIM-asm / PAV | assembly-based germline | most accurate single sample with phased HiFi; truth-set generation | Li 2018; Heller 2021; Ebert 2021 |
| Severus | somatic (tumor-normal) | cancer T/N, complex/subclonal | Keskus 2026 Nat Biotechnol |
| nanomonsv | somatic (tumor-normal) | precise somatic breakpoints, MEI | Shiraishi 2023 NAR 51:e74 |
| SVision-pro | de novo + somatic, complex | resolving nested CSVs | Wang 2025 Nat Biotechnol 43:181 |
| Scenario | Recommended | Why |
|---|---|---|
| Single ONT/HiFi germline sample | Sniffles2 + --tandem-repeats |
TR-aware, auto support, fast |
| Cohort germline | Sniffles2 per-sample .snf -> merge |
re-genotypes from raw signal; true joint genotypes |
| Maximum sensitivity / speed | cuteSV with the platform-matched param set | per-platform tuning is mandatory |
| Phased HiFi, want best per-sample accuracy | assembly-based (dipcall/SVIM-asm) -> hifi-assembly | resolves the alt haplotype directly |
| Tumor-normal somatic SVs | Severus or nanomonsv | paired callers; Sniffles --mosaic is single-sample only |
| Low-VAF mosaic in one sample | Sniffles2 --mosaic |
lowers support, reports VAF (not a T/N caller) |
| Low coverage (4-8x) | NanoVar | designed for low-depth clinical |
| Benchmarking | Truvari (+refine) vs GIAB Tier1/CMRG |
the field standard; state region + params |
Map with minimap2 (the modern default; NGMLR is a higher-precision/slower legacy niche for Sniffles). Use the platform preset and keep soft-clipped supplementary alignments - split-read callers reconstruct breakpoints from the clipped sequence on those records.
minimap2 -ax map-ont --MD -Y ref.fa ont.fq.gz | samtools sort -o aln.bam && samtools index aln.bam
# -Y keeps SEQ on supplementaries (the SV substrate); --MD for cuteSV; map-hifi/map-pb for PacBio
# Single sample (always supply --reference for INS sequence and --tandem-repeats for repeats)
sniffles --input aln.bam --vcf svs.vcf --reference ref.fa --tandem-repeats human_GRCh38_TR.bed
# Cohort: per-sample .snf signature index, then merge + joint-genotype
sniffles --input s1.bam --snf s1.snf --reference ref.fa --tandem-repeats TR.bed
sniffles --input s2.bam --snf s2.snf --reference ref.fa --tandem-repeats TR.bed
sniffles --input s1.snf s2.snf --vcf cohort.vcf --reference ref.fa
# Force-call / regenotype a known SV set in a new sample
sniffles --input new.bam --genotype-vcf known_svs.vcf --vcf genotyped.vcf
# Single-sample low-VAF / mosaic (NOT a tumor-normal caller)
sniffles --input tumor.bam --vcf mosaic.vcf --mosaic
The .snf is a binary signature index (NOT a VCF - never bcftools it); it retains sub-threshold signatures so the merge re-genotypes an SV even in a sample that did not independently pass support.
cuteSV's defaults are not platform-appropriate; the README gives distinct sets by error rate. --genotype is OFF by default. Positional args: cuteSV <bam> <ref> <out.vcf> <work_dir>. Force-calling moved to the separate cuteFC tool.
| Platform | --max_cluster_bias_INS | --diff_ratio_merging_INS | --max_cluster_bias_DEL | --diff_ratio_merging_DEL |
|---|---|---|---|---|
| ONT | 100 | 0.3 | 100 | 0.3 |
| PacBio HiFi/CCS | 1000 | 0.9 | 1000 | 0.5 |
| PacBio CLR | 100 | 0.3 | 200 | 0.5 |
mkdir cutesv_work
cuteSV aln.bam ref.fa cutesv.vcf cutesv_work --genotype \
--max_cluster_bias_INS 100 --diff_ratio_merging_INS 0.3 \
--max_cluster_bias_DEL 100 --diff_ratio_merging_DEL 0.3 # ONT set
truvari bench --base giab_tier1.vcf.gz --comp calls.vcf.gz \
--includebed tier1_regions.bed --pctseq 0.7 --refdist 500 --passonly -o bench/
truvari refine bench/ # re-harmonize TR-region representations for a fair comparison
--pctseq (default 0.7) compares the actual inserted/deleted sequence, not just coordinates - set 0 for depth-based callers lacking alt sequence, keep 0.7 for long-read callers. Region set dominates the headline: Tier1 (resolvable INS/DEL >=50 bp) overstates whole-genome performance; CMRG reflects hard clinical loci. Tier1 v0.6 is INS/DEL only - do not report INV recall against it.
Trigger: calling in tandem repeats without a TR BED. Mechanism: the breakpoint slides across repeat units, scattering signatures. Symptom: several calls with inconsistent breakpoints where one event exists. Fix: supply --tandem-repeats to the caller; truvari refine when benchmarking.
Trigger: running cuteSV with one parameter set across platforms. Mechanism: HiFi settings over-merge ONT noise; ONT settings fragment clean HiFi signatures. Symptom: FP inflation or split calls. Fix: use the platform-matched set; remember --genotype is off by default.
Trigger: Sniffles without --reference, or alignment without -Y. Mechanism: no reference -> no ALT sequence; hard-clipped supplementaries -> lost breakpoint sequence. Symptom: INS lack sequence; imprecise breakpoints. Fix: add --reference and align with -Y.
Trigger: somatic SV calling with single-sample --mosaic. Mechanism: mosaic mode lowers support in one sample; it has no normal to subtract. Symptom: germline SVs reported as somatic; FP at low VAF. Fix: Severus or nanomonsv (paired tumor-normal).
Trigger: quoting F1 without region + TR BED + Truvari params. Mechanism: representation handling moves the number more than the caller. Symptom: apples-to-oranges comparisons. Fix: fix the region set, TR BED, and Truvari params; run truvari refine.
| Threshold | Source | Rationale |
|---|---|---|
| SV >= 50 bp | GIAB convention | 30-100 bp is a VNTR gray zone where callers disagree |
Sniffles --minsvlen 35, --mapq 25, --minsupport auto |
Sniffles2 manpage | the actual defaults (support is coverage-derived, not a fixed 3) |
| Coverage ~20-30x germline; >30-60x mosaic/somatic | SV practice | large SVs callable from 5-10x; low-VAF needs depth |
Truvari --pctseq 0.7, --refdist 500 |
English 2022 | sequence-aware INS matching; loosen refdist to 1000 only for fuzzy callers |
| cuteSV params per platform | cuteSV README | error rate sets cluster bias / merge ratio |
| Error / symptom | Cause | Solution |
|---|---|---|
| Many FP calls in repeats | no TR BED | supply --tandem-repeats |
| cuteSV VCF has no GT | --genotype off by default |
add --genotype |
Cannot bcftools the .snf |
.snf is a binary signature index |
use it as Sniffles input, not a VCF |
| INS records lack sequence | --reference not supplied |
add --reference ref.fa |
| Imprecise/missing breakpoints | supplementaries hard-clipped | align with minimap2 -Y |
| Looking for cuteSV force-calling flag | moved to cuteFC | use the cuteFC tool |
| Somatic SVs from a single sample | germline/mosaic caller | Severus / nanomonsv (paired) |
-Y soft-clip, platform preset)