Skip to content

Creating bgen files from plink

Sometimes you need to test code that uses e.g. bgen files. It's quite easy to simulate dummy data using plink, and save that in gen format using the --recode oxford flag:

plink --dummy 1000 1000 --recode oxford --out dummy

This generates dummy.gen and dummy.sample with 1000 individuals and 1000 SNPs

Then convert to bgen format using qctool

qctool -g dummy.gen -og dummy.bgen
rm dummy.gen