Is bcf just a bgzipped vcf?
1
0
Entering edit mode
5.5 years ago
endrebak ▴ 930

99% sure, but could not find the answer on google. Creating this q for other bcf newbs.

bcf vcf • 4.4k views
0
Entering edit mode
9
Entering edit mode
5.5 years ago
Paul ★ 1.5k

BCF is binary counterpart of VCF file. Please look here for description. Similar to SAM vs BAM.

4
Entering edit mode

and, sadly, BCF is not always bgzipped... (raw bcf)

0
Entering edit mode

"Historically"? The linked github issue is still open. And e.g. bcftools still internally converts all formats to uncompressed BCF for processing.

Can somebody please explain to me why should I use BCF? I only read that it should be faster to parse, without further explanation. The same source also says I should use VCF for data sharing and processing by custom scripts (DOI: 10.1093/gigascience/giab008).

Why is BCF faster to parse? Why not just use indexed & (b)gzipped VCF? That would have benefits of both being small, fast and portable. What am I missing?

0
Entering edit mode

Can somebody please explain to me why should I use BCF? I only read that it should be faster to parse, without further explanation.

vcf is a text file that can be compressed (vcf.gz).

BCF is not a text format but a BINARY format which is de-facto faster to read.

e.g: how to read an integer in C / text (yeah I could use fscanf too )

int n=0,c;
while((c=fgetc(in))!=EOF && isdigit(c)) { n= n*10 + (c-'0')}


in C/binary

fread(in,sizeof(int),1,&n);