Debian Codegraph @

debian/plink2.1

raw
1 .TH PLINK "1" "March 2020" "PLINK v2.00a3 64-bit (9 Apr 2020)" "User Commands"
2 .SH NAME
3 PLINK \- whole genome SNP analysis
4 .SH DESCRIPTION
5 PLINK v2.00a3 64\-bit (9 Apr 2020) www.cog\-genomics.org/plink/2.0/
6 (C) 2005\-2020 Shaun Purcell, Christopher Chang GNU General Public License v3
7 .PP
8 In the command line flag definitions that follow,
9 .IP
10 * <angle brackets> denote a required parameter, where the text between the
11 .IP
12 angle brackets describes its nature.
13 .TP
14 * ['square brackets + single\-quotes'] denotes an optional modifier.
15 Use the
16 .IP
17 EXACT text in the quotes.
18 .IP
19 * [{bar|separated|braced|bracketed|values}] denotes a collection of mutually
20 .TP
21 exclusive optional modifiers (again, the exact text must be used).
22 When
23 .IP
24 there are no outer square brackets, one of the choices must be selected.
25 .IP
26 * ['quoted_text='<description of value>] denotes an optional modifier that
27 .IP
28 must begin with the quoted text, and be followed by a value with no
29 whitespace in between. '|' may also be used here to indicate mutually
30 exclusive options.
31 .IP
32 * [square brackets without quotes or braces] denote an optional parameter,
33 .IP
34 where the text between the brackets describes its nature.
35 .IP
36 * An ellipsis (...) indicates that you may enter multiple arguments of the
37 .IP
38 specified type.
39 .IP
40 * A "column set descriptor" is either
41 .IP
42 1. a comma\-separated sequence of column set names; this is interpreted as
43 .IP
44 the full list of column sets to include.
45 .IP
46 2. a comma\-separated sequence of column set names, all preceded by '+' or
47 .IP
48 \&'\-'; this is interpreted as a list of changes to the default.
49 .IP
50 plink2 <input flag(s)...> [command flag(s)...] [other flag(s)...]
51 plink2 \fB\-\-help\fR [flag name(s)...]
52 .PP
53 Most PLINK runs require exactly one main input fileset. The following flags
54 are available for defining its form and location:
55 .TP
56 \fB\-\-pfile\fR <prefix> ['vzs']
57 : Specify .pgen + .pvar[.zst] + .psam prefix.
58 .TP
59 \fB\-\-pgen\fR <filename>
60 : Specify full name of .pgen/.bed file.
61 .TP
62 \fB\-\-pvar\fR <filename>
63 : Specify full name of .pvar/.bim file.
64 .TP
65 \fB\-\-psam\fR <filename>
66 : Specify full name of .psam/.fam file.
67 .TP
68 \fB\-\-bfile\fR
69 <prefix> ['vzs'] : Specify .bed + .bim[.zst] + .fam prefix.
70 .HP
71 \fB\-\-bpfile\fR <prefix> ['vzs'] : Specify .pgen + .bim[.zst] + .fam prefix.
72 .TP
73 \fB\-\-keep\-autoconv\fR ['vzs']
74 : When importing non\-PLINK\-binary data, don't
75 delete autogenerated fileset at end of run.
76 .TP
77 \fB\-\-no\-fid\fR
78 : .fam file does not contain column 1 (family ID).
79 .TP
80 \fB\-\-no\-parents\fR
81 : .fam file does not contain columns 3\-4 (parents).
82 .TP
83 \fB\-\-no\-sex\fR
84 : .fam file does not contain column 5 (sex).
85 .HP
86 \fB\-\-vcf\fR <filename> ['dosage='<field>]
87 .HP
88 \fB\-\-bcf\fR <filename> ['dosage='<field>] :
89 .IP
90 Specify full name of .vcf{|.gz|.zst} or BCF2 file to import.
91 * These can be used with \fB\-\-psam\fR/\-\-fam.
92 * By default, dosage information is not imported. To import the GP field
93 .IP
94 (must be VCFv4.3\-style 0..1, one probability per possible genotype), add
95 \&'dosage=GP' (or 'dosage=GP\-force', see below). To import Minimac3\-style
96 DS+HDS phased dosage, add 'dosage=HDS'. 'dosage=DS' (or anything else
97 for now) causes the named field to be interpreted as a Minimac3\-style
98 dosage.
99 Note that, in the dosage=GP case, PLINK 2 collapses the probabilities
100 down to dosages; you cannot use PLINK 2 to losslessly convert VCF
101 FORMAT:GP data to e.g. BGEN format. To make this more obvious, PLINK 2
102 now errors out when dosage=GP is used on a file with a FORMAT:DS header
103 line and \fB\-\-import\-dosage\-certainty\fR wasn't specified, since dosage=DS
104 extracts the same information more quickly in this situation. You can
105 suppress this error with 'dosage=GP\-force'.
106 In all of these cases, hardcalls are regenerated from scratch from the
107 dosages. As a consequence, variants with no GT field can now be
108 imported; they will be assumed to contain only diploid calls when HDS is
109 also absent.
110 .HP
111 \fB\-\-data\fR <filename prefix> <REF/ALT mode> ['gzs']
112 .HP
113 \fB\-\-bgen\fR <filename> <REF/ALT mode> ['snpid\-chr']
114 .HP
115 \fB\-\-gen\fR <filename> <REF/ALT mode>
116 .HP
117 \fB\-\-sample\fR <filename> :
118 .TP
119 Specify an Oxford\-format dataset to import.
120 \fB\-\-data\fR specifies a .gen[.zst]
121 .IP
122 + .sample pair, while \fB\-\-bgen\fR specifies a BGEN v1.1+ file.
123 * If a BGEN v1.2+ file contains sample IDs, it may be imported without a
124 .IP
125 companion .sample file.
126 .IP
127 * With 'snpid\-chr', chromosome codes are read from the 'SNP ID' field
128 .IP
129 instead of the usual chromosome field.
130 .IP
131 * The following REF/ALT modes are supported:
132 .IP
133 \&'ref\-first': The first allele for each variant is REF.
134 \&'ref\-last': The last allele for each variant is REF.
135 \&'ref\-unknown': The last allele for each variant is treated as
136 .IP
137 provisional\-REF.
138 .HP
139 \fB\-\-haps\fR <filename> [{ref\-first | ref\-last}]
140 .HP
141 \fB\-\-legend\fR <filename> <chr code> :
142 .IP
143 Specify .haps [+ .legend] file(s) to import.
144 * When \fB\-\-legend\fR is specified, it's assumed that the \fB\-\-haps\fR file doesn't
145 .IP
146 contain header columns.
147 .TP
148 * On chrX, the second male column may contain dummy '\-' entries.
149 (However,
150 .IP
151 PLINK 2 currently cannot handle omitted male columns.)
152 .IP
153 * If not used with \fB\-\-sample\fR, new sample IDs are of the form 'per#/per#'.
154 .TP
155 \fB\-\-map\fR <filename>
156 : Specify full name of .map file.
157 .HP
158 \fB\-\-import\-dosage\fR <allele dosage file> ['noheader'] ['id\-delim='<char>]
159 .IP
160 ['skip0='<i>] ['skip1='<j>] ['skip2='<k>] ['dose1']
161 ['format='<m>] [{ref\-first | ref\-last}]
162 ['single\-chr='<code>] ['chr\-col\-num='<#>]
163 ['pos\-col\-num='<#>] :
164 .IP
165 Specify PLINK 1.x\-style dosage file to import.
166 * You must also specify a companion .psam/.fam file.
167 * By default, PLINK assumes that the file contains a header line, which has
168 .IP
169 \&'SNP' in (1\-based) column i+1, 'A1' in column i+j+2, 'A2' in column
170 i+j+3, and sample FID/IIDs starting from column i+j+k+4. (i/j/k are
171 normally zero, but can be changed with 'skip0', 'skip1', and 'skip2'
172 respectively. FID/IID are normally assumed to be separate tokens, but if
173 they're merged into a single token you can specify the delimiter with
174 \&'id\-delim='.) If such a header line is not present, use the 'noheader'
175 modifier; samples will then be assumed to appear in the same order as
176 they do in the .psam/.fam file.
177 .TP
178 * You may specify a companion .map file.
179 If you do not,
180 .IP
181 * 'single\-chr=' can be used to specify that all variants are on the named
182 .TP
183 chromosome.
184 Otherwise, you can use 'chr\-col\-num=' to read chromosome
185 .IP
186 codes from the given (1\-based) column number.
187 .IP
188 * 'pos\-col\-num=' causes bp coordinates to be read from the given column
189 .IP
190 number.
191 .IP
192 * The 'format=' modifier lets you specify the number of values used to
193 .TP
194 represent each dosage.
195 \&'format=1' normally indicates a single 0..2 A1
196 .TP
197 expected count; 'dose1' modifies this to a 0..1 frequency.
198 \&'format=2'
199 .IP
200 indicates a 0..1 homozygous A1 likelihood followed by a 0..1 het
201 likelihood. 'format=3' indicates 0..1 hom A1, 0..1 het, 0..1 hom A2.
202 \&'format=infer' (the default) infers the format from the number of columns
203 in the first nonheader line.
204 .HP
205 \fB\-\-dummy\fR <sample ct> <SNP ct> [missing dosage freq] [missing pheno freq]
206 .IP
207 [{acgt | 1234 | 12}] ['pheno\-ct='<count>] ['scalar\-pheno']
208 ['dosage\-freq='<rate>]
209 .IP
210 This generates a fake input dataset with the specified number of samples
211 and SNPs.
212 * By default, the missing dosage and phenotype frequencies are zero.
213 .IP
214 These can be changed by providing 3rd and 4th numeric arguments.
215 .IP
216 * By default, allele codes are As and Bs; this can be changed with the
217 .IP
218 \&'acgt', '1234', or '12' modifier.
219 .TP
220 * By default, one binary phenotype is generated.
221 \&'pheno\-ct=' can be used
222 .IP
223 to change the number of phenotypes, and 'scalar\-pheno' causes these
224 phenotypes to be normally distributed scalars.
225 .TP
226 * By default, all (nonmissing) dosages are in {0,1,2}.
227 To make some of
228 .TP
229 them take on decimal values, use 'dosage\-freq='.
230 (These dosages are
231 .IP
232 affected by \fB\-\-hard\-call\-threshold\fR and \fB\-\-dosage\-erase\-threshold\fR.)
233 .TP
234 \fB\-\-fa\fR <filename>
235 : Specify full name of reference FASTA file.
236 .PP
237 Output files have names of the form 'plink2.<extension>' by default. You can
238 change the 'plink2' prefix with
239 .TP
240 \fB\-\-out\fR <prefix>
241 : Specify prefix for output files.
242 .PP
243 Most runs also require at least one of the following commands:
244 .HP
245 \fB\-\-rm\-dup\fR [mode] ['list']
246 .IP
247 Remove all but one instance of each duplicate\-ID variant (ignoring the
248 missing ID), and (with the 'list' modifier) write a list of duplicated IDs
249 to <output prefix>.rmdup.list.
250 The following modes of operation are supported:
251 * 'error' (default) causes this to error out when there's a genotype data
252 .TP
253 or other mismatch between the records.
254 A list of affected IDs is written
255 .IP
256 to <output prefix>.rmdup.mismatch.
257 .IP
258 * 'retain\-mismatch' causes all instances of a duplicate\-ID variant to be
259 .IP
260 retained when there's a genotype data or variant info mismatch; otherwise
261 one instance is kept. The .rmdup.mismatch file is also written.
262 .IP
263 * 'exclude\-mismatch' removes all instances of duplicate\-ID mismatched
264 .IP
265 variants instead.
266 .IP
267 * 'exclude\-all' causes all instances of duplicate\-ID variants to be
268 .IP
269 removed, even when the actual records are identical.
270 .IP
271 * 'force\-first' causes only the first instance of duplicate\-ID variants to
272 .IP
273 be kept, under all circumstances.
274 .HP
275 \fB\-\-make\-pgen\fR ['vzs'] ['format='<code>] ['trim\-alts'] ['erase\-phase']
276 .IP
277 ['erase\-dosage'] ['pvar\-cols='<col set descriptor>]
278 ['psam\-cols='<col set descriptor>]
279 .HP
280 \fB\-\-make\-bpgen\fR ['vzs'] ['format='<code>] ['trim\-alts'] ['erase\-phase']
281 .IP
282 ['erase\-dosage']
283 .HP
284 \fB\-\-make\-bed\fR ['vzs'] ['trim\-alts']
285 .IP
286 Create a new PLINK 2 binary fileset (\fB\-\-make\-pgen\fR = .pgen + .pvar[.zst] +
287 \&.psam, \fB\-\-make\-bpgen\fR = .pgen + .bim[.zst] + .fam).
288 * Unlike the automatic text\-to\-binary converters (which only heed
289 .IP
290 chromosome filters), this supports all of PLINK's filtering flags.
291 .IP
292 * The 'vzs' modifier causes the variant file (.pvar/.bim) to be
293 .IP
294 Zstd\-compressed.
295 .IP
296 * The 'format' modifier requests an uncompressed fixed\-variant\-width .pgen
297 .TP
298 file.
299 (These do not directly support multiallelic variants.) The
300 .IP
301 following format code is currently supported:
302 .IP
303 2: just like .bed, except with an extended (12\-byte instead of 3\-byte)
304 .IP
305 header containing variant/sample counts, and rotated genotype codes
306 (00 = hom ref, 01 = het, 10 = hom alt, 11 = missing).
307 .IP
308 * The 'erase\-phase' and 'erase\-dosage' modifiers prevent phase and dosage
309 .IP
310 information from being written to the new .pgen.
311 .IP
312 * The first five columns of a .pvar file are always #CHROM/POS/ID/REF/ALT.
313 .IP
314 Supported optional .pvar column sets are:
315 .IP
316 xheader: All ## header lines (yeah, this is technically not a column),
317 .IP
318 except for possibly FILTER/INFO definitions when those
319 column(s) have been removed. Without this, only the #CHROM
320 header line is kept.
321 .IP
322 vcfheader: xheader, with additions to make it a valid VCF header.
323 maybequal: QUAL. Omitted if all remaining values are missing.
324 qual: Force QUAL column to be written even when empty.
325 maybefilter: FILTER. Omitted if all remaining values are missing.
326 filter: Force FILTER column to be written even when empty.
327 maybeinfo: INFO. Omitted if all remaining values are missing, or if
328 .IP
329 INFO:PR is the only subfield.
330 .IP
331 info: Force INFO column to be written.
332 maybecm: Centimorgan coordinate. Omitted if all remaining values = 0.
333 cm: Force CM column to be written even when empty.
334 .IP
335 The default is xheader,maybequal,maybefilter,maybeinfo,maybecm.
336 .IP
337 * Supported column sets for the .psam file are:
338 .TP
339 maybefid: Family ID, '0' = missing.
340 Omitted if all values missing.
341 .IP
342 fid: Force FID column to be written even when empty.
343 maybesid: Source ID, '0' = missing. Omitted if all values missing.
344 sid: Force SID column to be written even when empty.
345 maybeparents: Father and mother IIDs. Omitted if all values missing.
346 parents: Force PAT and MAT columns to be written even when empty.
347 sex: '1' = male, '2' = female, 'NA' = missing.
348 pheno1: First active phenotype. If none, all column entries are set to
349 .IP
350 the \fB\-\-output\-missing\-phenotype\fR string.
351 .TP
352 phenos: All active phenotypes, if any.
353 (Can be combined with pheno1 to
354 .IP
355 force at least one phenotype column to be written.)
356 .IP
357 The default is maybefid,maybesid,maybeparents,sex,phenos.
358 .HP
359 \fB\-\-make\-just\-pvar\fR ['zs'] ['cols='<column set descriptor>]
360 .HP
361 \fB\-\-make\-just\-psam\fR ['cols='<column set descriptor>]
362 .HP
363 \fB\-\-make\-just\-bim\fR ['zs']
364 .HP
365 \fB\-\-make\-just\-fam\fR
366 .IP
367 Variants of \fB\-\-make\-pgen\fR/\-\-make\-bed which only write a new variant or sample
368 file. These don't always require an input genotype file.
369 USE THESE CAUTIOUSLY. It is very easy to desynchronize your binary
370 genotype data and your sample/variant indexes if you use these commands
371 improperly. If you have any doubt, stick with \fB\-\-make\-[b]pgen\fR/\-\-make\-bed.
372 .HP
373 \fB\-\-export\fR <output format(s)...> [{01 | 12}] ['bgz'] ['id\-delim='<char>]
374 .IP
375 ['id\-paste='<column set descriptor>] ['include\-alt']
376 ['omit\-nonmale\-y'] ['spaces'] ['vcf\-dosage='<field>] ['ref\-first']
377 ['bits='<#>]
378 .TP
379 Create a new fileset with all filters applied.
380 The following output
381 .IP
382 formats are supported:
383 (actually, only A, AD, A\-transpose, bcf, bgen\-1.x, haps, hapslegend,
384 ind\-major\-bed, oxford, and vcf are implemented for now)
385 * '23': 23andMe 4\-column format. This can only be used on a single
386 .IP
387 sample's data (\fB\-\-keep\fR may be handy), and does not support
388 multicharacter allele codes.
389 .IP
390 * 'A': Sample\-major additive (0/1/2) coding, suitable for loading from R.
391 .IP
392 If you need uncounted alleles to be named in the header line, add
393 the 'include\-alt' modifier.
394 .IP
395 * 'AD': Sample\-major additive (0/1/2) + dominant (het=1/hom=0) coding.
396 .IP
397 Also supports 'include\-alt'.
398 .IP
399 * 'A\-transpose': Variant\-major 0/1/2.
400 * 'beagle': Unphased per\-autosome .dat and .map files, readable by early
401 .IP
402 BEAGLE versions.
403 .IP
404 * 'beagle\-nomap': Single .beagle.dat file.
405 * 'bgen\-1.x': Oxford\-format .bgen + .sample. For v1.2/v1.3, sample
406 .IP
407 identifiers are stored in the .bgen (with id\-delim and
408 id\-paste settings applied), and default precision is 16\-bit
409 (use the 'bits' modifier to reduce this).
410 .IP
411 * 'bimbam': Regular BIMBAM format.
412 * 'bimbam\-1chr': BIMBAM format, with a two\-column .pos.txt file. Does not
413 .IP
414 support multiple chromosomes.
415 .IP
416 * 'fastphase': Per\-chromosome fastPHASE files, with
417 .IP
418 \&.chr\-<chr #>.phase.inp filename extensions.
419 .TP
420 * 'fastphase\-1chr': Single .phase.inp file.
421 Does not support
422 .IP
423 multiple chromosomes.
424 .TP
425 * 'haps', 'hapslegend': Oxford\-format .haps + .sample[ + .legend].
426 All
427 .TP
428 data must be biallelic and phased.
429 When the 'bgz'
430 .TP
431 modifier is present, the .haps file is
432 block\-gzipped.
433 .IP
434 * 'HV': Per\-chromosome Haploview files, with .chr\-<chr #>{.ped,.info}
435 .IP
436 filename extensions.
437 .TP
438 * 'HV\-1chr': Single Haploview .ped + .info file pair.
439 Does not support
440 .IP
441 multiple chromosomes.
442 .IP
443 * 'ind\-major\-bed': PLINK 1 sample\-major .bed (+ .bim + .fam).
444 * 'lgen': PLINK 1 long\-format (.lgen + .fam + .map), loadable with \fB\-\-lfile\fR.
445 * 'lgen\-ref': .lgen + .fam + .map + .ref, loadable with \fB\-\-lfile\fR +
446 .IP
447 \fB\-\-reference\fR.
448 .TP
449 * 'list': Single genotype\-based list, up to 4 lines per variant.
450 To omit
451 .IP
452 nonmale genotypes on the Y chromosome, add the 'omit\-nonmale\-y'
453 modifier.
454 .IP
455 * 'rlist': .rlist + .fam + .map fileset, where the .rlist file is a
456 .IP
457 genotype\-based list which omits the most common genotype for
458 each variant. Also supports 'omit\-nonmale\-y'.
459 .TP
460 * 'oxford': Oxford\-format .gen + .sample.
461 When the 'bgz' modifier is
462 .IP
463 present, the .gen file is block\-gzipped.
464 .IP
465 * 'ped': PLINK 1 sample\-major (.ped + .map), loadable with \fB\-\-file\fR.
466 * 'compound\-genotypes': Same as 'ped', except that the space between each
467 .IP
468 pair of same\-variant allele codes is removed.
469 .IP
470 * 'structure': Structure\-format.
471 * 'transpose': PLINK 1 variant\-major (.tped + .tfam), loadable with
472 .IP
473 \fB\-\-tfile\fR.
474 .TP
475 * 'vcf',
476 : VCF (default version 4.3). If PAR1 and PAR2 are present,
477 .TP
478 \&'vcf\-4.2',
479 they are automatically merged with chrX, with proper
480 .TP
481 \&'bcf',
482 handling of chromosome codes and male ploidy.
483 .TP
484 \&'bcf\-4.2'
485 When the 'bgz' modifier is present, the VCF file is
486 block\-gzipped. (This always happens with BCF output.)
487 The 'id\-paste' modifier controls which .psam columns are
488 used to construct sample IDs (choices are maybefid, fid,
489 iid, maybesid, and sid; default is maybefid,iid,maybesid),
490 while the 'id\-delim' modifier sets the character between the
491 ID pieces (default '_').
492 Genotypes are always exported. If you want to export a
493 sites\-only VCF instead, see \fB\-\-make\-pgen\fR/\-\-make\-just\-pvar's
494 \&'vcfheader' column set.
495 Dosages are not exported unless the 'vcf\-dosage=' modifier
496 is present. The following five dosage export modes are
497 supported:
498 \&'GP': genotype posterior probabilities (v4.3 only).
499 \&'DS': Minimac3\-style dosages, omitted for hardcalls.
500 \&'DS\-force': Minimac3\-style dosages, never omit.
501 \&'HDS': Minimac3\-style phased dosages, omitted for hardcalls
502 .TP
503 and unphased calls.
504 Also includes 'DS' output.
505 .IP
506 \&'HDS\-force': Always report DS and HDS.
507 .IP
508 In addition,
509 * The '12' modifier causes alt1 alleles to be coded as '1' and ref alleles
510 .IP
511 to be coded as '2', while '01' maps alt1 \-> 0 and ref \-> 1.
512 .IP
513 * The 'spaces' modifier makes the output space\-delimited instead of
514 .IP
515 tab\-delimited, whenever both are permitted.
516 .IP
517 * For biallelic formats where it's unspecified whether the reference/major
518 .IP
519 allele should appear first or second, \fB\-\-export\fR defaults to second for
520 compatibility with PLINK 1.9. Use 'ref\-first' to change this.
521 (Note that this doesn't apply to the 'A', 'AD', and 'A\-transpose'
522 formats; use \fB\-\-export\-allele\fR to control which alleles are counted there.)
523 .HP
524 \fB\-\-freq\fR ['zs'] ['counts'] ['cols='<column set descriptor>] ['bins\-only']
525 .IP
526 ['refbins='<comma\-separated bin boundaries> | 'refbins\-file='<file>]
527 ['alt1bins='<comma\-separated bin boundaries> | 'alt1bins\-file='<file>]
528 .TP
529 Empirical allele frequency report.
530 By default, only founders are
531 .TP
532 considered.
533 Dosages are taken into account (e.g. heterozygous haploid
534 .IP
535 calls count as 0.5).
536 Supported column sets are:
537 .IP
538 chrom: Chromosome ID.
539 pos: Base\-pair coordinate.
540 (ID is always present, and positioned here.)
541 ref: Reference allele.
542 alt1: Alternate allele 1.
543 alt: All alternate alleles, comma\-separated.
544 reffreq: Reference allele frequency/dosage.
545 alt1freq: Alt1 frequency/dosage.
546 altfreq: Comma\-separated frequencies/dosages for all alternate alleles.
547 freq: Similar to altfreq, except ref is also included at the start.
548 eq: Comma\-separated <allele>=<freq> for all present alleles. (If no
549 .IP
550 alleles are present, the column contains a single '.'.)
551 .IP
552 eqz: Same as eq, except zero\-counts are included.
553 alteq/alteqz: Same as eq/eqz, except reference allele is omitted.
554 numeq: 0=<freq>,1=<freq>, etc. Zero\-counts are omitted.
555 altnumeq: Same as numeq, except reference allele is omitted.
556 machr2: Unphased MaCH imputation quality metric.
557 minimac3r2: Phased Minimac3 imputation quality.
558 nobs: Number of allele observations.
559 .IP
560 The default is chrom,ref,alt,altfreq,nobs.
561 Additional .afreq.{ref,alt1}.bins (or .acount.{ref,alt1}.bins with
562 \&'counts') file(s) are generated when 'refbins='/'refbins\-file=' or
563 \&'alt1bins='/'alt1bins\-file=' is present; these report the total number of
564 frequencies or counts in each left\-closed, right\-open interval. (If you
565 only want these histogram(s), and not the main report, add 'bins\-only'.)
566 .HP
567 \fB\-\-geno\-counts\fR ['zs'] ['cols='<column set descriptor>]
568 .IP
569 Variant\-based hardcall genotype count report (considering both alleles
570 simultaneously in the diploid case). Nonfounders are now included; use
571 \fB\-\-keep\-founders\fR if this is a problem. Heterozygous haploid calls are
572 treated as missing.
573 Supported column sets are:
574 .IP
575 chrom: Chromosome ID.
576 pos: Base\-pair coordinate.
577 (ID is always present, and positioned here.)
578 ref: Reference allele.
579 alt1: Alternate allele 1.
580 alt: All alternate alleles, comma\-separated.
581 homref: Homozygous\-ref count.
582 refalt1: Heterozygous ref\-alt1 count.
583 refalt: Comma\-separated het ref\-altx counts.
584 homalt1: Homozygous\-alt1 count.
585 altxy: Comma\-separated altx\-alty counts, in (1/1)\-(1/2)\-(2/2)\-(1/3)\-...
586 .IP
587 order.
588 .IP
589 xy: Similar to altxy, except the reference allele is treated as alt0,
590 .IP
591 and the sequence starts (0/0)\-(0/1)\-(1/1)\-(0/2)\-...
592 .IP
593 hapref: Haploid\-ref count.
594 hapalt1: Haploid\-alt1 count.
595 hapalt: Comma\-separated haploid\-altx counts.
596 hap: Similar to hapalts, except ref is also included at the start.
597 numeq: 0/0=<hom ref ct>,0/1=<het ref\-alt1>,1/1=<hom alt1>,...,0=<hap ref>
598 .TP
599 etc.
600 Zero\-counts are omitted. (If all genotypes are missing, the
601 .IP
602 column contains a single '.'.)
603 .IP
604 missing: Number of missing genotypes.
605 nobs: Number of (nonmissing) genotype observations.
606 .IP
607 The default is chrom,ref,alt,homref,refalt,altxy,hapref,hapalt,missing.
608 .HP
609 \fB\-\-sample\-counts\fR ['zs'] ['cols='<column set descriptor>]
610 .IP
611 Sample\-based hardcall genotype count report.
612 * Unknown\-sex samples are treated as female.
613 * Heterozygous haploid calls (MT included) are treated as missing.
614 * As with other PLINK 2 commands, SNPs that have not been left\-normalized
615 .TP
616 are counted as non\-SNP non\-symbolic.
617 (Use e.g. \fB\-\-normalize\fR when that's a
618 .IP
619 problem.)
620 .IP
621 * Supported column sets are:
622 .IP
623 maybefid: FID, if that column was present in the input.
624 fid: Force FID column to be written even when absent in the input.
625 (IID is always present, and positioned here.)
626 maybesid: SID, if that column was present in the input.
627 sid: Force SID column to be written even when absent in the input.
628 sex: '1' = male, '2' = female, 'NA' = missing.
629 hom: Homozygous genotype count.
630 homref: Homozygous\-ref genotype count.
631 homalt: Homozygous\-alt genotype count.
632 homaltsnp: Homozygous\-alt SNP count.
633 het: Heterozygous genotype count.
634 refalt: Heterozygous ref\-altx genotype count.
635 het2alt: Heterozygous altx\-alty genotype count.
636 hetsnp: Heterozygous SNP count.
637 dipts: Diploid SNP transition count.
638 ts: SNP transition count (excluding chrY for females).
639 diptv: Diploid SNP transversion count.
640 tv: SNP transversion count.
641 dipnonsnpsymb: Diploid non\-SNP, non\-symbolic count.
642 nonsnpsymb: Non\-SNP, non\-symbolic count.
643 symbolic: Symbolic variant count.
644 nonsnp: Non\-SNP count.
645 dipsingle: Number of singletons relative to this dataset, across just
646 .TP
647 diploid calls.
648 (Note that if the ALT allele in a chrX
649 .IP
650 biallelic variant appears in exactly one female and one
651 male, that counts as a singleton for just the female.)
652 .IP
653 single: Number of singletons relative to this dataset.
654 haprefwfemaley: Haploid\-ref count, counting chrY for everyone.
655 hapref: Haploid\-ref count, excluding chrY for females.
656 hapaltwfemaley: Haploid\-alt count, counting chrY for everyone.
657 hapalt: Haploid\-alt count, excluding chrY for females.
658 missingwfemaley: Missing call count, counting chrY for everyone.
659 missing: Missing call count, excluding chrY for females.
660 .IP
661 The default is maybefid,maybesid,homref,homaltsnp,hetsnp,dipts,diptv,
662 dipnonsnpsymb,dipsingle,haprefwfemaley,hapaltwfemaley,missingwfemaley.
663 .IP
664 * The 'hetsnp', 'dipts'/'ts'/'diptv'/'tv', 'dipnonsnpsymb'/'nonsnpsymb',
665 .IP
666 \&'symbolic', and 'nonsnp' columns count each ALT allele in a heterozygous
667 altx\-alty call separately, since they can be of different subtypes.
668 (I.e. if they are of the same subtype, the corresponding count is
669 incremented by 2.) As a consequence, these columns are unaffected by
670 variant split/join.
671 .HP
672 \fB\-\-missing\fR ['zs'] [{sample\-only | variant\-only}]
673 .IP
674 ['scols='<column set descriptor>] ['vcols='<column set descriptor>]
675 .IP
676 Generate sample\- and variant\-based missing data reports (or just one report
677 if 'sample\-only'/'variant\-only' is specified).
678 As of alpha 2, mixed MT hardcalls appear in the heterozygous haploid stats.
679 Supported column sets in the sample\-based report are:
680 .IP
681 maybefid: FID, if that column was present in the input.
682 fid: Force FID column to be written even when absent in the input.
683 (IID is always present, and positioned here.)
684 maybesid: SID, if that column was present in the input.
685 sid: Force SID column to be written even when absent in the input.
686 misspheno1: First active phenotype missing (Y/N)? Always 'Y' if no
687 .IP
688 phenotypes are loaded.
689 .TP
690 missphenos: A Y/N column for each loaded phenotype.
691 (Can be combined
692 .IP
693 with misspheno1 to force at least one such column.)
694 .IP
695 nmissdosage: Number of missing dosages.
696 nmiss: Number of missing hardcalls, not counting het haploids.
697 nmisshh: Number of missing hardcalls, counting het haploids.
698 hethap: Number of heterozygous haploid hardcalls.
699 nobs: Denominator (male count on chrY, otherwise total sample count).
700 fmissdosage: Missing dosage rate.
701 fmiss: Missing hardcall rate, not counting het haploids.
702 fmisshh: Missing hardcall rate, counting het haploids.
703 .IP
704 The default is maybefid,maybesid,missphenos,nmiss,nobs,fmiss.
705 Supported column sets in the variant\-based report are:
706 .IP
707 chrom: Chromosome ID.
708 pos: Base\-pair coordinate.
709 (ID is always present, and positioned here.)
710 ref: Reference allele.
711 alt1: Alternate allele 1.
712 alt: All alternate alleles, comma\-separated.
713 nmissdosage: Number of missing dosages.
714 nmiss: Number of missing hardcalls, not counting het haploids.
715 nmisshh: Number of missing hardcalls, counting het haploids.
716 hethap: Number of heterozygous haploid calls.
717 nobs: Number of potentially valid calls.
718 fmissdosage: Missing dosage rate.
719 fmiss: Missing hardcall rate, not counting het haploids.
720 fmisshh: Missing hardcall rate, counting het haploids.
721 fhethap: Heterozygous haploid rate.
722 .IP
723 The default is chrom,nmiss,nobs,fmiss.
724 .HP
725 \fB\-\-hardy\fR ['zs'] ['midp'] ['redundant'] ['cols='<column set descriptor>]
726 .IP
727 Hardy\-Weinberg exact test p\-value report(s).
728 * By default, only founders are considered; change this with \fB\-\-nonfounders\fR.
729 * chrX is now omitted from the main <output prefix>.hardy report. Instead,
730 .IP
731 (if present) it gets its own <output prefix>.hardy.x report based on the
732 method described in Graffelman J, Weir BS (2016) Hardy\-Weinberg
733 equilibrium and the X chromosome.
734 .IP
735 * For variants with k alleles where k>2, k separate 'biallelic' tests are
736 .TP
737 performed, each reported on its own line.
738 However, biallelic variants
739 .IP
740 are normally reported on a single line, since the counts/frequencies
741 would be mirror\-images and the p\-values would be the same. You can add
742 the 'redundant' modifier to force biallelic variant results to be
743 reported on two lines for parsing convenience.
744 .IP
745 * There is currently no special handling of case/control phenotypes.
746 Supported column sets are:
747 .IP
748 chrom: Chromosome ID.
749 pos: Base\-pair coordinate.
750 (ID is always present, and positioned here.)
751 ref: Reference allele.
752 alt1: Alternate allele 1.
753 alt: All alternate alleles, comma\-separated.
754 (A1 is always present, and positioned here.)
755 ax: Non\-A1 allele(s), comma\-separated.
756 gcounts: Hom\-A1 count, total number of het\-A1 calls, and total number of
757 .TP
758 nonmissing calls with no copies of A1.
759 On chrX, these are
760 .IP
761 followed by male A1 and male non\-A1 counts.
762 .IP
763 gcount1col: gcounts values in a single comma\-separated column.
764 hetfreq: Observed and expected het\-A1 frequencies.
765 sexaf: Female and male A1 observed allele frequencies (chrX only).
766 femalep: Female\-only p/midp\-value (chrX only).
767 p: Hardy\-Weinberg equilibrium exact test p/midp\-value.
768 .IP
769 The default is chrom,ax,gcounts,hetfreq,sexaf,p.
770 .HP
771 \fB\-\-indep\-pairwise\fR <window size>['kb'] [step size (variant ct)]
772 .IP
773 <unphased\-hardcall\-r^2 threshold>
774 .IP
775 Generate a list of variants in approximate linkage equilibrium.
776 * For multiallelic variants, major allele counts are used in the r^2
777 .IP
778 computation.
779 .IP
780 * With the 'kb' modifier, the window size is in kilobase instead of variant
781 .TP
782 count units.
783 (Pre\-'kb' space is optional, i.e.
784 .IP
785 "\-\-indep\-pairwise 500 kb 0.5" and "\-\-indep\-pairwise 500kb 0.5" have the
786 same effect.)
787 .IP
788 * The step size now defaults to 1 if it's unspecified, and *must* be 1 if
789 .IP
790 the window is in kilobase units.
791 .IP
792 * Note that you need to rerun PLINK using \fB\-\-extract\fR or \fB\-\-exclude\fR on the
793 .IP
794 \&.prune.in/.prune.out file to apply the list to another computation... and
795 as with other applications of \fB\-\-extract\fR/\-\-exclude, duplicate variant IDs
796 are a problem. \fB\-\-indep\-pairwise\fR still runs to completion for now when
797 duplicate variant IDs are present, but that will become an error in alpha
798 3.
799 .HP
800 \fB\-\-ld\fR <variant ID> <variant ID> ['dosage'] ['hwe\-midp']
801 .IP
802 This displays diplotype frequencies, r^2, and D' for a single pair of
803 variants.
804 * For multiallelic variants, major allele counts/dosages are used.
805 * Phase information is used when both variants are on the same chromosome.
806 * When there is at least one sample with unphased het calls for both
807 .IP
808 variants, diplotype frequencies are estimated using the Hill equation.
809 If there are multiple biologically possible local maxima, all are
810 displayed, along with HWE exact test statistics.
811 .TP
812 * By default, only hardcalls are considered.
813 Add the 'dosage' modifier if
814 .TP
815 you want dosages to be taken into account.
816 (In the diploid case, an
817 .IP
818 unphased dosage of x is interpreted as P(0/0) = 1 \- x, P(0/1) = x when x
819 is in 0..1.)
820 .HP
821 \fB\-\-sample\-diff\fR ['id\-delim='<char>] ['dosage' | 'dosage='<tolerance>]
822 .IP
823 ['include\-missing'] [{pairwise | counts\-only}]
824 ['fname\-id\-delim='<c>] ['zs'] ['cols='<column set descriptor>]
825 ['counts\-cols='<column set descriptor>]
826 {base= | ids=}<sample ID> [other sample ID(s)...]
827 .HP
828 \fB\-\-sample\-diff\fR ['id\-delim='<char>] ['dosage' | 'dosage='<tolerance>]
829 .IP
830 ['include\-missing'] [{pairwise | counts\-only}]
831 ['fname\-id\-delim='<c>] ['zs'] ['cols='<column set descriptor>]
832 ['counts\-cols='<column set descriptor>] file=<ID\-pair file>
833 .IP
834 (alias: \fB\-\-sdiff\fR)
835 Report discordances and discordance\-counts between pairs of samples. If
836 chrX or chrY is present, sex must be defined and consistent.
837 * There are three ways to specify which sample pairs to compare. To
838 .IP
839 compare a single baseline sample against some others, start the
840 (space\-delimited) sample ID list with 'base='. To perform an all\-vs.\-all
841 comparison, start it with 'ids=' instead. To compare sample pairs listed
842 in a file, use 'file='.
843 Note that 'base='/'ids='/'file=' must be positioned after all modifiers.
844 .IP
845 * Sample IDs are interpreted as if they were in a VCF header line, with
846 .IP
847 \&'id\-delim=' having the usual effect.
848 .TP
849 * By default, comparisons are based on hardcalls.
850 Use 'dosage' to compare
851 .IP
852 dosages instead; you can combine this with a tolerance in [0, 0.5).
853 .IP
854 * By default, if one genotype is missing and the other isn't, that doesn't
855 .IP
856 count as a difference; this can be changed with 'include\-missing'.
857 .IP
858 * By default, a single main report is written to
859 .TP
860 <output prefix>[.<base ID>].sdiff.
861 To write separate pairwise
862 .IP
863 <output prefix>.<ID1>.<ID2>.sdiff reports for each compared ID pair, add
864 the 'pairwise' modifier. To omit the main report, add the 'counts\-only'
865 modifier. (Note that, if you're only interested in nonmissing autosomal
866 biallelic hardcalls, \fB\-\-make\-king\-table\fR provides a more efficient way to
867 compute just counts.)
868 .IP
869 * By default, if an output filename has a multipart sample ID, the parts
870 .IP
871 will be delimited by '_'; use 'fname\-id\-delim=' to change this.
872 .IP
873 Supported main\-report column sets are:
874 .IP
875 chrom: Chromosome ID.
876 pos: Base\-pair coordinate.
877 (Variant ID is always present, and positioned here.)
878 ref: Reference allele.
879 alt: All alternate alleles, comma\-separated.
880 maybefid: FID1/FID2, if that column was in the input. Requires 'id'.
881 fid: Force FID1/FID2 even when FID was absent in the input.
882 id: IID1/IID2.
883 maybesid: SID1/SID2, if that column was in the input. Requires 'id'.
884 sid: Force SID1/SID2 even when SID was absent in the input.
885 geno: Unphased GT or DS for the two samples.
886 .IP
887 The default is usually chrom,pos,ref,alt,maybefid,id,maybesid,geno; the
888 sample IDs are removed from the default in 'pairwise' mode.
889 Supported discordance\-count\-summary column sets are:
890 .IP
891 maybefid: FID1/FID2, if that column was in the input.
892 fid: Force FID1/FID2 even when FID was absent in the input.
893 (IID1/IID2 are always present.)
894 maybesid: SID1/SID2, if that column was in the input.
895 sid: Force SID1/SID2 even when SID was absent in the input.
896 nobs: Number of variants considered. This includes variants where one or
897 .IP
898 both variants are missing iff 'include\-missing' was specified.
899 .IP
900 nobsibs: ibs0+ibs1+ibs2.
901 ibs0: Number of diploid variants with no common hardcall alleles.
902 ibs1: Number of diploid variants with exactly 1 common hardcall allele.
903 ibs2: Number of diploid variants with both hardcall alleles matching.
904 halfmiss: Number of variants with exactly 1 missing genotype/dosage.
905 .IP
906 Ignored without 'include\-missing'.
907 .IP
908 diff: Total number of differences.
909 .IP
910 The default is maybefid,maybesid,nobs,halfmiss,diff.
911 .HP
912 \fB\-\-make\-king\fR [{square | square0 | triangle}] [{zs | bin | bin4}]
913 .IP
914 KING\-robust kinship estimator, described by Manichaikul A, Mychaleckyj JC,
915 Rich SS, Daly K, Sale M, Chen WM (2010) Robust relationship inference in
916 genome\-wide association studies. By default, this writes a
917 lower\-triangular tab\-delimited table of kinship coefficients to
918 <output prefix>.king, and a list of the corresponding sample IDs to
919 <output prefix>.king.id. The first row of the .king file contains a single
920 <genome 1\-genome 2> kinship coefficient, the second row has the
921 <genome 1\-genome 3> and <genome 2\-genome 3> kinship values in that order,
922 etc.
923 * Only autosomes are currently considered.
924 * Pedigree information is currently ignored; the between\-family estimator
925 .IP
926 is used for all pairs.
927 .IP
928 * For multiallelic variants, REF allele counts are used.
929 * If the 'square' or 'square0' modifier is present, a square matrix is
930 .IP
931 written instead; 'square0' fills the upper right triangle with zeroes.
932 .IP
933 * If the 'zs' modifier is present, the .king file is Zstd\-compressed.
934 * If the 'bin' modifier is present, a binary (square) matrix of
935 .IP
936 double\-precision floating point values, suitable for loading from R, is
937 instead written to <output prefix>.king.bin. ('bin4' specifies
938 single\-precision numbers instead.) This can be combined with 'square0'
939 if you still want the upper right zeroed out, or 'triangle' if you don't
940 want to pad the upper right at all.
941 .IP
942 * The computation can be subdivided with \fB\-\-parallel\fR.
943 .HP
944 \fB\-\-make\-king\-table\fR ['zs'] ['counts'] ['rel\-check'] ['cols='<col set descrip.>]
945 .IP
946 Similar to \fB\-\-make\-king\fR, except results are reported in KING's original
947 \&.kin0 text table format (with minor changes, e.g. row order is more
948 friendly to incremental addition of samples), \fB\-\-king\-table\-filter\fR can be
949 used to restrict the report to high kinship values, and the 'rel\-check'
950 modifier can be used to restrict to same\-FID pairs.
951 Supported column sets are:
952 .TP
953 maybefid: FID1/FID2, if that column was in the input.
954 Requires 'id'.
955 .IP
956 fid: Force FID1/FID2 even when FID was absent in the input.
957 id: IID1/IID2.
958 maybesid: SID1/SID2, if that column was in the input. Requires 'id'.
959 sid: Force SID1/SID2 even when SID was absent in the input.
960 nsnp: Number of variants considered (autosomal, neither call missing).
961 hethet: Proportion/count of considered call pairs which are het\-het.
962 ibs0: Proportion/count of considered call pairs which are opposite homs.
963 ibs1: HET1_HOM2 and HET2_HOM1 proportions/counts.
964 kinship: KING\-robust between\-family kinship estimator.
965 .IP
966 The default is maybefid,id,maybesid,nsnp,hethet,ibs0,kinship.
967 hethet/ibs0/ibs1 values are proportions unless the 'counts' modifier is
968 present. If id is omitted, a .kin0.id file is also written.
969 .HP
970 \fB\-\-make\-rel\fR ['cov'] ['meanimpute'] [{square | square0 | triangle}]
971 .IP
972 [{zs | bin | bin4}]
973 .IP
974 Write a lower\-triangular variance\-standardized relationship matrix to
975 <output prefix>.rel, and corresponding IDs to <output prefix>.rel.id.
976 * This computation assumes that variants do not have very low MAF, or
977 .IP
978 deviate greatly from Hardy\-Weinberg equilibrium.
979 .IP
980 * Also, it's usually best to perform this calculation on a variant set in
981 .IP
982 approximate linkage equilibrium.
983 .IP
984 * The 'cov' modifier replaces the variance\-standardization step with basic
985 .IP
986 mean\-centering, causing a covariance matrix to be calculated instead.
987 .IP
988 * The computation can be subdivided with \fB\-\-parallel\fR.
989 .HP
990 \fB\-\-make\-grm\-list\fR ['cov'] ['meanimpute'] ['zs'] [{id\-header | iid\-only}]
991 .HP
992 \fB\-\-make\-grm\-bin\fR ['cov'] ['meanimpute'] [{id\-header | iid\-only}]
993 .HP
994 \fB\-\-make\-grm\-list\fR causes the relationships to be written to GCTA's original
995 .IP
996 list format, which describes one pair per line, while \fB\-\-make\-grm\-bin\fR writes
997 them in GCTA 1.1+'s single\-precision triangular binary format. Note that
998 these formats explicitly report the number of valid observations (where
999 neither sample has a missing call) for each pair, which is useful input for
1000 some scripts.
1001 .HP
1002 \fB\-\-pca\fR [count] [{approx | meanimpute}] ['scols='<col set descriptor>]
1003 .HP
1004 \fB\-\-pca\fR [{allele\-wts | biallelic\-var\-wts}] [count] [{approx | meanimpute}]
1005 .IP
1006 ['vzs'] ['scols='<col set descriptor>] ['vcols='<col set descriptor>]
1007 .IP
1008 Extracts top principal components from the variance\-standardized
1009 relationship matrix.
1010 * It is usually best to perform this calculation on a variant set in
1011 .IP
1012 approximate linkage equilibrium, with no very\-low\-MAF variants.
1013 .IP
1014 * By default, 10 PCs are extracted; you can adjust this by passing a
1015 .TP
1016 numeric argument.
1017 (Note that 10 is lower than the PLINK 1.9 default of
1018 .IP
1019 20; this is due to the randomized algorithm's memory footprint growing
1020 quadratically w.r.t. the PC count.)
1021 .IP
1022 * The 'approx' modifier causes the standard deterministic computation to be
1023 .IP
1024 replaced with the randomized algorithm originally implemented for
1025 Galinsky KJ, Bhatia G, Loh PR, Georgiev S, Mukherjee S, Patterson NJ,
1026 Price AL (2016) Fast Principal\-Component Analysis Reveals Convergent
1027 Evolution of ADH1B in Europe and East Asia. This can be a good idea when
1028 you have >5k samples, and is almost required with >50k.
1029 .IP
1030 * The randomized algorithm always uses mean imputation for missing genotype
1031 .TP
1032 calls.
1033 For comparison purposes, you can use the 'meanimpute' modifier to
1034 .IP
1035 request this behavior for the standard computation.
1036 .IP
1037 * 'scols=' can be used to customize how sample IDs appear in the .eigenvec
1038 .TP
1039 file.
1040 (maybefid, fid, maybesid, and sid supported; default is
1041 .IP
1042 maybefid,maybesid.)
1043 .IP
1044 * The 'allele\-wts' modifier requests an additional one\-line\-per\-allele
1045 .IP
1046 \&.eigenvec.allele file with PCs expressed as allele weights instead of
1047 sample weights. When it's present, 'vzs' causes the .eigenvec.allele
1048 file to be Zstd\-compressed.
1049 \&'vcols=' can be used to customize the report columns; supported column
1050 sets are:
1051 .IP
1052 chrom: Chromosome ID.
1053 pos: Base\-pair coordinate.
1054 (ID is always present, and positioned here.)
1055 ref: Reference allele.
1056 alt1: Alternate allele 1.
1057 alt: All alternate alleles, comma\-separated.
1058 (A1 is always present, and positioned here.)
1059 ax: Non\-A1 alleles, comma\-separated.
1060 (PCs are always present, and positioned here.)
1061 .IP
1062 Default is chrom,ref,alt.
1063 .IP
1064 * For datasets with no multiallelic variants, the 'biallelic\-var\-wts'
1065 .IP
1066 modifier requests the old .eigenvec.var format, which only reports
1067 weights for major alleles. (These weights are 2x the corresponding
1068 \&.eigenvec.allele weights.) Supported column sets are:
1069 .IP
1070 chrom: Chromosome ID.
1071 pos: Base\-pair coordinate.
1072 (ID is always present, and positioned here.)
1073 ref: Reference allele.
1074 alt1: Alternate allele 1.
1075 alt: All alternate alleles, comma\-separated.
1076 maj: Major allele.
1077 nonmaj: Minor allele.
1078 (PCs are always present, and positioned here. Signs are w.r.t. the
1079 major, not necessarily reference, allele.)
1080 .IP
1081 Default is chrom,maj,nonmaj.
1082 .HP
1083 \fB\-\-king\-cutoff\fR [.king.bin + .king.id fileset prefix] <threshold>
1084 .IP
1085 Exclude one member of each pair of samples with KING\-robust kinship greater
1086 than the given threshold. Remaining/excluded sample IDs are written to
1087 <output prefix>.king.cutoff.in.id + .king.cutoff.out.id.
1088 If present, the .king.bin file must be triangular (either precision is ok).
1089 .HP
1090 \fB\-\-write\-covar\fR ['cols='<column set descriptor>]
1091 .IP
1092 If covariates are defined, an updated version (with all filters applied) is
1093 automatically written to <output prefix>.cov whenever \fB\-\-make\-pgen\fR,
1094 \fB\-\-make\-just\-psam\fR, \fB\-\-export\fR, or a similar command is present. However, if
1095 you do not wish to simultaneously generate a new sample file, you can use
1096 \fB\-\-write\-covar\fR to just produce a pruned covariate file.
1097 Supported column sets are:
1098 .IP
1099 maybefid: FID, if that column was in the input.
1100 fid: Force FID column to be written even when absent in the input.
1101 maybesid: SID, if that column was in the input.
1102 sid: Force SID column to be written even when absent in the input.
1103 maybeparents: Father/mother IIDs ('0' = missing), if columns in input.
1104 parents: Force PAT/MAT columns to be written even when absent in input.
1105 sex: '1' = male, '2' = female, 'NA' = missing.
1106 pheno1: First active phenotype. If none, all column entries are set to
1107 .IP
1108 the \fB\-\-output\-missing\-phenotype\fR string.
1109 .TP
1110 phenos: All active phenotypes, if any.
1111 (Can be combined with pheno1 to
1112 .IP
1113 force at least one phenotype column to be written.)
1114 .IP
1115 (Covariates are always present, and positioned here.)
1116 .IP
1117 The default is maybefid,maybesid.
1118 .HP
1119 \fB\-\-write\-samples\fR
1120 .IP
1121 Report IDs of all samples which pass your filters/inclusion thresholds.
1122 .HP
1123 \fB\-\-write\-snplist\fR ['zs'] ['allow\-dups']
1124 .TP
1125 List all variants which pass your filters/inclusion thresholds.
1126 Unless the
1127 .IP
1128 \&'allow\-dups' modifier is provided, this now errors out when duplicate
1129 variant ID(s) remain.
1130 .HP
1131 \fB\-\-glm\fR ['zs'] ['omit\-ref'] [{sex | no\-x\-sex}] ['log10'] ['pheno\-ids']
1132 .IP
1133 [{genotypic | hethom | dominant | recessive}] ['interaction'] ['skip']
1134 ['hide\-covar'] [{no\-firth | firth\-fallback | firth}] ['intercept']
1135 ['cols='<col set desc>] ['local\-covar='<file>] ['local\-psam='<file>]
1136 ['local\-pos\-cols='<key col #s> | 'local\-pvar='<file>] ['local\-haps']
1137 ['local\-omit\-last' | 'local\-cats[0]='<category ct>] ['allow\-no\-covars']
1138 .IP
1139 Basic association analysis on quantitative and/or case/control phenotypes.
1140 For each variant, a linear (for quantitative traits) or logistic (for
1141 case/control) regression is run with the phenotype as the dependent
1142 variable, and nonmajor allele dosage(s) and a constant\-1 column as
1143 predictors.
1144 * There is usually an additive effect line for every nonmajor allele, and
1145 .TP
1146 no such line for the major allele.
1147 To omit REF alleles instead of major
1148 .TP
1149 alleles, add the 'omit\-ref' modifier.
1150 (When performing interaction
1151 .IP
1152 testing, this tends to cause the multicollinearity check to fail for
1153 low\-ref\-frequency variants.)
1154 .IP
1155 * By default, sex (male = 1, female = 2; note that this is a change from
1156 .IP
1157 PLINK 1.x) is automatically added as a predictor for X chromosome
1158 variants, and no others. The 'sex' modifier causes it to be added
1159 everywhere (except chrY), while 'no\-x\-sex' excludes it entirely.
1160 .IP
1161 * The 'log10' modifier causes p\-values to be reported in \fB\-log10\fR(p) form.
1162 * 'pheno\-ids' causes the samples used in each set of regressions to be
1163 .TP
1164 written to an .id file.
1165 (When the samples differ on chrX or chrY, .x.id
1166 .IP
1167 and/or .y.id files are also written.)
1168 .IP
1169 * The 'genotypic' modifier adds an additive effect/dominance deviation 2df
1170 .IP
1171 joint test (0\-2 and 0..1..0 coding), while 'hethom' uses 0..0..1 and
1172 0..1..0 coding instead.
1173 .IP
1174 * 'dominant' and 'recessive' specify a model assuming full dominance or
1175 .TP
1176 recessiveness, respectively, for the ref allele.
1177 I.e. the genotype
1178 .IP
1179 column is recoded as 0..1..1 or 0..0..1, respectively.
1180 .TP
1181 * 'interaction' adds genotype x covariate interactions to the model.
1182 Note
1183 .IP
1184 that this tends to produce 'NA' results (due to the multicollinearity
1185 check) when the reference allele is 'wrong'; \fB\-\-maj\-ref\fR can be used to
1186 enable analysis of those variants.
1187 .TP
1188 * Additional predictors can be added with \fB\-\-covar\fR.
1189 By default, association
1190 .IP
1191 statistics are reported for all nonconstant predictors; 'hide\-covar'
1192 suppresses covariate\-only results, while 'intercept' causes intercepts
1193 to be reported.
1194 Since running \fB\-\-glm\fR without at least e.g. principal component covariates
1195 is usually an analytical mistake, the 'allow\-no\-covars' modifier is now
1196 required when you're intentionally running \fB\-\-glm\fR without a covariate
1197 file.
1198 .IP
1199 * By default, if the current phenotype and covariates are such that every
1200 .TP
1201 regression on a chromosome will fail, PLINK 2 errors out.
1202 To just skip
1203 .IP
1204 the phenotype or chromosome instead, add the 'skip' modifier.
1205 .IP
1206 * There are now three regression modes for case/control phenotypes:
1207 .IP
1208 * 'no\-firth' requests PLINK 1.x's behavior, where a NA result is reported
1209 .IP
1210 when basic logistic regression fails to converge.
1211 .IP
1212 * 'firth\-fallback' requests logistic regression, followed by Firth
1213 .TP
1214 regression whenever the logistic regression fails to converge.
1215 This is
1216 .IP
1217 now the default.
1218 .IP
1219 * 'firth' requests Firth regression all the time.
1220 .IP
1221 * To add covariates which are not constant across all variants, add the
1222 .IP
1223 \&'local\-covar=' and 'local\-psam=' modifiers, use full filenames for each,
1224 and use either 'local\-pvar=' or 'local\-pos\-cols=' to provide variant ID
1225 or position information.
1226 Normally, the local\-covar file should have c * n real\-valued columns,
1227 where the first c columns correspond to the first sample in the
1228 local\-psam file, columns (c+1) to 2c correspond to the second sample,
1229 etc.; and the mth line corresponds to the mth nonheader line of the
1230 local\-pvar file when there is one. (Variants outside of the local\-pvar
1231 file are excluded from the regression.) The local covariates are
1232 assigned the names LOCAL1, LOCAL2, etc.; to exclude the last local
1233 covariate from the regression (necessary if they are e.g. local ancestry
1234 coefficients which sum to 1), add 'local\-omit\-last'.
1235 Alternatively, with 'local\-cats='<k>, the local\-covar file is expected to
1236 have n columns with integer\-valued entries in [1, k]. (This range is
1237 [0, k\-1] with 'local\-cats0='.) These category assignments are expanded
1238 into (k\-1) local covariates in the usual manner.
1239 When position information is in the local\-covar file, this should be
1240 indicated by 'local\-pos\-cols='<number of header rows>,<chrom col #>,<pos
1241 start col #>,<first covariate col #>.
1242 \&'local\-haps' indicates that there's one column or column\-group per
1243 haplotype instead of per sample; they are averaged by \fB\-\-glm\fR.
1244 .IP
1245 The main report supports the following column sets:
1246 .IP
1247 chrom: Chromosome ID.
1248 pos: Base\-pair coordinate.
1249 (ID is always present, and positioned here.)
1250 ref: Reference allele.
1251 alt1: Alternate allele 1.
1252 alt: All alternate alleles, comma\-separated.
1253 (A1 is always present, and positioned here. For multiallelic variants,
1254 this column may contain multiple comma\-separated alleles when the result
1255 doesn't depend on which allele is A1.)
1256 ax: Non\-A1 alleles, comma\-separated.
1257 a1count: A1 allele count (can be decimal with dosage data).
1258 totallele: Allele observation count (can be higher than \fB\-\-freq\fR value, due
1259 .IP
1260 to inclusion of het haploids and chrX model).
1261 .IP
1262 a1countcc: A1 count in cases, then controls (case/control only).
1263 totallelecc: Case and control allele observation counts.
1264 gcountcc: Genotype hardcall counts (neither\-A1, het\-A1, A1\-A1) in cases,
1265 .IP
1266 then controls (case/control only).
1267 .IP
1268 a1freq: A1 allele frequency.
1269 a1freqcc: A1 frequency in cases, then controls (case/control only).
1270 machr2: Unphased MaCH imputation quality (frequently labeled 'INFO').
1271 firth: Reports whether Firth regression was used (firth\-fallback only).
1272 test: Test identifier. (Required unless only one test is run.)
1273 nobs: Number of samples in the regression.
1274 beta: Regression coefficient (for A1 if additive test).
1275 orbeta: Odds ratio for case/control, beta for quantitative traits.
1276 .IP
1277 (Ignored if 'beta' column set included.)
1278 .IP
1279 se: Standard error of beta.
1280 ci: Bounds of symmetric approximate confidence interval (requires \fB\-\-ci\fR).
1281 tz: T\-statistic for linear regression, Wald Z\-score for logistic/Firth.
1282 p: Asymptotic p\-value (or \fB\-log10\fR(p)) for T/Z\-statistic.
1283 err: Error code for NA results.
1284 .IP
1285 The default is chrom,pos,ref,alt,firth,test,nobs,orbeta,se,ci,tz,p,err.
1286 .HP
1287 \fB\-\-score\fR <filename> [i] [j] [k] [{header | header\-read}]
1288 .IP
1289 [{center | variance\-standardize | dominant | recessive}]
1290 ['no\-mean\-imputation'] ['se'] ['zs'] ['ignore\-dup\-ids']
1291 [{list\-variants | list\-variants\-zs}] ['cols='<col set descriptor>]
1292 .IP
1293 Apply linear scoring system(s) to each sample.
1294 The input file should have one line per scored (variant, allele) pair.
1295 Variant IDs are read from column #i and allele codes are read from column
1296 #j, where i defaults to 1 and j defaults to i+1.
1297 * By default, a single column of input coefficients is read from column #k,
1298 .TP
1299 where k defaults to j+1.
1300 (\fB\-\-score\-col\-nums\fR can be used to specify
1301 .IP
1302 multiple columns.)
1303 .IP
1304 * 'header\-read' causes the first line of the input file to be treated as a
1305 .TP
1306 header line containing score names.
1307 Otherwise, score(s) are assigned the
1308 .IP
1309 names 'SCORE1', 'SCORE2', etc.; and 'header' just causes the first line
1310 to be entirely ignored.
1311 .IP
1312 * By default, copies of unnamed alleles contribute zero to score, while
1313 .IP
1314 missing genotypes contribute an amount proportional to the loaded (via
1315 \fB\-\-read\-freq\fR) or imputed allele frequency. To throw out missing
1316 observations instead (decreasing the denominator in the final average
1317 when this happens), use the 'no\-mean\-imputation' modifier.
1318 .IP
1319 * You can use the 'center' modifier to shift all genotypes to mean zero, or
1320 .IP
1321 \&'variance\-standardize' to linearly transform the genotypes to mean\-0,
1322 variance\-1.
1323 .IP
1324 * The 'dominant' modifier causes dosages greater than 1 to be treated as 1,
1325 .IP
1326 while 'recessive' uses max(dosage \- 1, 0) on diploid chromosomes.
1327 ('dominant', 'recessive', and 'variance\-standardize' cannot be used with
1328 chrX.)
1329 .IP
1330 * The 'se' modifier causes the input coefficients to be treated as
1331 .IP
1332 independent standard errors; in this case, standard errors for the score
1333 average/sum are reported. (Note that this will systematically
1334 underestimate standard errors when scored variants are in LD.)
1335 .IP
1336 * By default, \fB\-\-score\fR errors out if a variant ID in the input file appears
1337 .TP
1338 multiple times in the main dataset.
1339 Use the 'ignore\-dup\-ids' modifier to
1340 .IP
1341 skip them instead (a warning is still printed if such variants are
1342 present).
1343 .IP
1344 * The 'list\-variants[\-zs]' modifier causes variant IDs used for scoring to
1345 .IP
1346 be written to <output prefix>.sscore.vars[.zst].
1347 .IP
1348 The main report supports the following column sets:
1349 .IP
1350 maybefid: FID, if that column was in the input.
1351 fid: Force FID column to be written even when absent in the input.
1352 (IID is always present, and positioned here.)
1353 maybesid: SID, if that column was in the input.
1354 sid: Force SID column to be written even when absent in the input.
1355 pheno1: First active phenotype.
1356 phenos: All active phenotypes, if any.
1357 nallele: Number of nonmissing alleles.
1358 denom: Denominator of score average (equal to nallele value when
1359 .IP
1360 \&'no\-mean\-imputation' specified).
1361 .IP
1362 dosagesum: Sum of named allele dosages.
1363 scoreavgs: Score averages.
1364 scoresums: Score sums.
1365 .IP
1366 The default is maybefid,maybesid,phenos,nallele,dosagesum,scoreavgs.
1367 For more sophisticated polygenic risk scoring, we recommend looking at the
1368 LDpred (https://github.com/bvilhjal/ldpred ) and PRSice\-2
1369 (https://www.prsice.info/ ) software packages.
1370 .HP
1371 \fB\-\-variant\-score\fR <filename> ['zs'] ['bin' | 'cols='<col set descriptor>]
1372 .IP
1373 (alias: \fB\-\-vscore\fR)
1374 Apply linear scoring system(s) to each variant. Each reported variant
1375 score is the dot product of a sample\-weight vector with the
1376 total\-ALT\-dosage vector, with MAF\-based mean imputation applied to missing
1377 dosages.
1378 Input file format: one line per sample, each starting with an ID and
1379 followed by scoring weight(s); it can also have a header line with the
1380 sample ID representation and the score name(s).
1381 The usual .vscore text report supports the following column sets:
1382 .IP
1383 chrom: Chromosome ID.
1384 pos: Base\-pair coordinate.
1385 (ID is always present, and positioned here.)
1386 ref: Reference allele.
1387 alt1: Alternate allele 1.
1388 alt: All alternate alleles, comma\-separated.
1389 altfreq: ALT allele frequency used for mean\-imputation.
1390 nmiss: Number of missing (and thus mean\-imputed) dosages.
1391 nobs: Number of (nonmissing) sample observations.
1392 (Variant scores are always present, and positioned here.)
1393 .IP
1394 Default is chrom,pos,ref,alt.
1395 If binary output is requested instead, the main .vscore.bin matrix contains
1396 double\-precision floating\-point values, column (score) ID(s) are saved to
1397 <output prefix>.vscore.cols, and variant IDs are saved to
1398 <output prefix>.vscore.vars[.zst].
1399 .HP
1400 \fB\-\-adjust\-file\fR <filename> ['zs'] ['gc'] ['cols='<column set descriptor>]
1401 .IP
1402 ['log10'] ['input\-log10'] ['test='<test name, case\-sensitive>]
1403 .IP
1404 Given a file with unfiltered association test results, report some basic
1405 multiple\-testing corrections, sorted in increasing\-p\-value order.
1406 * 'gc' causes genomic\-controlled p\-values to be used in the formulas.
1407 .TP
1408 (This tends to be overly conservative.
1409 We note that LD Score regression
1410 .IP
1411 usually does a better job of calibrating lambda; see Lee JJ, McGue M,
1412 Iacono WG, Chow CC (2018) The accuracy of LD Score regression as an
1413 estimator of confounding and genetic correlations in genome\-wide
1414 association studies.)
1415 .IP
1416 * 'log10' causes negative base 10 logs of p\-values to be reported, instead
1417 .TP
1418 of raw p\-values.
1419 \&'input\-log10' specifies that the input file contains
1420 .HP
1421 \fB\-log10\fR(p) values.
1422 .IP
1423 * If the input file contains multiple tests per variant which are
1424 .IP
1425 distinguished by a 'TEST' column (true for \fB\-\-linear\fR/\-\-logistic/\-\-glm),
1426 you must use 'test=' to select the test to process.
1427 .IP
1428 The following column sets are supported:
1429 .IP
1430 chrom: Chromosome ID.
1431 pos: Base\-pair coordinate.
1432 (ID is always present, and positioned here.)
1433 ref: Reference allele.
1434 alt1: Alternate allele 1.
1435 alt: All alternate alleles, comma\-separated.
1436 a1: Tested allele. (Omitted if missing from input file.)
1437 unadj: Unadjusted p\-value.
1438 gc: Devlin & Roeder (1999) genomic control corrected p\-value (additive
1439 .IP
1440 models only).
1441 .IP
1442 qq: P\-value quantile.
1443 bonf: Bonferroni correction.
1444 holm: Holm\-Bonferroni (1979) adjusted p\-value.
1445 sidakss: Sidak single\-step adjusted p\-value.
1446 sidaksd: Sidak step\-down adjusted p\-value.
1447 fdrbh: Benjamini & Hochberg (1995) step\-up false discovery control.
1448 fdrby: Benjamini & Yekutieli (2001) step\-up false discovery control.
1449 .IP
1450 Default set is chrom,a1,unadj,gc,bonf,holm,sidakss,sidaksd,fdrbh,fdrby.
1451 .HP
1452 \fB\-\-genotyping\-rate\fR ['dosage']
1453 .IP
1454 Report genotyping rate in log (this was automatic in PLINK 1.x).
1455 .HP
1456 \fB\-\-pgen\-info\fR
1457 .IP
1458 Reports basic information about a .pgen file.
1459 .HP
1460 \fB\-\-validate\fR
1461 .IP
1462 Validates all variant records in a .pgen file.
1463 .HP
1464 \fB\-\-zst\-decompress\fR <.zst file> [output filename]
1465 .IP
1466 (alias: \fB\-\-zd\fR)
1467 Decompress a Zstd\-compressed file. If no output filename is specified, the
1468 file is decompressed to standard output.
1469 This cannot be used with any other flags, and does not cause a log file to
1470 be generated.
1471 .PP
1472 The following other flags are supported.
1473 .TP
1474 \fB\-\-script\fR <fname>
1475 : Include command\-line options from file.
1476 .TP
1477 \fB\-\-rerun\fR [log]
1478 : Rerun commands in log (default 'plink2.log').
1479 .TP
1480 \fB\-\-version\fR
1481 : Display only version number before exiting.
1482 .TP
1483 \fB\-\-silent\fR
1484 : Suppress regular output to console. (Error\-output is
1485 not suppressed.)
1486 .TP
1487 \fB\-\-double\-id\fR
1488 : Set both FIDs and IIDs to the VCF/.bgen sample ID.
1489 .TP
1490 \fB\-\-const\-fid\fR [ID]
1491 : Set all FIDs to the given constant. If '0' (the
1492 default), no FID column is created.
1493 .TP
1494 \fB\-\-id\-delim\fR [d]
1495 : Normally parses single\-delimiter sample IDs as
1496 <FID><d><IID>, and double\-delimiter IDs as
1497 <FID><d><IID><d><SID>; default delimiter is '_'.
1498 \fB\-\-id\-delim\fR can no longer be used with
1499 \fB\-\-double\-id\fR/\-\-const\-fid; it will error out if any ID
1500 lacks the delimiter.
1501 .TP
1502 \fB\-\-idspace\-to\fR <c>
1503 : Convert spaces in VCF/.bgen sample IDs to the given
1504 character.
1505 .TP
1506 \fB\-\-iid\-sid\fR
1507 : Make \fB\-\-id\-delim\fR and \fB\-\-sample\-diff\fR interpret two\-token
1508 sample IDs as IID\-SID instead of FID\-IID.
1509 .TP
1510 \fB\-\-vcf\-require\-gt\fR
1511 : Skip variants with no GT field.
1512 .TP
1513 \fB\-\-vcf\-min\-gq\fR <val>
1514 : No\-call genotypes when GQ is present and below the
1515 threshold.
1516 .TP
1517 \fB\-\-vcf\-max\-dp\fR <val>
1518 : No\-call genotypes when DP is present and above/below
1519 .TP
1520 \fB\-\-vcf\-min\-dp\fR <val>
1521 the threshold.
1522 .TP
1523 \fB\-\-vcf\-half\-call\fR <m> : Specify how '0/.' and similar VCF GT values should be
1524 handled. The following four modes are supported:
1525 * 'error'/'e' (default) errors out and reports line #.
1526 * 'haploid'/'h' treats them as haploid calls.
1527 * 'missing'/'m' treats them as missing.
1528 * 'reference'/'r' treats the missing value as 0.
1529 .TP
1530 \fB\-\-oxford\-single\-chr\fR <chr name>
1531 : Specify single\-chromosome .gen/.bgen file
1532 with no useful chromosome info inside.
1533 .TP
1534 \fB\-\-missing\-code\fR [string list]
1535 : Comma\-delimited list of missing phenotype
1536 .TP
1537 (alias: \fB\-\-missing_code\fR)
1538 values for Oxford\-format import (default
1539 \&'NA').
1540 .TP
1541 \fB\-\-hard\-call\-threshold\fR <val>
1542 : When importing dosage data, a hardcall is
1543 normally saved when the distance from the
1544 nearest hardcall, defined as
1545 .TP
1546 0.5 * sum_i |x_i \- round(x_i)|
1547 (where the x_i's are 0..2 allele dosages),
1548 is not greater than 0.1. You can adjust
1549 this threshold by providing a numeric
1550 argument to \fB\-\-hard\-call\-threshold\fR.
1551 You can also use this with \fB\-\-make\-[b]pgen\fR
1552 to alter the saved hardcalls while leaving
1553 the dosages untouched, or \fB\-\-make\-bed\fR to
1554 tweak hardcall export.
1555 .TP
1556 \fB\-\-dosage\-erase\-threshold\fR <val>
1557 : \fB\-\-hard\-call\-threshold\fR normally preserves
1558 the original dosages, and several PLINK 2
1559 commands use them when they're available.
1560 Use \fB\-\-dosage\-erase\-threshold\fR to make PLINK
1561 2 erase dosages and keep only hardcalls
1562 when distance\-from\-hardcall <= the given
1563 level.
1564 .TP
1565 \fB\-\-import\-dosage\-certainty\fR <val> : The PLINK 2 file format currently supports
1566 a single dosage for each allele. Some
1567 other dosage file formats include a
1568 separate probability for every possible
1569 genotype, e.g. {P(0/0)=0.2, P(0/1)=0.52,
1570 P(1/1)=0.28}, a highly uncertain call that
1571 is nevertheless treated as a hardcall under
1572 \&'\-\-hard\-call\-threshold 0.1'. To make PLINK
1573 2 treat a dosage as missing whenever the
1574 largest probability is less than a
1575 threshold, use \fB\-\-import\-dosage\-certainty\fR.
1576 .TP
1577 \fB\-\-input\-missing\-genotype\fR <c> : '.' is always interpreted as a missing
1578 genotype code in input files. By default, '0'
1579 also is; you can change this second missing
1580 code with \fB\-\-input\-missing\-genotype\fR.
1581 .TP
1582 \fB\-\-allow\-extra\-chr\fR
1583 : Permit unrecognized chromosome codes (alias \fB\-\-aec\fR).
1584 .HP
1585 \fB\-\-chr\-set\fR <autosome ct> ['no\-x'] ['no\-y'] ['no\-xy'] ['no\-mt'] :
1586 .TP
1587 Specify a nonhuman chromosome set.
1588 The first parameter sets the number of
1589 .IP
1590 diploid autosome pairs if positive, or haploid chromosomes if negative.
1591 Given diploid autosomes, the remaining modifiers indicate the absence of
1592 the named non\-autosomal chromosomes.
1593 .HP
1594 \fB\-\-cow\fR/\-\-dog/\-\-horse/\-\-mouse/\-\-rice/\-\-sheep : Shortcuts for those species.
1595 .TP
1596 \fB\-\-autosome\-num\fR <val>
1597 : Alias for '\-\-chr\-set <value> no\-y no\-xy no\-mt'.
1598 .TP
1599 \fB\-\-human\fR
1600 : Explicitly specify human chromosome set, and make
1601 output .pvar/VCF files include a ##chrSet header
1602 line. (.pvar/VCF output files automatically
1603 include ##chrSet when a nonhuman set is specified.)
1604 .TP
1605 \fB\-\-chr\-override\fR ['file'] : By default, if \fB\-\-chr\-set\fR/\-\-autosome\-num/\-\-cow/etc.
1606 conflicts with an input file ##chrSet header line,
1607 PLINK 2 will error out. \fB\-\-chr\-override\fR with no
1608 argument causes the command line to take
1609 precedence; '\-\-chr\-override file' defers to the
1610 file.
1611 .TP
1612 \fB\-\-var\-min\-qual\fR <val>
1613 : Skip variants with low/missing QUAL.
1614 .TP
1615 \fB\-\-var\-filter\fR [exception(s)...]
1616 : Skip variants which have FILTER failures.
1617 .HP
1618 \fB\-\-extract\-if\-info\fR <key> <op> <val> : Exclude variants which don't/do satisfy
1619 .TP
1620 \fB\-\-exclude\-if\-info\fR <key> <op> <val>
1621 a comparison predicate on an INFO key,
1622 .TP
1623 (aliases: \fB\-\-extract\-if\fR,
1624 e.g.
1625 .TP
1626 \fB\-\-exclude\-if\fR)
1627 \fB\-\-extract\-if\-info\fR "VT == SNP"
1628 .TP
1629 Unless the operator is !=, the predicate
1630 always evaluates to false when the key
1631 is missing.
1632 .TP
1633 \fB\-\-require\-info\fR <key(s)...>
1634 : Exclude variants based on nonexistence
1635 .TP
1636 \fB\-\-require\-no\-info\fR <key(s)...>
1637 or existence of an INFO key. "<key>=."
1638 is treated as nonexistence.
1639 .HP
1640 \fB\-\-extract\-col\-cond\fR <f> [valcol] [IDcol] [skip] :
1641 .HP
1642 \fB\-\-extract\-col\-cond\-match\fR <(sub)string(s)...>
1643 .HP
1644 \fB\-\-extract\-col\-cond\-mismatch\fR <(sub)string(s)...>
1645 .HP
1646 \fB\-\-extract\-col\-cond\-substr\fR
1647 .HP
1648 \fB\-\-extract\-col\-cond\-min\fR <min>
1649 .HP
1650 \fB\-\-extract\-col\-cond\-max\fR <max> :
1651 .IP
1652 Exclude all variants without a value\-column entry satisfying a condition.
1653 * By default, values are read from column 2 of the file, and variant IDs
1654 .IP
1655 are read from column 1.
1656 .IP
1657 * Three types of conditions are supported:
1658 .IP
1659 * When \fB\-\-extract\-col\-cond\-match\fR is specified without
1660 .HP
1661 \fB\-\-extract\-col\-cond\-substr\fR, the value is checked for equality with the
1662 .TP
1663 given strings, and kept iff one of them matches.
1664 Similarly,
1665 .HP
1666 \fB\-\-extract\-col\-cond\-mismatch\fR without \fB\-\-extract\-col\-cond\-substr\fR causes
1667 .IP
1668 the variant to be kept iff the value matches none of the given strings.
1669 .IP
1670 * When \fB\-\-extract\-col\-cond\-match\fR and/or \fB\-mismatch\fR are specified with
1671 .HP
1672 \fB\-\-extract\-col\-cond\-substr\fR, the variant is kept iff none of the
1673 .HP
1674 \fB\-\-extract\-col\-cond\-mismatch\fR substrings are contained in the value, and
1675 .IP
1676 either \fB\-\-extract\-col\-cond\-match\fR was unspecified or at least one of its
1677 substrings is contained.
1678 .IP
1679 * Otherwise, the value is interpreted as a number, and the variant is
1680 .IP
1681 kept if the number is in [<min>, <max>] (default min=0, max=DBL_MAX).
1682 .TP
1683 \fB\-\-pheno\fR ['iid\-only'] <f> : Specify additional phenotype/covariate file.
1684 Comma\-delimited files with a header line are now
1685 permitted.
1686 .TP
1687 \fB\-\-pheno\-name\fR <name...>
1688 : Only load the designated phenotype(s) from the
1689 \fB\-\-pheno\fR (if one was specified) or .psam (if no
1690 \fB\-\-pheno\fR) file. Separate multiple names with
1691 spaces or commas, and use dashes to designate
1692 ranges.
1693 .TP
1694 \fB\-\-pheno\-col\-nums\fR <#...>
1695 : Only load the phenotype(s) in the designated
1696 column number(s) from the \fB\-\-pheno\fR file.
1697 .TP
1698 \fB\-\-no\-psam\-pheno\fR
1699 : Ignore phenotype(s) in .psam/.fam file.
1700 .TP
1701 \fB\-\-strict\-sid0\fR
1702 : By default, if there is no SID column in the .psam/.fam
1703 (or \fB\-\-update\-ids\fR) file, but there is one in another
1704 input file (for e.g. \fB\-\-keep\fR/\-\-remove), the latter SID
1705 column is ignored; sample IDs are considered matching as
1706 long as FID and IID are equal (with missing FID treated
1707 as '0'). If you also want to require SID = '0' for a
1708 sample ID match in this situation, add \fB\-\-strict\-sid0\fR.
1709 .TP
1710 \fB\-\-input\-missing\-phenotype\fR <v> : Set nonzero number to treat as a missing
1711 pheno/covar in input files (default \fB\-9\fR).
1712 .TP
1713 \fB\-\-no\-input\-missing\-phenotype\fR
1714 : Don't treat any nonzero number as a missing
1715 pheno/covar. ('NA'/'nan' are still treated
1716 as missing.)
1717 .TP
1718 \fB\-\-1\fR
1719 : Expect case/control phenotypes in input files
1720 to be coded as 0 = control, 1 = case, instead
1721 of the usual 0 = missing, 1 = ctrl, 2 = case.
1722 (Unlike PLINK 1.x, this does not force all
1723 phenotypes to be interpreted as case/ctrl.)
1724 .TP
1725 \fB\-\-missing\-catname\fR <str>
1726 : Set missing\-categorical\-phenotype string
1727 (case\-sensitive, default 'NONE').
1728 .TP
1729 \fB\-\-covar\fR ['iid\-only'] <f> : Specify additional covariate file.
1730 Comma\-delimited files with a header line are now
1731 permitted.
1732 .TP
1733 \fB\-\-covar\-name\fR <name...>
1734 : Only load the designated covariate(s) from the
1735 \fB\-\-covar\fR (if one was specified), \fB\-\-pheno\fR (if no
1736 \fB\-\-covar\fR), or .psam (if no \fB\-\-covar\fR or \fB\-\-pheno\fR)
1737 file.
1738 .TP
1739 \fB\-\-covar\-col\-nums\fR <#...>
1740 : Only load the covariate(s) in the designated
1741 column number(s) from the \fB\-\-covar\fR (if one was
1742 specified) or \fB\-\-pheno\fR (if no \fB\-\-covar\fR) file.
1743 .TP
1744 \fB\-\-within\fR <f> [new pheno name] : Import a PLINK 1.x categorical phenotype.
1745 (Phenotype name defaults to 'CATPHENO'.)
1746 * If any numeric values are present, ALL
1747 .TP
1748 values must be numeric.
1749 In that case, 'C'
1750 .TP
1751 is added in front of all category names.
1752 * 'NA' is treated as a missing value.
1753 .TP
1754 \fB\-\-mwithin\fR <n>
1755 : Load \fB\-\-within\fR categories from column n+2.
1756 .TP
1757 \fB\-\-family\fR [new pheno name]
1758 : Create a categorical phenotype from FID.
1759 Restrictions on and handling of numeric
1760 values are the same as for \fB\-\-within\fR.
1761 .TP
1762 \fB\-\-family\-missing\-catname\fR <nm> : Make \fB\-\-family\fR treat the specified FID as
1763 missing.
1764 .TP
1765 \fB\-\-keep\fR <fname...>
1766 : Exclude all samples not named in a file.
1767 .TP
1768 \fB\-\-remove\fR <fname...>
1769 : Exclude all samples named in a file.
1770 .TP
1771 \fB\-\-keep\-fam\fR <fn...>
1772 : Exclude all families not named in a file.
1773 .TP
1774 \fB\-\-remove\-fam\fR <f...>
1775 : Exclude all families named in a file.
1776 .HP
1777 \fB\-\-extract\fR [{bed0 | bed1}] <f...> : Usually excludes all variants (not) named
1778 .TP
1779 \fB\-\-exclude\fR [{bed0 | bed1}] <f...>
1780 in the given file(s). When multiple files
1781 are named, they are concatenated.
1782 With the 'bed0' or 'bed1' modifier,
1783 variants outside/inside the positional
1784 ranges in the interval\-BED file(s) are
1785 excluded instead. 'bed0' tells PLINK 2 to
1786 assume the interval bounds follow the UCSC
1787 0\-based half\-open convention, while 'bed1'
1788 (equivalent to PLINK 1.9 'range')
1789 specifies 1\-based fully\-closed.
1790 .TP
1791 \fB\-\-extract\-intersect\fR [{bed0 | bed1}] <f...> : Just like \fB\-\-extract\fR, except that
1792 a variant must be in the
1793 intersection, rather than just
1794 the union, of the files to
1795 remain.
1796 .TP
1797 \fB\-\-bed\-border\-bp\fR <n>
1798 : Stretch BED intervals by the given amount on each
1799 .TP
1800 \fB\-\-bed\-border\-kb\fR <n>
1801 side.
1802 .TP
1803 \fB\-\-keep\-cats\fR <filename>
1804 : These can be used individually or in combination
1805 .TP
1806 \fB\-\-keep\-cat\-names\fR <nm...>
1807 to define a list of categories to keep; all
1808 samples not in one of the named categories are
1809 excluded. Use spaces to separate category names
1810 for \fB\-\-keep\-cat\-names\fR. Use the \fB\-\-missing\-catname\fR
1811 value (default 'NONE') to refer to the group of
1812 uncategorized samples.
1813 .TP
1814 \fB\-\-keep\-cat\-pheno\fR <pheno> : If more than one categorical phenotype is loaded,
1815 or you wish to filter on a categorical covariate,
1816 \fB\-\-keep\-cat\-pheno\fR must be used to specify which
1817 phenotype/covariate \fB\-\-keep\-cats\fR and
1818 \fB\-\-keep\-cat\-names\fR apply to.
1819 .HP
1820 \fB\-\-remove\-cats\fR <filename> : Exclude all categories named in the file.
1821 .HP
1822 \fB\-\-remove\-cat\-names\fR <...> : Exclude named categories.
1823 .HP
1824 \fB\-\-remove\-cat\-pheno\fR <phe> : Specify pheno for \fB\-\-remove\-cats\fR/remove\-cat\-names.
1825 .TP
1826 \fB\-\-split\-cat\-pheno\fR [{omit\-most | omit\-last}] ['covar\-01']
1827 [cat. pheno/covar name(s)...] :
1828 .IP
1829 Split n\-category phenotype(s) into n (or n\-1, with 'omit\-most'/'omit\-last')
1830 binary phenotypes, with names of the form <orig. pheno name>=<cat. name>.
1831 (As a consequence, affected phenotypes and categories are not permitted to
1832 contain the '=' character.)
1833 * This happens after all sample filters.
1834 * If no phenotype or covariate names are provided, all categorical
1835 .IP
1836 phenotypes (but not covariates) are processed.
1837 .TP
1838 * By default, generated covariates are coded as 1=false, 2=true.
1839 To code
1840 .IP
1841 them as 0=false, 1=true instead, add the 'covar\-01' modifier.
1842 .TP
1843 \fB\-\-loop\-cats\fR <pheno/covar>
1844 : Run variant filters and subsequent operations
1845 on just the samples in the first category; then
1846 just the samples in the second category; and so
1847 on, for all categories in the named categorical
1848 phenotype.
1849 .TP
1850 \fB\-\-no\-id\-header\fR ['iid\-only'] : Don't include a header line in .id output
1851 files. This normally forces two\-column FID/IID
1852 output; add 'iid\-only' to force just
1853 single\-column IID.
1854 .HP
1855 \fB\-\-variance\-standardize\fR [pheno/covar name(s)...]
1856 .HP
1857 \fB\-\-covar\-variance\-standardize\fR [covar name(s)...] :
1858 .IP
1859 Linearly transform named covariates (and quantitative phenotypes, if
1860 \fB\-\-variance\-standardize\fR) to mean\-zero, variance 1. If no arguments are
1861 provided, all possible phenotypes/covariates are affected.
1862 This is frequently necessary to prevent multicollinearity when dealing with
1863 covariates where abs(mean) is much larger than abs(standard deviation),
1864 such as year of birth.
1865 .TP
1866 \fB\-\-quantile\-normalize\fR [...]
1867 : Force named covariates and quantitative
1868 .TP
1869 \fB\-\-pheno\-quantile\-normalize\fR [...]
1870 phenotypes to a N(0,1) distribution,
1871 .TP
1872 \fB\-\-covar\-quantile\-normalize\fR [...]
1873 preserving only the original rank orders.
1874 .TP
1875 \fB\-\-chr\fR <chr(s)...>
1876 : Exclude all variants not on the given chromosome(s).
1877 Valid choices for humans are 0 (unplaced), 1\-22, X, Y,
1878 XY, MT, PAR1, and PAR2. Separate multiple chromosomes
1879 with spaces and/or commas, and use a dash (no adjacent
1880 spaces permitted) to denote a range, e.g.
1881 \&'\-\-chr 1\-4, 22, par1, x, par2'.
1882 .TP
1883 \fB\-\-not\-chr\fR <...>
1884 : Reverse of \fB\-\-chr\fR (exclude variants on listed
1885 chromosomes).
1886 .TP
1887 \fB\-\-autosome\fR
1888 : Exclude all non\-autosomal variants.
1889 .TP
1890 \fB\-\-autosome\-par\fR
1891 : Exclude all non\-autosomal variants, except those in a
1892 pseudo\-autosomal region.
1893 .TP
1894 \fB\-\-snps\-only\fR ['just\-acgt'] : Exclude non\-SNP variants.
1895 By default, SNP = all
1896 allele codes are single\-character (so
1897 multiallelic variants with a mix of SNPs and
1898 non\-SNPs are excluded; split your variants first
1899 if that's a problem).
1900 The 'just\-acgt' modifier restricts SNP codes to
1901 {A,C,G,T,a,c,g,t,<missing>}.
1902 .TP
1903 \fB\-\-from\fR <var ID>
1904 : Use ID(s) to specify a variant range to load. When used
1905 .TP
1906 \fB\-\-to\fR
1907 <var ID> together, both variants must be on the same chromosome.
1908 (\fB\-\-snps\fR can be used to specify intervals which cross
1909 chromosome boundaries.)
1910 .TP
1911 \fB\-\-snp\fR
1912 <var ID> : Specify a single variant to load.
1913 .HP
1914 \fB\-\-exclude\-snp\fR <ID> : Specify a single variant to exclude.
1915 .TP
1916 \fB\-\-window\fR
1917 <kbs> : With \fB\-\-snp\fR/\-\-exclude\-snp, loads/excludes all variants
1918 within half the specified kb distance of the named one.
1919 .TP
1920 \fB\-\-from\-bp\fR <pos>
1921 : Use base\-pair coordinates to define a variant range to
1922 .TP
1923 \fB\-\-to\-bp\fR
1924 <pos> load.
1925 .TP
1926 \fB\-\-from\-kb\fR <pos>
1927 * You must use these with \fB\-\-chr\fR, specifying a single
1928 .TP
1929 \fB\-\-to\-kb\fR
1930 <pos> chromosome.
1931 .TP
1932 \fB\-\-from\-mb\fR <pos>
1933 * Decimals and negative numbers are permitted.
1934 .TP
1935 \fB\-\-to\-mb\fR
1936 <pos> * The \fB\-\-to\-bp\fR(/\-kb/\-mb) position is no longer permitted
1937 to be smaller than the \fB\-\-from\-bp\fR position.
1938 .TP
1939 \fB\-\-snps\fR <var IDs...>
1940 : Use IDs to specify variant range(s) to load or
1941 .TP
1942 \fB\-\-exclude\-snps\fR <...>
1943 exclude. E.g. '\-\-snps rs1111\-rs2222, rs3333, rs4444'.
1944 .TP
1945 \fB\-\-force\-intersect\fR
1946 : PLINK 2 normally errors out when multiple variant
1947 inclusion filters (\fB\-\-extract\fR, \fB\-\-extract\-col\-cond\fR,
1948 \fB\-\-extract\-intersect\fR, \fB\-\-from\fR/\-\-to, \fB\-\-from\-bp\fR/\-\-to\-bp,
1949 \fB\-\-snp\fR, \fB\-\-snps\fR) are specified. \fB\-\-force\-intersect\fR
1950 allows the run to proceed; the set intersection will
1951 be taken.
1952 .TP
1953 \fB\-\-thin\fR <p>
1954 : Randomly remove variants, retaining each with prob. p.
1955 .TP
1956 \fB\-\-thin\-count\fR <n>
1957 : Randomly remove variants until n of them remain.
1958 .TP
1959 \fB\-\-bp\-space\fR <bps>
1960 : Remove variants so that each pair is no closer than
1961 the given bp distance.
1962 .TP
1963 \fB\-\-thin\-indiv\fR <p>
1964 : Randomly remove samples, retaining with prob. p.
1965 .HP
1966 \fB\-\-thin\-indiv\-count\fR <n> : Randomly remove samples until n of them remain.
1967 .TP
1968 \fB\-\-keep\-col\-match\fR <f> <val(s)...> : Exclude all samples without a 3rd column
1969 entry in the given file exactly matching
1970 one of the given strings. (Separate
1971 multiple strings with spaces.)
1972 .HP
1973 \fB\-\-keep\-col\-match\-name\fR <col name> : Check column with given name instead.
1974 .TP
1975 \fB\-\-keep\-col\-match\-num\fR <n>
1976 : Check nth column instead.
1977 .HP
1978 \fB\-\-geno\fR [val] [{dosage | hh\-missing}]
1979 .HP
1980 \fB\-\-mind\fR [val] [{dosage | hh\-missing}] :
1981 .IP
1982 Exclude variants (\fB\-\-geno\fR) and/or samples (\fB\-\-mind\fR) with missing call
1983 frequencies greater than a threshold (default 0.1). (Note that the default
1984 threshold is only applied if \fB\-\-geno\fR/\-\-mind is invoked without an argument;
1985 when \fB\-\-geno\fR/\-\-mind is not invoked, no missing call frequency ceiling is
1986 enforced at all. Other inclusion/exclusion default thresholds work the
1987 same way.)
1988 By default, when a dosage is present but a hardcall is not, the genotype is
1989 treated as missing; add the 'dosage' modifier to treat this case as
1990 nonmissing. Alternatively, you can use 'hh\-missing' to also treat
1991 heterozygous haploid calls as missing.
1992 .HP
1993 \fB\-\-require\-pheno\fR [name(s)...] : Remove samples missing any of the named
1994 .TP
1995 \fB\-\-require\-covar\fR [name(s)...]
1996 phenotype(s)/covariate(s). If no arguments
1997 are provided, all phenotype(s)/covariate(s)
1998 must be present.
1999 .TP
2000 \fB\-\-maf\fR [freq] [mode]
2001 : Exclude variants with allele frequency lower than a
2002 .TP
2003 (alias: \fB\-\-min\-af\fR)
2004 threshold (default 0.01). By default, the nonmajor
2005 allele frequency is used; the other supported modes
2006 are 'nref' (non\-reference), 'alt1', and 'minor'
2007 (least frequent). bcftools freq:mode notation is
2008 permitted.
2009 .HP
2010 \fB\-\-max\-maf\fR <freq> [mode] : Exclude variants with MAF greater than the
2011 .TP
2012 (alias: \fB\-\-max\-af\fR)
2013 threshold.
2014 .TP
2015 \fB\-\-mac\fR <ct> [mode]
2016 : Exclude variants with allele dosage lower than the
2017 .TP
2018 (alias: \fB\-\-min\-ac\fR)
2019 given threshold.
2020 .TP
2021 \fB\-\-max\-mac\fR <ct> [mode]
2022 : Exclude variants with allele dosage greater than
2023 .TP
2024 (alias: \fB\-\-max\-ac\fR)
2025 the given threshold.
2026 .TP
2027 \fB\-\-maf\-succ\fR
2028 : Rule of succession allele frequency estimation (used in
2029 EIGENSOFT). Given j observations of one allele and k
2030 observations of the other for a biallelic variant, infer
2031 allele frequencies of (j+1) / (j+k+2) and
2032 (k+1) / (j+k+2), rather than the default j / (j+k) and
2033 k / (j+k).
2034 Note that this does not affect \fB\-\-freq\fR's output.
2035 .TP
2036 \fB\-\-min\-alleles\fR <ct> : Exclude variants with fewer than the given # of alleles.
2037 (When a variant has exactly one ALT allele, and it's
2038 a missing\-code, it's excluded by "\-\-min\-alleles 2".)
2039 .HP
2040 \fB\-\-max\-alleles\fR <ct> : Exclude variants with more than the given # of alleles.
2041 .TP
2042 \fB\-\-read\-freq\fR <file> : Load allele frequency estimates from the given \fB\-\-freq\fR or
2043 \fB\-\-geno\-counts\fR (or PLINK 1.9 \fB\-\-freqx\fR) report, instead of
2044 imputing them from the immediate dataset.
2045 .HP
2046 \fB\-\-hwe\fR <p> ['midp'] ['keep\-fewhet'] :
2047 .IP
2048 Exclude variants with Hardy\-Weinberg equilibrium exact test p\-values below
2049 a threshold.
2050 * By default, only founders are considered.
2051 * chrX p\-values are now computed using Graffelman and Weir's method.
2052 * For variants with k alleles with k>2, k separate 'biallelic' tests are
2053 .IP
2054 performed, and the variant is filtered out if any of them fail.
2055 .IP
2056 * With 'keep\-fewhet', variants which fail the test in the too\-few\-hets
2057 .TP
2058 direction are not excluded.
2059 On chrX, this uses the ratio between the
2060 .IP
2061 Graffelman/Weir p\-value and the female\-only p\-value.
2062 .IP
2063 * There is currently no special handling of case/control phenotypes.
2064 .TP
2065 \fB\-\-mach\-r2\-filter\fR [min] [max] : Exclude variants with MaCH imputation quality
2066 metric less than min or greater than max
2067 (defaults 0.1 and 2.0). (Monomorphic
2068 variants, with r2 = nan, are not excluded.)
2069 * This is NOT identical to the R2 metric
2070 .TP
2071 reported by Minimac3 0.1.13+; see below.
2072 * If a single argument is provided, it is
2073 .TP
2074 treated as the minimum.
2075 * The metric is not computed on chrX and MT.
2076 .TP
2077 \fB\-\-minimac3\-r2\-filter\fR <min> [max] : Compute Minimac3 R2 values from scratch,
2078 and exclude variants with R2 less than min
2079 or (if max is provided) greater than max.
2080 * Note that this requires phased\-dosage
2081 .TP
2082 data for all samples and variants;
2083 otherwise this will systematically
2084 underestimate imputation quality, since
2085 unphased hardcalls/dosages are treated
2086 as if they were maximally uncertain.
2087 (Use \fB\-\-extract\-if\-info\fR/\-\-exclude\-if\-info
2088 to filter on precomputed Minimac3 R2 in
2089 a VCF/.pvar INFO column.)
2090 .TP
2091 \fB\-\-keep\-females\fR
2092 : Exclude male and unknown\-sex samples.
2093 .TP
2094 \fB\-\-keep\-males\fR
2095 : Exclude female and unknown\-sex samples.
2096 .TP
2097 \fB\-\-keep\-nosex\fR
2098 : Exclude all known\-sex samples.
2099 .TP
2100 \fB\-\-remove\-females\fR
2101 : Exclude female samples.
2102 .TP
2103 \fB\-\-remove\-males\fR
2104 : Exclude male samples.
2105 .TP
2106 \fB\-\-remove\-nosex\fR
2107 : Exclude unknown\-sex samples.
2108 .TP
2109 \fB\-\-keep\-founders\fR
2110 : Exclude nonfounder samples.
2111 .HP
2112 \fB\-\-keep\-nonfounders\fR : Exclude founder samples.
2113 .HP
2114 \fB\-\-keep\-if\fR <pheno/covar> <op> <val> : Exclude samples which don't/do satisfy a
2115 .TP
2116 \fB\-\-remove\-if\fR <pheno/covar> <op> <v>
2117 comparison predicate, e.g.
2118 \fB\-\-keep\-if\fR "PHENO1 == case"
2119 .TP
2120 Unless the operator is !=, the predicate
2121 always evaluates to false when the
2122 phenotype/covariate is missing.
2123 .TP
2124 \fB\-\-nonfounders\fR
2125 : Include nonfounders in allele freq/HWE calculations.
2126 .TP
2127 \fB\-\-bad\-freqs\fR
2128 : When PLINK 2 needs decent allele frequencies, it
2129 normally errors out if they aren't provided by
2130 \fB\-\-read\-freq\fR and less than 50 founders are available to
2131 impute them from. Use \fB\-\-bad\-freqs\fR to force PLINK 2 to
2132 proceed in this case.
2133 .TP
2134 \fB\-\-bad\-ld\fR
2135 : PLINK 2 normally errors out when it needs to estimate LD
2136 between variants, but there are less than 50 founders to
2137 estimate from. Use \fB\-\-bad\-ld\fR to force PLINK 2 to
2138 proceed.
2139 .TP
2140 \fB\-\-export\-allele\fR <file> : With \fB\-\-export\fR A/A\-transpose/AD, count alleles named
2141 in the file, instead of REF alleles.
2142 .TP
2143 \fB\-\-output\-chr\fR <MT code> : Set chromosome coding scheme in output files by
2144 providing the desired human mitochondrial code.
2145 Options are '26', 'M', 'MT', '0M', 'chr26', 'chrM',
2146 and 'chrMT'; default is now 'MT' (note that this is
2147 a change from PLINK 1.x, which defaulted to '26').
2148 .TP
2149 \fB\-\-output\-missing\-genotype\fR <ch> : Set the code used to represent missing
2150 genotypes in output files (default '.').
2151 .TP
2152 \fB\-\-output\-missing\-phenotype\fR <s> : Set the string used to represent missing
2153 phenotypes in output files (default 'NA').
2154 .TP
2155 \fB\-\-sort\-vars\fR [mode]
2156 : Sort variants by chromosome, then position, then
2157 ID. The following string orders are supported:
2158 * 'natural'/'n': Natural sort (default).
2159 * 'ascii'/'a': ASCII.
2160 This must be used with \fB\-\-make\-[b]pgen\fR/\-\-make\-bed.
2161 .TP
2162 \fB\-\-set\-hh\-missing\fR ['keep\-dosage'] : Make \fB\-\-make\-[b]pgen\fR/\-\-make\-bed set non\-MT
2163 heterozygous haploid hardcalls, and all
2164 female chrY calls, to missing. (Unlike
2165 PLINK 1.x, this treats unknown\-sex chrY
2166 genotypes like males, not females.)
2167 By default, all associated dosages are
2168 also erased; use 'keep\-dosage' to keep
2169 them all.
2170 .TP
2171 \fB\-\-set\-mixed\-mt\-missing\fR ['keep\-dosage'] : Make \fB\-\-make\-[b]pgen\fR/\-\-make\-bed set
2172 mixed MT hardcalls to missing.
2173 .HP
2174 \fB\-\-split\-par\fR <bp1> <bp2> : Changes chromosome code of all X chromosome
2175 .TP
2176 \fB\-\-split\-par\fR <build>
2177 variants with bp position <= bp1 to PAR1, and those
2178 with position >= bp2 to PAR2. The following build
2179 codes are supported as shorthand:
2180 * 'b36'/'hg18' = NCBI 36, 2709521/154584237
2181 * 'b37'/'hg19' = GRCh37, 2699520/154931044
2182 * 'b38'/'hg38' = GRCh38, 2781479/155701383
2183 .TP
2184 \fB\-\-merge\-par\fR
2185 : Merge PAR1/PAR2 back with X. Requires PAR1 to be
2186 positioned immediately before X, and PAR2 to be
2187 immediately after X. (Should *not* be used with
2188 "\-\-export vcf", since it causes male
2189 homozygous/missing calls in PAR1/PAR2 to be
2190 reported as haploid.)
2191 .TP
2192 \fB\-\-merge\-x\fR
2193 : Merge XY back with X. This usually has to be
2194 combined with \fB\-\-sort\-vars\fR.
2195 .TP
2196 \fB\-\-set\-missing\-var\-ids\fR <t>
2197 : Given a template string with a '@' where the
2198 .TP
2199 \fB\-\-set\-all\-var\-ids\fR <t>
2200 chromosome code should go and '#' where the bp
2201 coordinate belongs, \fB\-\-set\-missing\-var\-ids\fR
2202 assigns chromosome\-and\-bp\-based IDs to unnamed
2203 variants, while \fB\-\-set\-all\-var\-ids\fR resets all
2204 IDs.
2205 You may also use '$r'/'$a' to refer to the
2206 ref and alt1 alleles, or '$1'/'$2' to refer to
2207 them in alphabetical order.
2208 .TP
2209 \fB\-\-var\-id\-multi\fR <t>
2210 : Specify alternative templates for multiallelic
2211 .TP
2212 \fB\-\-var\-id\-multi\-nonsnp\fR <t>
2213 variants. ('$a' and '$1'/'$2' should be avoided
2214 here, though they're technically still allowed.)
2215 .HP
2216 \fB\-\-new\-id\-max\-allele\-len\fR <len> [{error | missing | truncate}] :
2217 .IP
2218 Specify maximum number of leading characters from allele codes to include
2219 in new variant IDs, and behavior on longer codes (defaults 23, error).
2220 .TP
2221 \fB\-\-missing\-var\-code\fR <str>
2222 : Change unnamed variant code for \fB\-\-rm\-dup\fR,
2223 \fB\-\-set\-\fR{missing|all}\-var\-ids, and
2224 \fB\-\-recover\-var\-ids\fR (default '.').
2225 .TP
2226 \fB\-\-update\-map\fR
2227 <f> [bpcol] [IDcol] [skip] : Update variant bp positions.
2228 .HP
2229 \fB\-\-update\-name\fR <f> [newcol] [oldcol] [skip] : Update variant IDs.
2230 .HP
2231 \fB\-\-recover\-var\-ids\fR <file> ['strict\-bim\-order'] [{rigid | force}] ['partial'] :
2232 .TP
2233 Undo \fB\-\-set\-all\-var\-ids\fR, given the original .pvar/VCF/.bim file.
2234 Original
2235 .IP
2236 IDs are looked up by position and allele codes.
2237 * By default, if the original\-ID file is a .bim, allele order is ignored.
2238 .IP
2239 Use 'strict\-bim\-order' to force A1=ALT, A2=REF.
2240 .IP
2241 * If any variant has multiple matching records in the original\-ID file, and
2242 .IP
2243 the IDs conflict, \fB\-\-recover\-var\-ids\fR writes the affected (current) ID(s)
2244 to <output prefix>.recoverid.dup, and normally errors out. If the
2245 original\-ID file has the same number of variants in the same order, you
2246 can still recover the old IDs with the 'rigid' modifier in this case.
2247 Alternatively, to proceed and assign the missing\-ID code to these
2248 variants, add the 'force' modifier. (The .recoverid.dup file is still
2249 written when 'rigid' or 'force' is specified.)
2250 .IP
2251 * \fB\-\-recover\-var\-ids\fR normally expects to replace all variant IDs, and errors
2252 .TP
2253 out if any are left untouched.
2254 Add the 'partial' modifier when you
2255 .IP
2256 actually want to update just a proper subset.
2257 .TP
2258 \fB\-\-update\-alleles\fR <fname>
2259 : Update variant allele codes.
2260 .TP
2261 \fB\-\-update\-ids\fR <fname>
2262 : Update sample IDs.
2263 .TP
2264 \fB\-\-update\-parents\fR <fname>
2265 : Update parental IDs.
2266 .HP
2267 \fB\-\-update\-sex\fR <filename> ['col\-num='<n>] ['male0'] :
2268 .IP
2269 Update sex information.
2270 * By default, if there is a header line starting with '#FID'/'#IID', sex is
2271 .IP
2272 loaded from the first column titled 'SEX' (any capitalization);
2273 otherwise, column 3 is assumed. Use 'col\-num=' to force a column number.
2274 .TP
2275 * Only the first character in the sex column is processed.
2276 By default,
2277 .IP
2278 \&'1'/'M'/'m' is interpreted as male, '2'/'F'/'f' is interpreted as female,
2279 and '0'/'N' is interpreted as unknown\-sex. To change this to '0'/'M'/'m'
2280 = male, '1'/'F'/'f' = female, anything else other than '2' = unknown\-sex,
2281 add 'male0'.
2282 .TP
2283 \fB\-\-real\-ref\-alleles\fR
2284 : Treat A2 alleles in a PLINK 1.x fileset as actual REF
2285 alleles; otherwise they're marked as provisional.
2286 .TP
2287 \fB\-\-maj\-ref\fR ['force'] : Set major alleles to reference, like PLINK 1.x
2288 automatically did. (Note that this is now opt\-in
2289 rather than opt\-out; \fB\-\-keep\-allele\-order\fR is no longer
2290 necessary to prevent allele\-swapping.)
2291 * This can only be used in runs with
2292 .TP
2293 \fB\-\-make\-bed\fR/\-\-make\-[b]pgen/\-\-export and no other
2294 commands.
2295 .TP
2296 * By default, this only affects variants marked as
2297 having 'provisional' reference alleles. Add 'force'
2298 to apply this to all variants.
2299 .IP
2300 * All new reference alleles are marked as provisional.
2301 .HP
2302 \fB\-\-ref\-allele\fR ['force'] <filename> [refcol] [IDcol] [skip]
2303 .HP
2304 \fB\-\-alt1\-allele\fR ['force'] <filename> [alt1col] [IDcol] [skip] :
2305 .IP
2306 These set the alleles specified in the file to ref (\fB\-\-ref\-allele\fR) or alt1
2307 (\fB\-\-alt1\-allele\fR). They can be combined in the same run.
2308 * These can only be used in runs with \fB\-\-make\-bed\fR/\-\-make\-[b]pgen/\-\-export
2309 .IP
2310 and no other commands.
2311 .IP
2312 * "\-\-ref\-allele <VCF filename> 4 3 '#'", which scrapes reference allele
2313 .IP
2314 assignments from a VCF file, is especially useful.
2315 .IP
2316 * By default, these error out when asked to change a 'known' reference
2317 .TP
2318 allele.
2319 Add 'force' to permit that (when e.g. switching to a new
2320 .IP
2321 reference genome).
2322 .IP
2323 * When \fB\-\-alt1\-allele\fR changes the previous ref allele to alt1, the previous
2324 .IP
2325 alt1 allele is set to reference and marked as provisional.
2326 .TP
2327 \fB\-\-ref\-from\-fa\fR ['force'] : This sets reference alleles from the \fB\-\-fa\fR file when
2328 it can be done unambiguously (note that it's never
2329 possible for deletions or some insertions).
2330 By default, it errors out when asked to change a
2331 \&'known' reference allele; add the 'force' modifier
2332 to permit that.
2333 .TP
2334 \fB\-\-normalize\fR ['list']
2335 : Left\-normalize all variants, using the \fB\-\-fa\fR file.
2336 .TP
2337 (alias: \fB\-\-norm\fR)
2338 (Assumes no differences in capitalization.) The
2339 \&'list' modifier causes a list of affected variant
2340 IDs to be written to <output prefix>.normalized.
2341 .TP
2342 \fB\-\-indiv\-sort\fR <mode> [f] : Specify sample ID sort order for merge and
2343 \fB\-\-make\-[b]pgen\fR/\-\-make\-bed. The following four
2344 modes are supported:
2345 * 'none'/'0' keeps samples in the order they were
2346 .TP
2347 loaded.
2348 Default for non\-merge.
2349 .TP
2350 * 'natural'/'n' invokes "natural sort", e.g.
2351 \&'id2' < 'ID3' < 'id10'. Default when merging.
2352 .TP
2353 * 'ascii'/'a' sorts in ASCII order, e.g.
2354 \&'ID3' < 'id10' < 'id2'.
2355 .TP
2356 * 'file'/'f' uses the order in the given file
2357 (named in the last argument).
2358 .TP
2359 \fB\-\-king\-table\-filter\fR <min>
2360 : Specify minimum kinship coefficient for
2361 inclusion in \fB\-\-make\-king\-table\fR report.
2362 .TP
2363 \fB\-\-king\-table\-subset\fR <f> [kmin] : Restrict current \fB\-\-make\-king\-table\fR run to
2364 sample pairs listed in the given .kin0 file.
2365 If a second argument is provided, only
2366 sample pairs with kinship >= that threshold
2367 (in the input .kin0) are processed.
2368 .HP
2369 \fB\-\-condition\fR <variant ID> [{dominant | recessive}] ['multiallelic']
2370 .HP
2371 \fB\-\-condition\-list\fR <fname> [{dominant | recessive}] ['multiallelic'] :
2372 .IP
2373 Add the given variant, or all variants in the given file, as \fB\-\-glm\fR
2374 covariates.
2375 By default, this errors out if any of the variants are multiallelic; add
2376 the 'multiallelic' ('m' for short) modifier to allow them. They'll
2377 effectively be split against the major allele (unless \fB\-\-glm\fR's 'omit\-ref'
2378 modifier was specified), and all induced covariate names\-\-even for
2379 biallelic variants\-\-will have an underscore followed by the allele code at
2380 the end.
2381 .TP
2382 \fB\-\-parameters\fR <...> : Include only the given covariates/interactions in the
2383 \fB\-\-glm\fR model, identified by a list of 1\-based indices
2384 and/or ranges of them.
2385 .TP
2386 \fB\-\-tests\fR <...>
2387 : Perform a (joint) test on the specified term(s) in the
2388 .TP
2389 \fB\-\-tests\fR all \fB\-\-glm\fR model, identified by 1\-based indices and/or ranges
2390 of them.
2391 * Note that, when \fB\-\-parameters\fR is also present, the
2392 .TP
2393 indices refer to the terms remaining AFTER pruning by
2394 \fB\-\-parameters\fR.
2395 .IP
2396 * You can use '\-\-tests all' to include all terms.
2397 .TP
2398 \fB\-\-vif\fR <max VIF>
2399 : Set VIF threshold for \fB\-\-glm\fR multicollinearity check
2400 (default 50). (This is no longer skipped for
2401 case/control phenotypes.)
2402 .TP
2403 \fB\-\-max\-corr\fR <val>
2404 : Skip \fB\-\-glm\fR regression when the absolute value of the
2405 correlation between two predictors exceeds this value
2406 (default 0.999).
2407 .TP
2408 \fB\-\-xchr\-model\fR <m>
2409 : Set the chrX \fB\-\-glm\fR/\-\-condition[\-list]/\-\-[v]score model.
2410 * '0' = skip chrX.
2411 * '1' = add sex as a covar on chrX, code males 0..1.
2412 * '2' (default) = chrX sex covar, code males 0..2.
2413 (Use the \fB\-\-glm\fR 'interaction' modifier to test for
2414 interaction between genotype and sex.)
2415 .HP
2416 \fB\-\-adjust\fR ['zs'] ['gc'] ['log10'] ['cols='<column set descriptor>] :
2417 .IP
2418 For each association test in this run, report some basic multiple\-testing
2419 corrections, sorted in increasing\-p\-value order. Modifiers work the same
2420 way as they do on \fB\-\-adjust\-file\fR.
2421 .TP
2422 \fB\-\-lambda\fR
2423 : Set genomic control lambda for \fB\-\-adjust[\-file]\fR.
2424 .TP
2425 \fB\-\-adjust\-chr\-field\fR <n...>
2426 : Set \fB\-\-adjust\-file\fR input field names. When
2427 .TP
2428 \fB\-\-adjust\-pos\-field\fR <n...>
2429 multiple arguments are given to these flags,
2430 .TP
2431 \fB\-\-adjust\-id\-field\fR <n...>
2432 earlier names take precedence over later ones.
2433 .HP
2434 \fB\-\-adjust\-ref\-field\fR <n...>
2435 .HP
2436 \fB\-\-adjust\-alt\-field\fR <n...>
2437 .HP
2438 \fB\-\-adjust\-a1\-field\fR <n...>
2439 .HP
2440 \fB\-\-adjust\-test\-field\fR <n...>
2441 .HP
2442 \fB\-\-adjust\-p\-field\fR <n...>
2443 .TP
2444 \fB\-\-ci\fR <size>
2445 : Report confidence ratios for odds ratios/betas.
2446 .TP
2447 \fB\-\-pfilter\fR <val>
2448 : Filter out assoc. test results with higher p\-values.
2449 .TP
2450 \fB\-\-score\-col\-nums\fR <...> : Process all the specified coefficient columns in the
2451 \fB\-\-score\fR file, identified by 1\-based indexes and/or
2452 ranges of them.
2453 .HP
2454 \fB\-\-q\-score\-range\fR <range file> <data file> [i] [j] ['header'] ['min'] :
2455 .IP
2456 Apply \fB\-\-score\fR to subset(s) of variants in the primary score list(s) based
2457 on e.g. p\-value ranges.
2458 * The first file should have range labels in the first column, p\-value
2459 .IP
2460 lower bounds in the second column, and upper bounds in the third column.
2461 Lines with too few entries, or nonnumeric values in the second or third
2462 column, are ignored.
2463 .IP
2464 * The second file should contain a variant ID and a p\-value on each line
2465 .TP
2466 (except possibly the first).
2467 Variant IDs are read from column #i and
2468 .IP
2469 p\-values are read from column #j, where i defaults to 1 and j defaults to
2470 i+1. The 'header' modifier causes the first nonempty line of this file
2471 to be skipped.
2472 .IP
2473 * By default, \fB\-\-q\-score\-range\fR errors out when a variant ID appears multiple
2474 .TP
2475 times in the data file (and is also present in the main dataset).
2476 To use
2477 .IP
2478 the minimum p\-value in this case instead, add the 'min' modifier.
2479 .TP
2480 \fB\-\-vscore\-col\-nums\fR <...> : Process all the specified coefficient columns in
2481 the \fB\-\-variant\-score\fR file, identified by 1\-based
2482 indexes and/or ranges of them.
2483 .TP
2484 \fB\-\-parallel\fR <k> <n> : Divide the output matrix into n pieces, and only compute
2485 the kth piece. The primary output file will have the
2486 piece number included in its name, e.g. plink2.king.13
2487 or plink2.king.13.zst if k is 13. Concatenating these
2488 files in order will yield the full matrix of interest.
2489 (Yes, this can be done before decompression.)
2490 N.B. This generally cannot be used to directly write a
2491 symmetric square matrix. Choose square0 or triangle
2492 shape instead, and postprocess as necessary.
2493 .TP
2494 \fB\-\-memory\fR <val> ['require'] : Set size, in MiB, of initial workspace malloc
2495 attempt. To error out instead of reducing the
2496 request size when the initial attempt fails, add
2497 the 'require' modifier.
2498 .TP
2499 \fB\-\-threads\fR <val>
2500 : Set maximum number of compute threads.
2501 .TP
2502 \fB\-\-d\fR <char>
2503 : Change variant/covariate range delimiter (normally '\-').
2504 .TP
2505 \fB\-\-seed\fR <val...>
2506 : Set random number seed(s). Each value must be an
2507 integer between 0 and 4294967295 inclusive.
2508 Note that \fB\-\-threads\fR and "\-\-memory require" may also be
2509 needed to reproduce some randomized runs.
2510 .TP
2511 \fB\-\-output\-min\-p\fR <p> : Specify minimum p\-value to write to reports.
2512 (2.23e\-308
2513 is useful for preventing underflow in some programs.)
2514 .TP
2515 \fB\-\-debug\fR
2516 : Use slower, more crash\-resistant logging method.
2517 .TP
2518 \fB\-\-randmem\fR
2519 : Randomize initial workspace memory (helps catch
2520 uninitialized\-memory bugs).
2521 .TP
2522 \fB\-\-warning\-errcode\fR
2523 : Return a nonzero error code to the OS when a run
2524 completes with warning(s).
2525 .TP
2526 \fB\-\-zst\-level\fR <lvl>
2527 : Set the Zstd compression level (1\-22, default 3).
2528 .PP
2529 Primary methods paper:
2530 Chang CC, Chow CC, Tellier LCAM, Vattikuti S, Purcell SM, Lee JJ (2015)
2531 Second\-generation PLINK: rising to the challenge of larger and richer datasets.
2532 GigaScience, 4.
2533 .SH "SEE ALSO"
2534 The full documentation for
2535 .B PLINK v2.00a3 64-bit (9 Apr
2536 is maintained as a Texinfo manual. If the
2537 .B info
2538 and
2539 .B PLINK v2.00a3 64-bit (9 Apr
2540 programs are properly installed at your site, the command
2541 .IP
2542 .B info PLINK v2.00a3 64-bit (9 Apr
2543 .PP
2544 should give you access to the complete manual.