Skip to content

Commit

Permalink
Fixes in +mendelian2 command line parsing
Browse files Browse the repository at this point in the history
the `-p` and `-P` options were not functioning, and obsolete options
from +mendelian were copy-and-pasted

Resolves #1906
  • Loading branch information
pd3 committed Apr 11, 2023
1 parent 22cfb6e commit 2d50d74
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
5 changes: 5 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ Changes affecting specific commands:

- Allow `--mark-ins` and `--mark-snv` with a character, similarly to `--mark-del`

* bcftools +mendelian2

- Fix in command line argument parsing, the `-p` and `-P` options were not
functioning (#1906)

* bcftools merge

- New `-M, --missing-rules` option to control the behavior of merging of vector tags
Expand Down
10 changes: 3 additions & 7 deletions plugins/mendelian2.c
Original file line number Diff line number Diff line change
Expand Up @@ -781,13 +781,9 @@ int run(int argc, char **argv)

static struct option loptions[] =
{
{"trio",1,0,'t'},
{"trio-file",1,0,'T'},
{"ped",1,0,'p'},
{"delete",0,0,'d'},
{"list",1,0,'l'},
{"pfm",1,0,'p'},
{"ped",1,0,'P'},
{"mode",1,0,'m'},
{"count",0,0,'c'},
{"rules",1,0,1},
{"rules-file",1,0,2},
{"output",required_argument,NULL,'o'},
Expand All @@ -805,7 +801,7 @@ int run(int argc, char **argv)
};
int c;
char *tmp;
while ((c = getopt_long(argc, argv, "?ht:T:p:m:o:O:i:e:t:T:r:R:",loptions,NULL)) >= 0)
while ((c = getopt_long(argc, argv, "?hp:P:m:o:O:i:e:t:T:r:R:",loptions,NULL)) >= 0)
{
switch (c)
{
Expand Down

0 comments on commit 2d50d74

Please sign in to comment.