Output format of bcftools view

1.4k Views Asked by At

I am using Bcftools to extract a single sample VCF from a GVCF file.

bcftools view -f -Oz -s Sample_name -o output_sample.vcf.gz input_file.vcf.gz 

Unfortunately, it seems that the format of the output is not Bgzip compressed, despite the use of the -Oz flag to do so.

    bcftools index output_sample.vcf.gz
the file is not BGZF compressed

Would anyone have an idea of why it is the case?

1

There are 1 best solutions below

1
On BEST ANSWER

You can also try

bgzip -c outputfile.vcf > outputfile.vcf.gz 

and do not forget to index your file

bcftools index outputfile.vcf.gz