How to convert a bcf file to vcf with bcftools?
1
1
Entering edit mode
3.2 years ago
Joe ▴ 40

I've been following the guide on the Tracy website for looking at variants in some Sanger sequences I have:

https://www.gear-genomics.com/docs/tracy/cli/#variant-calling

I've now generated the bcf files, and it says I can convert these to vcf using bcftools. How do I do this? I checked the bcftools manual, and there's a general guide to each of the commands, but it's still not clear what I actually need to write to make a vcf from my bcf file, and I can't find a clear explanation online either.

I tried the following:

bcftools convert -O v -o outfilename.vcf inputfilename.bcf

Which gave me a file with .vcf at the end but IGV isn't able to read it. I also tried using igvtools to generate an index file (which it did), but still IGV gives me "error loading outputfilename.vcf null" and doesn't show anything on the track.

Thanks in advance

IGV bcf bcftools vcf • 15k views
ADD COMMENT
2
Entering edit mode
3.2 years ago
4galaxy77 2.9k

From the bcftools manual

-O, --output-type b|u|z|v Output compressed BCF (b), uncompressed BCF (u), compressed VCF (z), uncompressed VCF (v).

So you need to replace the -O z with -O b.

ADD COMMENT
0
Entering edit mode

So if I understand correctly replacing the 'z' with a 'b' changes the output file from a compressed VCF, to a compressed BCF?

ADD REPLY
1
Entering edit mode

Yes exactly.

ADD REPLY

Login before adding your answer.

Traffic: 1809 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