Migrating from VarDictJava + R + Perl to VarDictRust¶
vardictrust consolidates the three-stage VarDictJava v1.8.3 + VarDict R/Perl pipeline (VarDictJava \(\to\) teststrandbias.R / testsomatic.R \(\to\) var2vcf_valid.pl / var2vcf_paired.pl) into a single statically-compiled binary with zero JVM, R, or Perl runtime dependencies.
By default (--compat=vardictjava, aliases vardictjava-1.8.3 / 1.8.3, or --parity), vardictrust produces VCF 4.2 (VCFv4.2) and intermediate .var output byte-for-byte identical on valid inputs (within floating-point tolerance \(\varepsilon \le 10^{-6}\) after R 5-decimal banker's rounding) to VarDictJava v1.8.3 (0886261) + VarDict (009e017), while offering opt-in --compat=off (49 CompatProfile correctness switches), clinical and long-read workflow presets via --preset <wgs|wes|amplicon|ctdna|hifi|ont>, --noise-model polymer-stutter filtering, --methylation cis-CpG epigenetic annotation, F1R2/F2R1 orientation-bias filtering via --orientation-bias, --amplicon-single-primer (-sp) for single-primer extension panels, --vcf-all-alleles (var2vcf_*.pl -A multi-allelic emission), and drop-in vardictcpp v2..v4 CLI aliases (--vcfall, --noend, --vcfpass, --vcf). See DIVERGENCES.md, ROADMAP.md, and docs/validation/omnibus-empirical-validation.md for empirical parity and diff-confinement receipts.
[!TIP] Not migrating an existing
VarDictJavascript? Start directly with--preset <wgs|wes|amplicon|ctdna|hifi|ont>(v1.1.0+/v1.2.0+) for automatic0-based BED coordinates, all 49--compat=offVCF/somatic/SV/BND/RNA-Seq/consensus-BAM/--eqxfixes, and modality-tuned filters; see Clinical Workflow Presets (--preset) below and the README--presetQuickstart.
1. Side-by-Side Pipeline Translation¶
Single-Sample / Germline Calling¶
Legacy 3-process pipe (VarDictJava + R + Perl on a standard 0-based UCSC BED):
VarDict \
-G ref.fa \
-f 0.01 \
-N SAMPLE \
-b sample.bam \
-c 1 -S 2 -E 3 -g 4 -z 1 \
targets.bed \
| teststrandbias.R \
| var2vcf_valid.pl -N SAMPLE -E -f 0.01 \
> sample.vcf
Single-binary vardictrust equivalent (stdout VCF or direct BGZF + Tabix):
# Uncompressed VCF to stdout (drop-in replacement; note `-E 3` already omits INFO/END
# automatically to match `var2vcf_valid.pl -E`, while `--no-end` omits it when `-E` is absent):
vardictrust \
-G ref.fa \
-f 0.01 \
-N SAMPLE \
-b sample.bam \
-c 1 -S 2 -E 3 -g 4 -z \
--no-end \
targets.bed \
> sample.vcf
# Or write multithreaded BGZF + Tabix (.tbi) directly with zero samtools/bgzip/tabix pipes:
vardictrust \
-G ref.fa \
-f 0.01 \
-N SAMPLE \
-b sample.bam \
-c 1 -S 2 -E 3 -g 4 -z \
--no-end \
--output sample.vcf.gz \
--tbi \
targets.bed
Paired Tumor/Normal Somatic Calling¶
Legacy 3-process pipe (VarDictJava + testsomatic.R + var2vcf_paired.pl on a standard 0-based UCSC BED):
VarDict \
-G ref.fa \
-f 0.01 \
-N "TUMOR|NORMAL" \
-b "tumor.bam|normal.bam" \
-c 1 -S 2 -E 3 -g 4 -z 1 \
targets.bed \
| testsomatic.R \
| var2vcf_paired.pl -N "TUMOR|NORMAL" -M -f 0.01 \
> somatic.vcf
Single-binary vardictrust equivalent:
vardictrust \
-G ref.fa \
-f 0.01 \
-N "TUMOR|NORMAL" \
-b "tumor.bam|normal.bam" \
-c 1 -S 2 -E 3 -g 4 -z \
--paired-strict \
--output somatic.vcf.gz \
--tbi \
targets.bed
Targeted 8-Column Amplicon Calling (-a, -sp, & Paired --compat=off)¶
# 8-column amplicon BED (chr, gene_start, gene_end, gene, score, strand, insert_start, insert_end)
# Pass -z when supplying explicit -a on a standard 0-based BED (omitting -a auto-detects both -a 10:0.95 and -z)
vardictrust \
-G ref.fa \
-f 0.01 \
-N SAMPLE \
-b amplicon.bam \
-a 10:0.95 -z \
amplicon_8col.bed \
> amplicon.vcf
# Single-primer extension panels (QIAseq V3 / ArcherDX, where col8 == col3 or col7 == col2)
# and paired tumor/normal somatic amplicon calling (--compat=off):
vardictrust \
-G ref.fa \
-f 0.01 \
-N "TUMOR|NORMAL" \
-b "tumor.bam|normal.bam" \
-a 10:0.95 -sp -z \
--compat=off \
--output somatic_amp.vcf.gz \
--tbi \
qiaseq_8col.bed
Intermediate .var Tabular Output (--emit-intermediate)¶
When migrating custom downstream scripts that consume raw .var tables instead of VCF:
vardictrust ... --emit-intermediate: emits the unannotated Java.varschema (36columns in Simple mode,38in Amplicon mode,55in Somatic mode — identical to runningVarDictJavaalone without R).vardictrust ... --emit-intermediate --fisher: runs the in-engineVarDictJava --fisherport (FisherExact.java/ Apache Commons Math, matching R within \(\varepsilon \le 10^{-6}\) modulo the dyadic-midpoint 1-ulp rounding documented inDIVERGENCES.md) and emits the 38/40/61-column.varschema (38in Simple mode,40in Amplicon mode,61in Somatic mode — reproducingVarDictJava --fisher). By contrast, default VCF output mode (without--emit-intermediate) always runs R-exactdhyper/uniroot(teststrandbias.R/testsomatic.R) inline with no--fisherflag needed.
2. var2vcf_valid.pl & var2vcf_paired.pl Flag Rosetta Stone¶
Because vardictrust fuses VarDictJava and the Perl var2vcf_valid.pl / var2vcf_paired.pl post-filters into one CLI, Perl single-letter flags that collided with Java flags (-A, -S, -E, -M, -P, -T, -d, -v, -q, -Q, -p, -o, -m, -F, -I, -c) map to explicit --vcf-* / long flags in Group 2 (VCF Post-Filtering (var2vcf)):
Legacy Perl Flag (var2vcf_valid.pl / var2vcf_paired.pl) |
vardictrust Flag |
Single-Sample Default (valid) |
Paired Somatic Default (paired) |
Notes & Exact Parity Semantics |
|---|---|---|---|---|
-N <NAME> (TUMOR\|NORMAL in paired) |
-N <NAME> / --name <NAME> |
BAM stem | <bam1>\|<bam2> stems |
Shared directly between pileup engine and VCF #CHROM sample columns. |
-E (var2vcf_valid.pl only) |
--no-end / --noend (or -E <COL>) |
Emit END= (omits non-SV END= under --compat=off) |
Omit END= (emits END= on symbolic SVs under --compat=off) |
Omits END=<INT> in VCF INFO. Passing BED end column -E <COL> (for example -c 1 -S 2 -E 3 -z) or enabling --compat=off (CompatProfile::omit_nonsv_vcf_end, clintval/vartovcf#105) omits single-sample non-SV INFO/END automatically, whereas symbolic SVs under --compat=off emit canonical END;SVTYPE;SVLEN unless --no-end (--noend) is passed explicitly. |
-S |
--pass-only (alias: --vcfpass) |
Emit all (FILTER tagged) |
Emit all (FILTER tagged) |
Emits only PASS variants; non-PASS sites short-circuit before expensive VCF Fisher formatting when safe. |
-M (var2vcf_paired.pl only) |
--paired-strict |
N/A | Off (germline rescue on) | Disables germline/LOH rescue and restricts paired output to strict somatic candidates (var2vcf_paired.pl -M). |
-P <FLOAT> (var2vcf_paired.pl) |
--vcf-pval <FLOAT> |
N/A | 0.05 |
Maximum somatic Fisher p-value (SSF) threshold and P<FLOAT> FILTER tag in paired VCF output. |
-P 0 (var2vcf_valid.pl) |
--no-pstd-filter |
Filter PSTD=0 on |
N/A | Disables the single-position read filter (PSTD == 0) in single-sample VCF output. |
-T <INT> (var2vcf_valid.pl) |
--min-splitreads <INT> |
1 |
N/A | Minimum SPLITREAD support required for structural variants in single-sample VCF output (under --compat=off, discordant-pair SVs with SPANPAIR > 0 bypass the default 1 floor unless --min-splitreads is passed explicitly; UB-5). |
-f <FLOAT> |
--vcf-af <FLOAT> (or -f <FLOAT>) |
Inherits -f (0.02 if -f 0) |
Inherits -f |
Overrides VCF FILTER/GT minimum AF independently of pileup -f and preserves raw string spelling in ##FILTER=<ID=f...> / FILTER (-f 0.0 \(\to\) f0.0, -f 0.050 \(\to\) f0.050, -f 1e-5 \(\to\) f1e-5, -f .01 \(\to\) f.01, matching AstraZeneca-NGS/VarDict@009e017). Passing --vcf-af 0 explicitly sets 0 (defined() semantics) in both modes; when --vcf-af is omitted, single-sample var2vcf_valid.pl preserves Perl's falsy fallback (-f 0 \(\to\) 0.02; pass -f 0.0 or --vcf-af 0 for zero single-sample VCF AF cutoff), whereas paired somatic var2vcf_paired.pl uses defined($opt_f) so -f 0 stays 0. |
-d <INT> |
--vcf-min-depth <INT> |
3 |
5 |
Minimum total read depth (DP) before d<INT> soft-filter. |
-v <INT> |
--vcf-min-vd <INT> |
2 |
3 |
Minimum variant read depth (VD) before v<INT> soft-filter. |
-q <FLOAT> |
--vcf-qmean <FLOAT> |
22.5 |
22.5 |
Minimum mean base quality (QUAL) before q<FLOAT> soft-filter. |
-Q <FLOAT> |
--vcf-mapq <FLOAT> |
10 |
0 |
Minimum mean mapping quality (MQ) before Q<FLOAT> soft-filter. |
-p <FLOAT> |
--vcf-pmean <FLOAT> |
8 |
8 |
Minimum mean read position (PMEAN) before p<FLOAT> soft-filter. |
-o <FLOAT> |
--vcf-sn <FLOAT> |
1.5 |
1.5 |
Minimum signal-to-noise ratio (SN) before SN<FLOAT> soft-filter. |
-m <FLOAT> |
--vcf-max-nm <FLOAT> |
5.25 |
5.25 |
Maximum mean mismatches (NM) before NM<FLOAT> soft-filter. |
-F <FLOAT> |
--vcf-gt-freq <FLOAT> |
0.2 |
0.2 |
Homozygous 1/1 genotype margin (1 - AF < FLOAT). |
-I <FLOAT> |
--vcf-msi <FLOAT> |
12 |
12 |
Maximum non-monomer microsatellite repeat count (MSI) before MSI<FLOAT> filter. |
-c <INT> |
--vcf-cluster-dist <INT> |
0 (disabled) |
0 (disabled) |
Adjacent variant cluster window in bp (Cluster<INT>bp filter across single-sample, amplicon, and paired somatic streams). |
-A (var2vcf_valid.pl / var2vcf_paired.pl all-alleles) |
--vcf-all-alleles (alias: --all-alleles) |
Single-winner (1 row per POS) |
Single-winner (1 row per POS) |
Default Single-winner (1 row per POS, UB-7); passing --vcf-all-alleles (--all-alleles) emits all distinct (chr, start, end, ref, alt) alleles at each position sorted by 4dp AF descending (var2vcf_valid.pl:137 / var2vcf_paired.pl:129). Important: -A <INT> on vardictrust remains VarDictJava's sv_min_af ([default: 4]), not var2vcf_*.pl -A. |
Additional var2vcf_*.pl migration nuances when translating legacy shell wrappers:
- Omit
var2vcf_*.pl -b <contigs.bed>andvar2vcf_*.pl -G <ref.fa>:vardictrustpopulates##contig=<ID=...,length=...>and##reference=headers automatically from the engine's-G <ref.fa>and companion.faiindex (-bonvardictrustis--bam). - Drop unused/colliding Perl flags (
-D,-a,-C): var2vcf_paired.pl -D <FLOAT>(commented out in Perl's filter logic; only wrote the static##FILTER=<ID=DIFF0.2,...>header) must be omitted —-Donvardictrustenables--debug.var2vcf_valid.pl -a(unusedGetoptflag in Perl; ampliconAMPBIASannotations are emitted automatically from 8-column BED /-aamplicon runs) collides with-a/--amplicon(int:float) onvardictrust.var2vcf_*.pl -C(commented-out contig check in Perl) must be omitted —-ConvardictrustisVarDictJava's unsupported chromosome-as-numbers flag and fails loudly per Section 5.- Explicit
0thresholds are honored (defined()vs Perl truthiness):var2vcf_valid.pl/var2vcf_paired.pltested-d,-v,-q,-p,-o,-m, and-Iwith Perl truthiness ($opt_q ? $opt_q : 22.5), silently reverting-q 0/-d 0/-v 0back to non-zero defaults (22.5,3/5,2/3).vardictrustusesOption(defined()) semantics, so--vcf-min-depth 0,--vcf-min-vd 0,--vcf-qmean 0,--vcf-pmean 0,--vcf-sn 0,--vcf-max-nm 0,--vcf-msi 0, and--vcf-af 0all honor explicit0.
3. Four Common Migration Gotchas¶
1. -h Prints the .var Column Header — Use -H, -?, or --help for Help¶
Following CmdParser.java, -h / --header sets printHeader = true (emitting the .var column header row in --emit-intermediate mode). To print the 7-group CLI help screen, run:
2. BED Column Indices & 0-Based Coordinate Indexing (-c 1 -S 2 -E 3 -z)¶
Following RegionBuilder.java, VarDictJava's default non-amplicon table layout is 13-column UCSC refGene (-c 3 -S 7 -E 8 -s 10 -e 11 -g 13, 1-based inclusive; 8-column amplicon BEDs are auto-detected separately):
- 4-column UCSC BED (
chr,start_0based,end_1based,gene) invoked without-c: bothVarDictJavaandvardictrustauto-detect-c 1 -S 2 -E 3 -g 4and 0-based half-open coordinates (-z 1) whenstart <= end. - 3-, 5-, and 6-column 0-based UCSC BEDs — and 4-column 0-based BEDs whenever
-c 1is passed explicitly: you must pass-c 1 -S 2 -E 3 -z(or-z 1, plus-g 4when column 4 is the region/gene name)! Passing-c 1without-zdisables 4-column auto-detection and leaveszero_based = false(1-based inclusive), silently shifting every region start coordinate by 1 bp; omitting-c 1 -S 2 -E 3on< 11-column non-4-column BEDs fails fast withVardictError::Parseexpecting at least 11refGenecolumns. Note thatvardictrustaccepts both bare-zand-z 1even immediately before the positionalBEDpath, whereas legacyVarDictJavarequires explicit-z 1there (Commons CLIhasOptionalArgs(1)otherwise consumes theBEDpath as-z's numeric value). Omit-zonly when your region file uses 1-based inclusive coordinates. --preset wgs|wes|amplicon|ctdna|hifi|ont(v1.1.0+/v1.2.0+): automatically enables 0-based BED coordinates (zero_based = true, with-c 1 -S 2 -E 3 -g 4onwgs/wes/ctdna/hifi/ontwhile keeping UCSC 8-column capture BEDs inSimpleModeand 4-column3'_UTRgene names intact, and 8-column-a 10:0.95AmpliconModeon--preset amplicon) while preserving 1-based inclusive coordinates on-R chr:start-endunless-zis passed explicitly (pass-z 0to override a preset back to 1-based BED coordinates).
3. Single-Dash Legacy Java Flags vs GNU -- Flags¶
- Accepted with one or two dashes (
VarDictJavaCommons-CLI compatibility):-th/--threads,-UN/--UN,-sp/--amplicon-single-primer,-fisher/--fisher,-chimeric/--chimeric,-deldupvar/--deldupvar,-nosv/--nosv,-splice/--splice,-header/--header,-dedup/--dedup,-debug/--debug,-verbose/--verbose,-amplicon/--amplicon,-DP/--DP/--default-printer,-adaptor/--adaptor,-mfreq/--mfreq,-nmfreq/--nmfreq,-insert-size/--insert-size,-insert-std/--insert-std,-ref-extension/--ref-extension,-crispr/--crispr,-trim/--trim,-VS/--VS. - Require double-dash
--(vardictrust-native & hiddenvardictcpp v2..v4flags):--output,--tbi(--index),--csi,--stats-json,--parity,--compat,--preset,--emit-intermediate,--tile-size,--completions,--manpage,--amplicon-single-primer(or-sp),--no-end(alias:--noend),--pass-only(alias:--vcfpass),--paired-strict,--vcf-all-alleles(--all-alleles, alias:--vcfall),--orientation-bias,--vcf(MHH-Bioinformatics-Hematology/vardictcpp#4),--min-splitreads,--no-pstd-filter, and--vcf-*. Passing a single-dash typo (for example-pass-only,-orientation-bias,-preset,-compat,-vcf,-vcfall,-noend,-vcfpass,-vcf-all-alleles,-all-alleles,-amplicon-single-primer, or-completions) fails fast withUnknown single-dash option '-pass-only'; did you mean '--pass-only'?rather than being misinterpreted as a short-flag cluster.
4. Default Thread Count (-th / RAYON_NUM_THREADS)¶
VarDictJava runs single-threaded unless -th <INT> is passed. Because vardictrust guarantees worker-count-invariant deterministic output and bounded \(O(1)\) per-tile memory, omitting -th defaults to RAYON_NUM_THREADS (if set) or all available logical cores. Inside shared HPC/SLURM/Nextflow allocations, pin threads explicitly via -th <INT> (for example -th 8).
4. Direct Compressed I/O, Indexing, Telemetry & Shell Ergonomics¶
vardictrust eliminates external wrapper plumbing around compressed inputs, BGZF outputs, and container streams:
- CRAM & Companion Index Discovery: Pass
-b sample.cram -G ref.fadirectly. Both standard (sample.bam.bai,sample.cram.crai,ref.fa.fai) and HTSJDK companion (sample.bai,sample.crai,ref.fai, plus symlink targets) index layouts are discovered automatically. - BGZF-Compressed Reference FASTA & BED (
v1.0.8+): Pass-G ref.fa.gzwhen indexed withbgzip+samtools faidx ref.fa.gz(.fai+.gzipresent; plain non-BGZFgzipFASTAs fail fast with abgzip+samtools faidxremediation hint), and pass.bed.gz,.bed.bgz, or process-substitution FIFOs (<(zcat targets.bed.gz)) directly as the positionalBEDinput. - Direct BGZF + Tabix/CSI Output & Stream Safety: Use
--output variants.vcf.gz --tbi(or--csiwhen contigs exceed512 Mbp, built vianoodles::csiIndexer::<LinearIndex>16 kbp linear-windowloffsetpropagation so spanning SVs across multiple BGZF blocks are never dropped bytabix/bcftools view -r,clintval/vartovcf#161) for atomic staged file output withfsyncverification, or--output -//dev/stdoutin streaming container pipelines. - Run Telemetry (
--stats-json <PATH>): Emit structured JSON metrics (mode,threads,regions,tiles,elapsed_ms,peak_rss_kb) alongside variant calling. - Compatibility Profiles (
--compat=vardictjavavs--compat=off): --compat=vardictjava(default inv1.x; aliases:vardictjava-1.8.3,1.8.3, or--parity): Locks 100% byte-for-byteVarDictJavav1.8.3 +var2vcf_*.plparity acrossv1.xand futurev2.0+releases.--compat=off(v1.1.0+): Activates all 49VarDictRustCompatProfile(COMPAT_OFF) correctness switches without per-bug--fixflag sprawl and stamps##VarDictRustCompat=offin VCF headers (AstraZeneca-NGS/VarDictJava#116bijectiveINFO/SAMPLEpercent-encoding,AstraZeneca-NGS/VarDictJava#342standard<DUP>symbolicALTwhenmlen < 100,AstraZeneca-NGS/VarDictJava#292FASTA-valid 3'-shiftedREF/ALTalleles,AstraZeneca-NGS/VarDictJava#369strict merged-interval target bounds,UB-1/UB-2-ppileup sentinel suppression, liveu64DUPRATEaccounting, mixedX+chrX/Y+chrY/MT+chrMcontig preservation,AstraZeneca-NGS/VarDictJava#402CigarModifierhomopolymer multi-indel merge,minimap2 --eqx=/XCIGAR read-length and coalescing support,UB-5single-sample discordant-pair<DUP>/<INV>/<DEL>SV preservation,UB-6inclusivemark_dup_svsvfdupboundary,sv_lazy_mate_pileuplazy mate-window pileup infind_inv_sub, exact IEEE-754 binaryHALF_EVENtie rounding,AstraZeneca-NGS/VarDictJava#92/AstraZeneca-NGS/VarDictJava#386/AstraZeneca-NGS/VarDictJava#400reconcile_vd_dpenforcingVD <= DP/AF <= 1.0/ADJAF <= 1.0/HICNT <= HICOV,UB-3/AstraZeneca-NGS/VarDictJava#282coordinate_sorted_varsascending coordinate position-map iteration,palakpsheth/VarDictRust#34 PB-2exact_35_overlap,palakpsheth/VarDictRust#34 PB-4exact_cigar_dlen_match,joachimwolff/VarDictJava#4/clintval/vartovcf#139somatic_continue_after_bad_var,AstraZeneca-NGS/VarDictJava#240/AstraZeneca-NGS/VarDict#119adaptor_all_consensus_dirs,AstraZeneca-NGS/VarDictJava#398/clintval/vartovcf#192canonical_sv_vcf_anchoring,AstraZeneca-NGS/VarDictJava#378/AstraZeneca-NGS/VarDict#109paired_somatic_amplicon,AstraZeneca-NGS/VarDictJava#341/AstraZeneca-NGS/VarDictJava#103cigar_strip_outer_hard_clips,bcbio/bcbio-nextgen#1704nonnegative_subtracted_means,AstraZeneca-NGS/VarDictJava#316reconcile_strand_and_hq_sums,AstraZeneca-NGS/VarDict#168reconcile_rd_vd_dp,AstraZeneca-NGS/VarDictJava#267sanitize_iupac_alt_alleles,AstraZeneca-NGS/VarDictJava#328sv_respect_min_len,AstraZeneca-NGS/VarDictJava#330pileup_preserve_shifted_ref,clintval/vartovcf#109recompute_vartype_after_adj_complex,clintval/vartovcf#101strict_vcf_ad_number_r,clintval/vartovcf#105omit_nonsv_vcf_end,clintval/vartovcf#99canonical_vcf_gt,VariationUtils.java:90sclip_majority_count_first,Clinical-Genomics/BALSAMIC#1396mate_overlap_both_strands,AstraZeneca-NGS/VarDictJava#264canonical_vcf_complex_left_align,clintval/vartovcf#191somatic_reconcile_split_alleles,clintval/vartovcf#181adj_snv_full_sclip_match,AstraZeneca-NGS/VarDictJava#263indel_only_shift3,SomaticPostProcessModule.java:221,238somatic_loh_homozygous_alt,clintval/vartovcf#160mnp_exact_right_fold,AstraZeneca-NGS/VarDictJava#363strict_unspanned_lgins_stitch,palakpsheth/VarDictRust#96consensus_bam_compatfgumi/fgbiocD/aD/bD/MIconsensus-BAM/CRAM interop,insertion_hicov_and_local_amp_dp,mnp_cis_haplotype_phasing,complex_indel_and_lgins_concordance,spliced_overhang_and_homopolymer_filter,somatic_multiallelic_loh_rescue,continuous_pstd_qstd, andsv_downstream_vcf_interop; seeROADMAP.md). Combining--paritywith--compat=off(or--compat=vardictjavawith--compat=off) fails fast withVardictError::Parse.- Shell Completions & Manual Page (
v1.0.8+):# Generate shell completions (installed automatically in Bioconda environments): vardictrust --completions bash > ~/.local/share/bash-completion/completions/vardictrust vardictrust --completions zsh > ~/.zfunc/_vardictrust vardictrust --completions fish > ~/.config/fish/completions/vardictrust.fish # View the standalone roff manual page: vardictrust --manpage | man -l -
Clinical Workflow Presets (--preset <wgs|wes|amplicon|ctdna|hifi|ont>, v1.1.0+ / v1.2.0+)¶
Passing --preset <wgs|wes|amplicon|ctdna|hifi|ont> (palakpsheth/VarDictRust#94, palakpsheth/VarDictRust#96) enables --compat=off (COMPAT_OFF, stamping ##VarDictRustCompat=off and ##VarDictRustPreset=<PRESET> in VCF headers; conflicts with --parity and --compat=vardictjava), sets 0-based BED coordinates (zero_based = true on BED inputs while keeping -R 1-based unless -z is passed explicitly), deduplicates paired somatic Q20/Q15 FILTER tags, and seeds modality-calibrated candidate/VCF FILTER defaults that any explicit CLI flag overrides:
| Preset | Target Assay & Coordinate Defaults | Candidate Pileup Defaults (-f, -r, -q, -Q, -m, -I) |
VCF FILTER Defaults (--vcf-*) |
Clinical Override Guidance |
|---|---|---|---|---|
--preset wgs |
30×–100× germline or paired T/N WGS; 0-based BED (-c 1 -S 2 -E 3 -g 4, UCSC BED8 kept in SimpleMode) |
-f 0.05, -r 2 |
--vcf-af 0.05, --vcf-min-depth 10, --vcf-min-vd 3, --vcf-mapq 20 (--vcf-qmean 22.5) |
For < 5% VAF subclonal somatic WGS, add -f 0.01 (which also resets the VCF AF floor to 0.01 unless --vcf-af is passed explicitly). |
--preset wes |
100×–500× germline or paired T/N WES / broad capture; 0-based BED (-c 1 -S 2 -E 3 -g 4) |
-f 0.01, -r 2 |
--vcf-af 0.02, --vcf-min-depth 20, --vcf-min-vd 4, --vcf-mapq 20 (--vcf-qmean 22.5) |
Add --orientation-bias[=MAX_AF:MIN_SOB:MAX_OBP\|annotate] on FFPE WES and --paired-strict when germline/LOH rescue should be suppressed. |
--preset amplicon |
Targeted 8-col PCR or SPE amplicon BED (-a 10:0.95, dedup = false; rejects -R and -i) |
-f 0.01, -r 2 |
--vcf-af 0.01, --vcf-min-depth 50, --vcf-min-vd 5, --vcf-mapq 20 (--vcf-qmean 22.5) |
Add -sp (--amplicon-single-primer) for QIAseq V3 / ArcherDX SPE panels; supports paired -b "tumor\|normal" natively under COMPAT_OFF. |
--preset ctdna |
1,000×–50,000× liquid-biopsy / cfDNA hybrid capture; 0-based BED (-c 1 -S 2 -E 3 -g 4) |
-f 0.001, -r 3 |
--vcf-af 0.002, --vcf-min-depth 100, --vcf-min-vd 4, --vcf-qmean 25, --vcf-mapq 20 |
Pair with --orientation-bias and --paired-strict (var2vcf_paired.pl -M) on cfDNA/WBC duplex or simplex capture assays. |
--preset hifi |
20×–60× PacBio HiFi (pbmm2 / minimap2 -ax map-hifi --eqx); 0-based BED (-c 1 -S 2 -E 3 -g 4), 25 kbp tile halo |
-f 0.10, -r 3, -q 20, -Q 10, -m 200, -I 2000 |
--vcf-af 0.10, --vcf-min-depth 6, --vcf-min-vd 3, --vcf-qmean 20, --vcf-mapq 20, --no-pstd-filter, --noise-model=0.005 (PolymerNoise; --vcf-max-nm unset, relying on span-proportional read-level mismatch filtering unless --vcf-max-nm is passed) |
For somatic mosaic/tumor-normal HiFi calling, add -f 0.02 (and --vcf-all-alleles at multi-allelic repeat loci; pass --noise-model=off or --noise-model=annotate to disable PolymerNoise filtering). |
--preset ont |
30×–80× Oxford Nanopore R10.4+ / ONT-UL (minimap2 -ax map-ont --eqx); 0-based BED (-c 1 -S 2 -E 3 -g 4), 25 kbp tile halo |
-f 0.15, -r 4, -q 12, -Q 10, -m 500, -I 2000 |
--vcf-af 0.15, --vcf-min-depth 8, --vcf-min-vd 4, --vcf-qmean 12, --vcf-mapq 15, --vcf-msi 16, --no-pstd-filter, --noise-model=0.005 (PolymerNoise; --vcf-max-nm unset, relying on span-proportional read-level mismatch filtering unless --vcf-max-nm is passed) |
Add -f 0.05 for subclonal somatic ONT R10.4+ tumor-normal calling (60×+ tumor coverage recommended; pass --noise-model=off or --noise-model=annotate to disable PolymerNoise filtering). |
Recommended External UMI / Duplex Consensus Workflow (fgumi + --preset ctdna --orientation-bias)¶
For duplex, simplex, or CODEC UMI assays, collapse molecular families upstream with Fulcrum Genomics fgumi (bioconda::fgumi >= 0.9.0) or fgbio before running vardictrust (CompatProfile::consensus_bam_compat handles cD, aD, bD, and MI consensus tags automatically under --compat=off / --preset):
samtools dict ref.fa -o ref.dict
fgumi extract --inputs R1.fq.gz R2.fq.gz --read-structures 8M2S+T 8M2S+T --sample CFDNA --library LIB1 --output unmapped.umi.bam
fgumi fastq -i unmapped.umi.bam | bwa mem -t 8 -p -Y ref.fa - | fgumi zipper -u unmapped.umi.bam -r ref.fa -o aligned.bam
fgumi sort -i aligned.bam --order template-coordinate -o grouped_input.bam
fgumi group -i grouped_input.bam -o grouped.bam --strategy paired --edits 1
fgumi duplex -i grouped.bam -o consensus.unmapped.bam --min-reads 2,1,1
fgumi fastq -i consensus.unmapped.bam | bwa mem -t 8 -p -Y ref.fa - | fgumi zipper -u consensus.unmapped.bam -r ref.fa -o consensus.aligned.bam
fgumi filter -i consensus.aligned.bam -o consensus.filtered.bam -r ref.fa --min-reads 2,1,1 --min-base-quality 30 --reverse-per-base-tags --require-single-strand-agreement true
samtools sort -@ 8 -o cfdna.duplex.bam consensus.filtered.bam && samtools index cfdna.duplex.bam
vardictrust --preset ctdna --orientation-bias -G ref.fa -b cfdna.duplex.bam -N CFDNA --vcf-all-alleles --output cfdna.vcf.gz --tbi panel_0based.bed
5. Unsupported Legacy VarDictJava Options (Fail-Loud Policy)¶
Per AGENTS.md §12, vardictrust never silently ignores unimplemented legacy flags:
| Legacy Flag | Upstream Behavior | vardictrust Behavior & Recommended Alternative |
|---|---|---|
-C |
Strip chr prefix / treat chromosome names as bare integers (deprecated upstream). |
Rejected loudly (-C not implemented in VarDictRust; use VarDictJava). Match BED/region contig names directly to your BAM/FASTA header (chr1 vs 1). |
-Z <FLOAT> / --downsample <FLOAT> |
Nondeterministic Math.random() read subsampling (CmdParser.java:125-127, AstraZeneca-NGS/VarDict#198). |
Rejected loudly (-Z not implemented in VarDictRust; use VarDictJava). Halo tiling bounds memory without downsampling; if subsampling is required for benchmarking, run samtools view -s <SEED.FRAC> beforehand for deterministic reproducibility. |
-VS STRICT |
HTSJDK strict SAM validation aborting on benign BAM tag quirks. | Rejected loudly (-VS STRICT not implemented in VarDictRust; use VarDictJava). -VS SILENT and -VS LENIENT are accepted and match noodles lenient decoding. |