I would like to get non-variant sites using bcftools but am getting an odd error about the DP field.
bcftools mpileup -f genomic.fa file.bam | bcftools call --gvcf 5 -m > gvcf.vcf
--gvcf output mode requires FORMAT/DP tag, which is not present in the input header
Yet, the DP field is clearly in the output of mpileup:
NW_006532014.1 14714 . A <*> 0 . DP=52;I16=26,17,0,0,1926,98680,0,0,2580,154800,0,0,750,16322,0,0;QS=1,0;MQSB=1;MQ0F=0 PL 0,129,255
NW_006532014.1 14715 . T <*> 0 . DP=53;I16=27,18,0,0,1959,97077,0,0,2700,162000,0,0,794,17716,0,0;QS=1,0;MQSB=1;MQ0F=0 PL 0,135,255
NW_006532014.1 14716 . A <*> 0 . DP=50;I16=25,19,0,0,1905,91787,0,0,2640,158400,0,0,790,17884,0,0;QS=1,0;MQSB=1;MQ0F=0 PL 0,132,255
NW_006532014.1 14717 . T <*> 0 . DP=50;I16=25,18,0,0,1841,88215,0,0,2580,154800,0,0,766,17490,0,0;QS=1,0;MQSB=1;MQ0F=0 PL 0,129,255
Any idea what is the problem? When getting variant sites with -vm
there is no issue. What I want is the DP4 field on a gvcf file, are the relevant numbers the first 4 after I16=
?
Thanks!
Answer:
bcftools mpileup -f genomic.fa file.bam -a "AD,ADF,ADR,DP,SP,INFO/AD,INFO/ADF,INFO/ADR" | bcftools call --gvcf 5 -m > gvcf.vc
your input does not appear to have any header