hail icon indicating copy to clipboard operation
hail copied to clipboard

import_plink cannot read files with out-of-order variants

Open tpoterba opened this issue 3 years ago • 0 comments

to replicate:

mt = hl.balding_nichols_model(10, 10, 10)
hl.export_plink(mt.key_cols_by(s=hl.str(mt.sample_idx)), '/tmp/foo')

then manually edit bim file to look like:

1	1:1:A:C	0.0	1	C	A
1	1:2:A:C	0.0	2	C	A
1	1:3:A:C	0.0	3	C	A
1	1:4:A:C	0.0	4	C	A
1	1:5:A:C	0.0	5	C	AA
1	1:6:A:C	0.0	5	C	AAAAA
1	1:7:A:C	0.0	5	C	T
1	1:8:A:C	0.0	5	C	GGGG
1	1:9:A:C	0.0	5	C	G
1	1:10:A:C	0.0	5	C	A

then

hl.import_plink(bed='/tmp/foo.bed', bim='/tmp/foo.bim', fam='/tmp/foo.fam', min_partitions=10)

tpoterba avatar Oct 29 '20 18:10 tpoterba