I am trying to extract maximum features for my machine learning input, and I need PV4, BQ, G3, NS to be added to my VCF files for all the SNP calling
I used the sametools and bcftools as below to extract some of the information:

    samtools mpileup --skip-indels -m 1 -E --BCF  --output-tags DP,AD,ADF,ADR,SP,INFO/AD,INFO/ADF,INFO/ADR -f test/reference/Aradu.fa test/bam/A72.bam | bcftools call -mv --skip-variants indels --multiallelic-caller --variants-only |bcftools +fill-tags> test/test/At.vcf

The result of my code has 

> Aradu.A01	1345	.	T	G	5.57134	.	DP=6;ADF=0,5;ADR=1,0;AD=1,5;VDB=0.0340507;SGB=-0.590765;RPB=1;MQB=1;MQSB=1;BQB=1;MQ0F=0;AC=2;AN=2;DP4=0,1,5,0;MQ=9;NS=1;AF=1;MAF=0;AC_Het=0;AC_Hom=2;AC_Hemi=0;HWE=1	GT:PL:DP:SP:ADF:ADR:AD	1/1:31,10,0:6:0:0,5:1,0:1,5


How can I include any of these  PV4, BQ, G3, NS to the file

Thanks


Hi Sahar,

I get **PV4** (*P-values for strand bias, baseQ bias, mapQ bias and tail distance bias*) and **G3** (*ML estimate of genotype frequencies*) automatically when I align my data with `bwa mem` and then call variants with `samtools mpileup` piped into `bcftools call` (latest versions).

**NS** (*Number of Samples With Data*) may be a tag that was used a lot in the past but that has been more or less replaced. You can obtains similar information by looking at the **AC** (*allele count in genotypes, for each ALT allele, in the same order as listed*), **AF** (*allele frequency for each ALT allele in the same order as listed: use this when estimated from primary data, not called genotypes*), and **AN** (*total number of alleles in called genotypes*) tags.

The same may be true for **BQ** (*RMS base quality at this position*). However, using `samtools mpileup`, you can ensure a minimal base quality on variant bases with the `--min-BQ` comman-lime parameter.

