gVCF from VCF and BAM
2
2
Entering edit mode
9.5 years ago

Hello,

Is it possible to get a gVCF from VCF file and a BAM file? I know I can get a gVCF from BAM file by using HaplotypeCaller for variant calling but my plan is to use a different tool for variant calling.

Thanks in advance!

Tejaswi

gVCF • 6.2k views
ADD COMMENT
0
Entering edit mode
9.5 years ago
Dan D 7.4k

I suppose it depends on if and how you want to compute your GQ and PL values to remain consistent with your VCF data. There's also the question of your binning criteria if you want to make it a banded gVCF.

But in general, the way I'd do it would be to use genomecov from bedtools and obtain a depth histogram for your BAM. Using that depth histogram, it would be pretty easy to use the position info in tandem with your VCF file to generate a gVCF with depth information. Again, GQ and PL are subjective, as are your banding criteria, but the depth histogram would give you the necessary position and depth-of-coverage data.

ADD COMMENT
0
Entering edit mode
9.5 years ago
Ying W ★ 4.3k

gVCF refers to an extension of VCF v4.1 that can have ranges and is typically used to represent stretches of homozygous variants and used in incremental variant calling. Currently few tools can generate gVCFs with HaplotypeCaller being one of the only ones. It is possible to use freebayes to create gVCFs (see here: Do freeBayes and platypus support gVCF (ie incremental variant calling for large sets of genomes) and https://github.com/ekg/freebayes/issues/76#issuecomment-64186064)

Another thing to keep in mind is that the upcoming VCF v4.3 spec will allow for for ranges to be part of the spec (thus gVCF files will just be regular VCF files if VCF spec is v4.3+)

ADD COMMENT

Login before adding your answer.

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