I am trying to convert a VCF file to a bgen 1.1 file. I am using the following command:
plink2 --vcf test.vcf.gz dosage=DS --export bgen-1.1 --out outputfile
This has worked for five of my VCF files, but for the sixth one when it reaches 70% I get the error 'malformed pgen file':
PLINK v2.00a2LM 64-bit Intel (30 May 2018)
www.cog-genomics.org/plink/2.0/(C) 2005-2018 Shaun Purcell, Christopher Chang GNU General Public License v3
Logging to allAmish705K.chrAll.log.
Options in effect:
--export bgen-1.1
--out outputfile
--pgen test.pgen
--psam test.psam
--pvar test.pvar
Start time: Thu Jun 21 14:34:33 2018
128760 MiB RAM detected; reserving 64380 MiB for main workspace.
Using up to 24 threads (change this with --threads).
294 samples (0 females, 0 males, 294 ambiguous; 294 founders) loaded from
test.psam.
8597169 variants loaded from test.pvar.
Note: No phenotype data present.
Writing outputfile.bgen ... 70%
Error: Malformed .pgen file.
I have attempted to circumvent this error by retreating to an earlier VCF file (a larger set of the same data) and find that it works fine.
I then broke down the subset VCF file into chromosomes and found that it only happened with the chr11 file. I combined the chr11 file with chr10 and converted it to bgen and found that it worked. However, when I combine all chromosomes together it stops working again.
I tried converting the vcf to pgen, which worked fine. I then converted the pgen file to bgen, and got the malformed error at 70% again.
Any idea what is the cause of this error?
Thanks, Rachel