Merge bgen,bgen.bgi,and .sample file from uk biobank
1
1
Entering edit mode
2.8 years ago

I have a list of files from UKbiobank imputed data. And I wonder how can I merge 22 chromosome data. Each chromosome has their own data looks like below:

ukb_imp_chr1_v3.bgen 
ukb_imp_chr1_v3.bgen.bgi 
ukb41999_imp_chr1_v3_s487296.sample

I tried to use plink2 but I don't see options that can read bgen.bgi.

plink2 \
 --bgen *imp*.bgen ref-first \
 --sample *imp*.sample \
 --pmerge-list list_bgen_imp.txt \
 --make-pgen --out ukb_imp_allChrs

I thought the index file(bgi) is important but don't know how to involved in my code...

plink2 UKbiobank UKBB • 4.1k views
ADD COMMENT
0
Entering edit mode

Thank you! I'm checking

ADD REPLY
2
Entering edit mode
2.8 years ago
  1. The .bgi index files are useful for finding specific variants within a .bgen file. However, there is no need to read the .bgi when you're converting an entire .bgen. (Which is pretty much the only thing plink2 ever does with .bgen files, so it does not currently have a flag for specifying a .bgi.)
  2. You probably have to run --pmerge-list separately, after you are done converting all the .bgen files.
ADD COMMENT
0
Entering edit mode

Thank you!

ADD REPLY

Login before adding your answer.

Traffic: 2791 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6