Hroshan
Hroshan

Reputation: 23

vcf files modification before converting to BCF

I am adding new vcf files to a previously made bcf file in which the ID field in the VCF had been set to CHR:POS:POS:REF:ALT ?

How do I set the ID field in the VCF to CHR:POS:POS:REF:ALT ?

Upvotes: 1

Views: 190

Answers (1)

OronNavon
OronNavon

Reputation: 1333

I believe you're looking for the --set-id option. From the documentation at http://www.htslib.org/doc/bcftools.html:

To assign the ID:

bcftools annotate --set-id +'%CHROM\_%POS\_%REF\_%FIRST_ALT' file.vcf

Upvotes: 3

Related Questions