Entering edit mode
11.4 years ago
Joey
▴
430
I have a dataset in PLINK binary format (bed/bim/fam) and this contains unrelated and related (family) individuals.
The FAM file looks like the following:
1553 1553_10 0 0 1 2
1553 1553_03 0 0 2 1
1555 1555_14 0 0 2 1
2001 2001_05 0 0 2 2
1558 1558_05 0 0 2 2
1559 1559_09 0 0 1 1
1021 1021_07 0 0 1 2
1021 1021_09 0 0 1 2
1555 1555_03 0 0 2 2
I need to create a dataset where the IDs are ordered and individuals from the same family appear one after another. Frr this, I think I just need to sort the IDs and create a new plink binary file i.e. the new file should have this as the order of IDs.
1021 1021_07 0 0 1 2
1021 1021_09 0 0 1 2
1553 1553_10 0 0 1 2
1553 1553_03 0 0 2 1
1555 1555_03 0 0 2 2
1555 1555_14 0 0 2 1
1558 1558_05 0 0 2 2
1559 1559_09 0 0 1 1
2001 2001_05 0 0 2 2
I can't seem to get the right option to do this in PLINK.
Thanks,