Skip to content

Commit 1ed3deb

Browse files
committed
Test case for htslib/1620 and htslib/1630
samtools/htslib#1620 samtools/htslib#1630
1 parent 4d0d262 commit 1ed3deb

File tree

8 files changed

+75
-0
lines changed

8 files changed

+75
-0
lines changed

test/test.pl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,18 @@
286286
run_test(\&test_vcf_norm,$opts,in=>'norm.phased-split',out=>'norm.phased-split.1.out',args=>'-m -any');
287287
run_test(\&test_vcf_norm,$opts,in=>'norm.phased-join',out=>'norm.phased-join.1.out',args=>'-m +any');
288288
run_test(\&test_vcf_norm,$opts,in=>'norm.symbolic',fai=>'norm.symbolic',out=>'norm.symbolic.1.out',args=>'--old-rec-tag ORI');
289+
run_test(\&test_vcf_view,$opts,in=>'weird-chr-names',out=>'weird-chr-names.1.out',args=>'',reg=>'-r 1');
290+
run_test(\&test_vcf_view,$opts,in=>'weird-chr-names',out=>'weird-chr-names.1.out',args=>'',reg=>'-r 1:1-2');
291+
run_test(\&test_vcf_view,$opts,in=>'weird-chr-names',out=>'weird-chr-names.1.out',args=>'',reg=>'-r 1:1,1:2');
292+
run_test(\&test_vcf_view,$opts,in=>'weird-chr-names',out=>'weird-chr-names.2.out',args=>'',reg=>'-r 1:1-1');
293+
run_test(\&test_vcf_view,$opts,in=>'weird-chr-names',out=>'weird-chr-names.3.out',args=>'',reg=>'-r {1:1}');
294+
run_test(\&test_vcf_view,$opts,in=>'weird-chr-names',out=>'weird-chr-names.3.out',args=>'',reg=>'-r {1:1}:1-2');
295+
run_test(\&test_vcf_view,$opts,in=>'weird-chr-names',out=>'weird-chr-names.3.out',args=>'',reg=>'-r {1:1}:1,{1:1}:2');
296+
run_test(\&test_vcf_view,$opts,in=>'weird-chr-names',out=>'weird-chr-names.4.out',args=>'',reg=>'-r {1:1}:1-1');
297+
run_test(\&test_vcf_view,$opts,in=>'weird-chr-names',out=>'weird-chr-names.5.out',args=>'',reg=>'-r {1:1-1}');
298+
run_test(\&test_vcf_view,$opts,in=>'weird-chr-names',out=>'weird-chr-names.5.out',args=>'',reg=>'-r {1:1-1}:1-2');
299+
run_test(\&test_vcf_view,$opts,in=>'weird-chr-names',out=>'weird-chr-names.5.out',args=>'',reg=>'-r {1:1-1}:1,{1:1-1}:2');
300+
run_test(\&test_vcf_view,$opts,in=>'weird-chr-names',out=>'weird-chr-names.6.out',args=>'',reg=>'-r {1:1-1}:1-1');
289301
run_test(\&test_vcf_view,$opts,in=>'view',out=>'view.1.out',args=>'-aUc1 -C1 -s NA00002 -v snps',reg=>'');
290302
run_test(\&test_vcf_view,$opts,in=>'view',out=>'view.2.out',args=>'-f PASS -Xks NA00003',reg=>'-r20,Y');
291303
run_test(\&test_vcf_view,$opts,in=>'view',out=>'view.3.out',args=>'-xs NA00003',reg=>'');

test/weird-chr-names.1.out

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
##fileformat=VCFv4.3
2+
##FILTER=<ID=PASS,Description="All filters passed">
3+
##reference=ref.fa
4+
##contig=<ID=1>
5+
##contig=<ID=1:1>
6+
##contig=<ID=1:1-1>
7+
#CHROM POS ID REF ALT QUAL FILTER INFO
8+
1 1 . C T . . .
9+
1 2 . C T . . .

test/weird-chr-names.2.out

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
##fileformat=VCFv4.3
2+
##FILTER=<ID=PASS,Description="All filters passed">
3+
##reference=ref.fa
4+
##contig=<ID=1>
5+
##contig=<ID=1:1>
6+
##contig=<ID=1:1-1>
7+
#CHROM POS ID REF ALT QUAL FILTER INFO
8+
1 1 . C T . . .

test/weird-chr-names.3.out

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
##fileformat=VCFv4.3
2+
##FILTER=<ID=PASS,Description="All filters passed">
3+
##reference=ref.fa
4+
##contig=<ID=1>
5+
##contig=<ID=1:1>
6+
##contig=<ID=1:1-1>
7+
#CHROM POS ID REF ALT QUAL FILTER INFO
8+
1:1 1 . C T . . .
9+
1:1 2 . C T . . .

test/weird-chr-names.4.out

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
##fileformat=VCFv4.3
2+
##FILTER=<ID=PASS,Description="All filters passed">
3+
##reference=ref.fa
4+
##contig=<ID=1>
5+
##contig=<ID=1:1>
6+
##contig=<ID=1:1-1>
7+
#CHROM POS ID REF ALT QUAL FILTER INFO
8+
1:1 1 . C T . . .

test/weird-chr-names.5.out

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
##fileformat=VCFv4.3
2+
##FILTER=<ID=PASS,Description="All filters passed">
3+
##reference=ref.fa
4+
##contig=<ID=1>
5+
##contig=<ID=1:1>
6+
##contig=<ID=1:1-1>
7+
#CHROM POS ID REF ALT QUAL FILTER INFO
8+
1:1-1 1 . C T . . .
9+
1:1-1 2 . C T . . .

test/weird-chr-names.6.out

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
##fileformat=VCFv4.3
2+
##FILTER=<ID=PASS,Description="All filters passed">
3+
##reference=ref.fa
4+
##contig=<ID=1>
5+
##contig=<ID=1:1>
6+
##contig=<ID=1:1-1>
7+
#CHROM POS ID REF ALT QUAL FILTER INFO
8+
1:1-1 1 . C T . . .

test/weird-chr-names.vcf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
##fileformat=VCFv4.3
2+
##reference=ref.fa
3+
##contig=<ID=1>
4+
##contig=<ID=1:1>
5+
##contig=<ID=1:1-1>
6+
#CHROM POS ID REF ALT QUAL FILTER INFO
7+
1 1 . C T . . .
8+
1 2 . C T . . .
9+
1:1 1 . C T . . .
10+
1:1 2 . C T . . .
11+
1:1-1 1 . C T . . .
12+
1:1-1 2 . C T . . .

0 commit comments

Comments
 (0)