This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Filtering vcf FORMAT?

I have a vcf file with contains GT:DS:GP for FORMAT field, how can i only keep the GT? The vcftools "--extract-FORMAT-info GT" command will at the same time filtering all other columns. But i wish to keep those.

snp vcf

1 answer

https://samtools.github.io/bcftools/bcftools.html

... and "FORMAT" to remove all FORMAT tags except GT.

bcftools annotate -x 'FORMAT' in.vcf

Log in to answer this question.