I am analyzing ukbb data and I have patient IDs for both cases and controls. Now I want the genetic data of all patients based on their IDs.
I am trying to test with chromosome 5 as I have both bgen and sample file. I am using plink 2 for the conversion of bgen and sample file
plink2 --bgen ukb_chr5_v3.bgen ref-first --sample ukb22828_c5_b0_v3_s487239.sample --make-bed --out testfile
I am getting three files as output like .pgen .psam .pvar. This is how .psam looks like,
FID | IID | sex |
---|---|---|
482828 | 482282 | 1 |
and .pvar file has five columns, chromosome, position, ID, ref allele, alt allele. I am still confused which IDs have the corresponding alleles/genotypes. Please guide me in further analysis. My goal is find genetic data of specfic IDs which I am looking for. Thanks
.pgen
file, but encoded as a binary, so you can't query it directly. What are you going to do with the genotypes? $\endgroup$