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

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

bcf vcf • 6.3k views
ADD COMMENT
0
Entering edit mode
ADD REPLY
9
Entering edit mode
7.2 years ago
Paul ★ 1.5k

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

ADD COMMENT
4
Entering edit mode

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

ADD REPLY
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?

ADD REPLY
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);
ADD REPLY

Login before adding your answer.

Traffic: 2759 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6