This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Warning in bcftools when subsetting a VCF by variant ID

I have successfully subset a VCF by variant ID after phasing and imputing using Beagle 5.5, however, I am getting the warning "[W::vcf_parse_info] INFO 'END' is not defined in the header, assuming Type=String" in the VCF.

How can I resolve this warning?

I ran the command below:

bcftools view -i'ID=@chr6_variantlist.txt' reheader_6_chrfixed_filtered_imputed.vcf.gz
bcftools vcf beagle5.5

1 answer

bcftools view  reheader_6_chrfixed_filtered_imputed.vcf.gz |\
awk '/^#CHROM/ {printf("##INFO=<ID=END,Number=1,Type=Integer,Description=\"Stop position of the interval\">\n");} {print;}' |\
bcftools  view -i'ID=@chr6_variantlist.txt'

@Pierre Lindenbaum, this works perfectly well as it prints to the screen correctly but the error returns when I redirect it to a file:

  bcftools view  reheader_6_chrfixed_filtered_imputed.vcf.gz |awk '/^#CHROM/ {printf("##INFO= \<ID=END,Number=1,Type=Integer,Description=\"Stop position of the interval\">\n");} {print;}' | \ bcftools  view -i'ID=@chr6_variantlist.txt' > reheader_6_chrfixed_filtered_imputed_var_hr.vcf \
[W::vcf_parse_info] INFO 'END' is not defined in the header, assuming Type=String

the message comes from the first bcftools.

verify by running gunzip -c instead of bcftools

gunzip -c  reheader_6_chrfixed_filtered_imputed.vcf.gz  | awk ...

Log in to answer this question.