-
Notifications
You must be signed in to change notification settings - Fork 178
Expand file tree
/
Copy pathplink_params.py
More file actions
40 lines (34 loc) · 1.13 KB
/
plink_params.py
File metadata and controls
40 lines (34 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
"""Parameters for Plink converter functions."""
from typing import Mapping, Union
from typing_extensions import Annotated, TypeAlias
overwrite: TypeAlias = Annotated[
bool,
"""
A boolean indicating whether a previously written file with the same name ought
to be overwritten. Default is False.
""",
]
output_dir: TypeAlias = Annotated[
str,
"""
A string indicating the desired output file location.
""",
]
out: TypeAlias = Annotated[
str,
"""
A string specifying the output file path prefix. The PLINK output files
will be written as ``{output_dir}/{out}.bed``, ``{output_dir}/{out}.bim``,
and ``{output_dir}/{out}.fam``. If not provided, a default prefix is
generated from the SNP selection parameters (region, n_snps,
min_minor_ac, max_missing_an, thin_offset).
""",
]
phenotypes: TypeAlias = Annotated[
Mapping[str, Union[int, float]],
"""
A mapping of sample identifiers to phenotype values. In PLINK format,
-9 indicates missing phenotype, 1 indicates control (unaffected),
and 2 indicates case (affected). Continuous values can also be used.
""",
]