Skip to content

Commit a305a7c

Browse files
committed
add nested cycle decon test
1 parent dadf913 commit a305a7c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/t/26_deconstruct.t

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ BASH_TAP_ROOT=../deps/bash-tap
55

66
PATH=../bin:$PATH # for vg
77

8-
plan tests 45
8+
plan tests 46
99

1010
vg msga -f GRCh38_alts/FASTA/HLA/V-352962.fa -t 1 -k 16 | vg mod -U 10 - | vg mod -c - > hla.vg
1111
vg index hla.vg -x hla.xg
@@ -255,3 +255,11 @@ vg paths --compute-augref --min-augref-len 0 -x cyclic_ref_nested.pg -Q x > cycl
255255
vg deconstruct cyclic_ref_nested.augref.pg -p x -a > cyclic_ref_nested.vcf
256256
is $(grep -v ^# cyclic_ref_nested.vcf | wc -l) 1 "cyclic reference with nesting produces single variant"
257257
rm -f cyclic_ref_nested.pg cyclic_ref_nested.augref.pg cyclic_ref_nested.vcf
258+
259+
# Test 5: Cyclic reference outputs multiple variants (one per reference traversal)
260+
# Reference x visits the snarl twice (via node 2 then 3), alt a visits twice (via node 3 then 4)
261+
# With -c 0 to disable context-jaccard (which doesn't work well on tiny graphs), we should get 2 variants
262+
vg convert -g nesting/cyclic_ref_multiple_variants.gfa -p > cyclic_ref_multi.pg
263+
vg deconstruct cyclic_ref_multi.pg -p x -a -c 0 > cyclic_ref_multi.vcf
264+
is $(grep -v ^# cyclic_ref_multi.vcf | wc -l) 2 "cyclic reference with -a outputs variant for each reference traversal"
265+
rm -f cyclic_ref_multi.pg cyclic_ref_multi.vcf

0 commit comments

Comments
 (0)