-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathpgen.ksy
executable file
·60 lines (59 loc) · 1.42 KB
/
pgen.ksy
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
meta:
id: pgen
file-extension: bed
bit-endian: le
endian: le
seq:
- id: header
type: header
enums:
storage_type:
0x00: plink1_sample_major
0x01: plink1_variant_major
0x02: plink2_simple
0x03: plink2_fw_unphased
0x04: plink2_fw_phased
0x10: plink2_standard
genotype:
0x00: homozygote_11
0x01: missing
0x02: heterozygote
0x03: homozygote_22
types:
header:
seq:
- id: magic
type: u2
- id: storage_type
type: u1
enum: storage_type
- id: dim
type:
switch-on: storage_type
cases:
'storage_type::plink2_simple': dim
'storage_type::plink2_fw_unphased': dim
'storage_type::plink2_fw_phased': dim
'storage_type::plink2_standard': dim
- id: storage
type:
switch-on: storage_type
cases:
'storage_type::plink1_sample_major': plink1_genotype_data
'storage_type::plink1_variant_major': plink1_genotype_data
'storage_type::plink2_simple': dim
'storage_type::plink2_fw_unphased': dim
'storage_type::plink2_fw_phased': dim
'storage_type::plink2_standard': dim
dim:
seq:
- id: nvariants
type: u4
- id: nsamples
type: u4
plink1_genotype_data:
seq:
- id: genotype
type: b2
enum: genotype
repeat: eos