Skip to content

Commit cabda58

Browse files
committed
Make +af-dist -- -t AF the default
1 parent c66d628 commit cabda58

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

plugins/af-dist.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const char *usage(void)
6464
"Plugin options:\n"
6565
" -d, --dev-bins <list> AF deviation bins\n"
6666
" -p, --prob-bins <list> probability distribution bins\n"
67-
" -t, --af-tag <tag> VCF INFO tag with population AF\n"
67+
" -t, --af-tag <tag> VCF INFO tag to use [AF]\n"
6868
"\n"
6969
"Default binning:\n"
7070
" -d: 0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1\n"
@@ -80,6 +80,7 @@ int init(int argc, char **argv, bcf_hdr_t *in, bcf_hdr_t *out)
8080
char *dev_bins = "0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1";
8181
char *prob_bins = "0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1";
8282
args->hdr = in;
83+
args->af_tag = "AF";
8384
static struct option loptions[] =
8485
{
8586
{"dev-bins",1,0,'d'},
@@ -100,7 +101,6 @@ int init(int argc, char **argv, bcf_hdr_t *in, bcf_hdr_t *out)
100101
default: error("%s", usage()); break;
101102
}
102103
}
103-
if ( !args->af_tag ) error("Expected the -t option\n");
104104

105105
args->dev_bins = bin_init(dev_bins,0,1);
106106
int nbins = bin_get_size(args->dev_bins);
@@ -182,6 +182,7 @@ void destroy(void)
182182
free(args->prob_dist);
183183
free(args->gt);
184184
free(args->af);
185+
free(args);
185186
}
186187

187188

0 commit comments

Comments
 (0)