Question: Recalculate QUAL for SNPs in VCF
2.5 years ago by

I have joint called VCFs that I have split into respective pedigrees. Due to the nature of a software I'm using, I need to recalculate the QUAL scores for the pedigree VCFs.

I read on these forums that bcftools is able to do this, however the post has no clear answer

C: Recalculate QUAL and INFO fields for a subset of samples in a VCF

Any advice? Thanks

snp snv haplotype caller vcf • 528 views
ADD COMMENTlink written 2.5 years ago by QVINTVS_FABIVS_MAXIMVS2.4k

In single sample VCFs, the QUAL score is given for each variant. When you merge 2 or more VCFs, you have to set some rule about how you want to deal with the multiple QUAL scores fo each common variant across your VCFs. The default behaviour of BCFTools is to always set the QUAL score as the maximum from all QUAL scores:

-i, --info-rules -|TAG:METHOD[,…]

Rules for merging INFO fields (scalars or vectors) or - to disable the default rules. METHOD is one of sum, avg, min, max, join. Default is DP:sum,DP4:sum if these fields exist in the input files. Fields with no specified rule will take the value from the first input file. The merged QUAL value is currently set to the maximum. This behaviour is not user controllable at the moment.


If you originally have all of your files merged and then split them, I think that the maximum QUAL value will be retained in all subsets even if the original record with the highest QUAL score is not in one of the subset.

ADD REPLYlink written 2.5 years ago by Kevin Blighe67k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1152 users visited in the last hour