Skip to content

Commit

Permalink
Replace "norm --rm-dup none" with "--rm-dup exact". Resolves samtools…
Browse files Browse the repository at this point in the history
  • Loading branch information
pd3 committed Oct 22, 2019
1 parent f360478 commit cbeca0c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions doc/bcftools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1911,9 +1911,9 @@ the *<<fasta_ref,--fasta-ref>>* option is supplied.
<http://samtools.github.io/bcftools/howtos/plugin.af-dist.html> and
<http://samtools.github.io/bcftools/howtos/plugin.fixref.html>.)

*-d, --rm-dup* 'snps'|'indels'|'both'|'all'|'none'::
If a record is present multiple times, output only the first instance,
see *--collapse* in *<<common_options,Common Options>>*.
*-d, --rm-dup* 'snps'|'indels'|'both'|'all'|'exact'::
If a record is present multiple times, output only the first instance.
See also *--collapse* in *<<common_options,Common Options>>*.

*-D, --remove-duplicates*::
If a record is present in multiple files, output only the first instance.
Expand Down
2 changes: 2 additions & 0 deletions test/test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@
test_vcf_norm($opts,in=>'norm.rmdup',out=>'norm.rmdup.3.out',args=>'-d both');
test_vcf_norm($opts,in=>'norm.rmdup',out=>'norm.rmdup.4.out',args=>'-d all');
test_vcf_norm($opts,in=>'norm.rmdup',out=>'norm.rmdup.5.out',args=>'-d none');
test_vcf_norm($opts,in=>'norm.rmdup',out=>'norm.rmdup.5.out',args=>'-d exact');
test_vcf_norm($opts,in=>'norm.rmdup.2',out=>'norm.rmdup.2.1.out',args=>'-d none');
test_vcf_norm($opts,in=>'norm.rmdup.2',out=>'norm.rmdup.2.1.out',args=>'-d exact');
test_vcf_norm($opts,in=>'norm.rmdup.2',out=>'norm.rmdup.2.1.out',args=>'-d indels');
test_vcf_norm($opts,in=>'norm.rmdup.2',out=>'norm.rmdup.2.2.out',args=>'-d any');
test_vcf_norm($opts,in=>'norm.rmdup.2',out=>'norm.rmdup.2.2.out',args=>'-d both');
Expand Down
3 changes: 2 additions & 1 deletion vcfnorm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1848,7 +1848,7 @@ static void usage(void)
fprintf(stderr, "Options:\n");
fprintf(stderr, " -c, --check-ref <e|w|x|s> check REF alleles and exit (e), warn (w), exclude (x), or set (s) bad sites [e]\n");
fprintf(stderr, " -D, --remove-duplicates remove duplicate lines of the same type.\n");
fprintf(stderr, " -d, --rm-dup <type> remove duplicate snps|indels|both|all|none\n");
fprintf(stderr, " -d, --rm-dup <type> remove duplicate snps|indels|both|all|exact\n");
fprintf(stderr, " -f, --fasta-ref <file> reference sequence (MANDATORY)\n");
fprintf(stderr, " -m, --multiallelics <-|+>[type] split multiallelics (-) or join biallelics (+), type: snps|indels|both|any [both]\n");
fprintf(stderr, " --no-version do not append version and command line to the header\n");
Expand Down Expand Up @@ -1915,6 +1915,7 @@ int main_vcfnorm(int argc, char *argv[])
else if ( !strcmp("all",optarg) ) args->rmdup = BCF_SR_PAIR_ANY;
else if ( !strcmp("any",optarg) ) args->rmdup = BCF_SR_PAIR_ANY;
else if ( !strcmp("none",optarg) ) args->rmdup = BCF_SR_PAIR_EXACT;
else if ( !strcmp("exact",optarg) ) args->rmdup = BCF_SR_PAIR_EXACT;
else error("The argument to -d not recognised: %s\n", optarg);
break;
case 'm':
Expand Down

0 comments on commit cbeca0c

Please sign in to comment.