Skip to content

Commit

Permalink
isec: Notify user about frequently forgotten -w
Browse files Browse the repository at this point in the history
  • Loading branch information
pd3 committed Feb 19, 2014
1 parent 54fdc61 commit 83620ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ sub test_cmd
print "$test:\n";
print "\t$args{cmd}\n";

my ($ret,$out) = _cmd("$args{cmd} 2>&1");
my ($ret,$out) = _cmd("$args{cmd}");
if ( $ret ) { failed($opts,$test); return; }
if ( $$opts{redo_outputs} && -e "$$opts{path}/$args{out}" )
{
Expand Down Expand Up @@ -282,7 +282,7 @@ sub test_vcf_isec2
}
my $files = join(' ',@files);
bgzip_tabix($opts,file=>$args{tab_in},suffix=>'tab',args=>'-s 1 -b 2 -e 3');
test_cmd($opts,%args,cmd=>"$$opts{bin}/bcftools isec $args{args} -t $$opts{tmp}/$args{tab_in}.tab.gz $files | grep -v ^##bcftools_isec");
test_cmd($opts,%args,cmd=>"$$opts{bin}/bcftools isec $args{args} -t $$opts{tmp}/$args{tab_in}.tab.gz $files 2>/dev/null | grep -v ^##bcftools_isec");
}
sub test_vcf_query
{
Expand Down
3 changes: 2 additions & 1 deletion vcfisec.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ void isec_vcf(args_t *args)
bcf_hdr_append_version(files->readers[args->iwrite].header,args->argc,args->argv,"bcftools_isec");
bcf_hdr_write(out_fh, files->readers[args->iwrite].header);
}
if ( !args->nwrite && !out_std && !args->prefix )
fprintf(stderr,"Note: -w option not given, printing list of sites...\n");

int n;
while ( (n=bcf_sr_next_line(files)) )
Expand Down Expand Up @@ -298,7 +300,6 @@ static void destroy_data(args_t *args)
static void usage(void)
{
fprintf(stderr, "About: Create intersections, unions and complements of VCF files.\n");
fprintf(stderr, " \n");
fprintf(stderr, "Usage: bcftools isec [options] <A.vcf.gz> <B.vcf.gz> ...\n");
fprintf(stderr, "Options:\n");
fprintf(stderr, " -c, --collapse <string> treat as identical records with <snps|indels|both|all|some|none>, see man page for details [none]\n");
Expand Down

0 comments on commit 83620ab

Please sign in to comment.