Plink documentation about .bim says the columns 5 and 6 are the Allele 1 and Allele 2 respectively. The documentation about the .ped in turn, says "...The first six fields are the same as those in a .fam file. The seventh and eighth fields are allele calls for the first variant in the .map file ('0' = no call); the 9th and 10th are allele calls for the second variant; and so on.."

I've simulated a dataset as per:

$ plink1.9 --simulate ds1.sim acgt --out ds1
$ head ds1.bim 
1       null_0  0       1       C       T
1       null_1  0       2       A       C
1       null_2  0       3       C       A
1       null_3  0       4       T       A
1       null_4  0       5       G       C
1       null_5  0       6       T       C
1       null_6  0       7       T       C
1       null_7  0       8       G       C
1       null_8  0       9       C       G
1       null_9  0       10      T       A

Than I converted it to plain PED and MAP:

$ plink1.9 --bfile ds1 --recode --out ds1
$ head ds1.ped > ds1.head.ped
$ vim ds1.head.ped
per0 per0 0 0 2 2 T T A C A A T A C C T C T C C C....

Given the data above, why my .bim file shows "C and T" for the first variant while my .ped file shows "T and T"? Apparently they don't match as per described in the documentation (or more likely, I'm misinterpreting it)...

Also, how do those 2 files related to each other? E.g.: How do I know that my Sample 1 has the SNP's null_3, null_4 or null_5, etc?

I need to clarify those doubt because I want to fit a LightGBM model with the Genomic Data (can be plink or vcf). Not sure yet how to do. I was trying to convert the plink files to a CSV-style somehow, to be able to use in my model. Not sure if this is the way to go though...



1 Answer 1


Responded in the plink2-users group (https://groups.google.com/forum/#!topic/plink2-users/zgJxdXxvdLo ).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.