Skip to content

Commit

Permalink
Add +split-vep -u option. Resolves #1508 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
pd3 committed Jun 16, 2021
1 parent 2e3f8c8 commit 3e1ec86
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plugins/split-vep.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ typedef struct
col2type_t *column2type;
int ncolumn2type;
int raw_vep_request; // raw VEP tag requested and will need subsetting
int allow_undef_tags;
}
args_t;

Expand Down Expand Up @@ -203,6 +204,7 @@ static const char *usage_text(void)
" (*) Primary transcripts have the field \"CANONICAL\" set to \"YES\"\n"
" -S, --severity -|FILE Pass \"-\" to print the default severity scale or FILE to override\n"
" the default scale\n"
" -u, --allow-undef-tags Print \".\" for undefined tags\n"
" -x, --drop-sites Drop sites with none of the consequences matching the severity specified by -s.\n"
" This switch is intended for use with VCF/BCF output (i.e. -f not given).\n"
"Common options:\n"
Expand Down Expand Up @@ -686,6 +688,7 @@ static void init_data(args_t *args)
if ( !args->column_str && !args->select ) error("Error: No %s field selected in the formatting expression and -s not given: a typo?\n",args->vep_tag);
args->convert = convert_init(args->hdr_out, NULL, 0, args->format_str);
if ( !args->convert ) error("Could not parse the expression: %s\n", args->format_str);
if ( args->allow_undef_tags ) convert_set_option(args->convert, allow_undef_tags, 1);
}
if ( args->filter_str )
{
Expand Down Expand Up @@ -1045,10 +1048,11 @@ int run(int argc, char **argv)
{"targets",1,0,'t'},
{"targets-file",1,0,'T'},
{"no-version",no_argument,NULL,2},
{"allow-undef-tags",no_argument,0,'u'},
{NULL,0,NULL,0}
};
int c;
while ((c = getopt_long(argc, argv, "o:O:i:e:r:R:t:T:lS:s:c:p:a:f:dA:x",loptions,NULL)) >= 0)
while ((c = getopt_long(argc, argv, "o:O:i:e:r:R:t:T:lS:s:c:p:a:f:dA:xu",loptions,NULL)) >= 0)
{
switch (c)
{
Expand All @@ -1068,6 +1072,7 @@ int run(int argc, char **argv)
case 'S': args->severity = optarg; break;
case 's': args->select = optarg; break;
case 'l': args->list_hdr = 1; break;
case 'u': args->allow_undef_tags = 1; break;
case 'e':
if ( args->filter_str ) error("Error: only one -i or -e expression can be given, and they cannot be combined\n");
args->filter_str = optarg; args->filter_logic |= FLT_EXCLUDE; break;
Expand Down

0 comments on commit 3e1ec86

Please sign in to comment.