This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to convert bcf files into bgen

Hi guys, I downloaded vcf.gz files (22 per each chromosome) from TopMed after imputation. Then, I filtered my vcf.gz files per MAF through bcftools, which gave me in output files in bcf format.

I am wondering: there is a tool being able to convert a bcf file into a bgen format?

I found the following command line to convert a vcf file into a bgen through qctool. The command line is the following:

qctool_v2.2.1 -g <input file in vcf.gz> -vcf-genotype-field GP -bgen-bits 8 -og <output file in .bgen>

Is it possible somehow to replace the vcf input file with the bcf to get the same version of the bgen file in output with qctool?

Thank you!

bcf qctool bgen

not tested:

bcftools view in.bcf | qctool_v2.2.1 -g -  -vcf-genotype-field GP -bgen-bits 8 -og out.bgen

0 answers

No answers yet.

Log in to answer this question.