11/* The MIT License
22
3- Copyright (c) 2016-2017 Genome Research Ltd.
3+ Copyright (c) 2016-2022 Genome Research Ltd.
44
55 Author: Petr Danecek <[email protected] > 6-
6+
77 Permission is hereby granted, free of charge, to any person obtaining a copy
88 of this software and associated documentation files (the "Software"), to deal
99 in the Software without restriction, including without limitation the rights
1010 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1111 copies of the Software, and to permit persons to whom the Software is
1212 furnished to do so, subject to the following conditions:
13-
13+
1414 The above copyright notice and this permission notice shall be included in
1515 all copies or substantial portions of the Software.
16-
16+
1717 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1818 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1919 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -53,10 +53,12 @@ const char *about(void)
5353
5454const char * usage (void )
5555{
56- return
56+ return
5757 "\n"
58- "About: Collect AF deviation stats and GT probability distribution\n"
59- " given AF and assuming HWE\n"
58+ "About: Collect AF deviation stats and GT probability distribution given AF and\n"
59+ " assuming HWE. Only non-reference genotypes with known allele frequency\n"
60+ " at the site are considered, their probabilities are 2*AF*(1-AF) for RA\n"
61+ " and AF**2 for the AA genotype.\n"
6062 "Usage: bcftools +af-dist [General Options] -- [Plugin Options]\n"
6163 "Options:\n"
6264 " run \"bcftools plugin\" for a list of common options\n"
@@ -71,7 +73,7 @@ const char *usage(void)
7173 " -d: 0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1\n"
7274 " -p: 0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1\n"
7375 "Example:\n"
74- " bcftools +af-tag file.bcf -- -t EUR_AF -p bins.txt\n"
76+ " bcftools +af-dist file.bcf -- -t EUR_AF -p bins.txt\n"
7577 "\n" ;
7678}
7779
@@ -94,9 +96,9 @@ int init(int argc, char **argv, bcf_hdr_t *in, bcf_hdr_t *out)
9496 int c ;
9597 while ((c = getopt_long (argc , argv , "?ht:d:p:l:" ,loptions ,NULL )) >= 0 )
9698 {
97- switch (c )
99+ switch (c )
98100 {
99- case 'l' :
101+ case 'l' :
100102 {
101103 char * a ,* b ;
102104 args -> list_min = strtod (optarg ,& a );
0 commit comments