This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to remove FORMAT field in vcf field

Hello everyone

I wish to remove genotypes, or FORMAT field, and individual sample ID columns, or names from the vcf file. It is possible to do it with bcftools. I tried to find a specific command for this task but failed. I would appreciate it if you could assist with which command I can use to remove individual sample ID, not variants ID, and FORMAT Field in vcf files.

Many thanks

genotypes vcf

1 answer

bcftools annotate -x 'FORMAT/ABCD' 

bcftools view --samples [^]LIST             Comma separated list of samples to include (or exclude with "^" prefix).

Hi Pierre Lindenbaum. I appreciate your help. – the command you shared above worked.

I was able to remove that information.

Log in to answer this question.