This is a test version of Biostars. For the public version, visit https://www.biostars.org.
merging tetraploid vcf files through bcftools

I have 7 tetraploid vcf files (generated through gatk Hapotypecaller) that I tried to merge through bcftools but It gave me following error:

Incorrect number of FORMAT/PL values at LK031787:1508, cannot merge. The tag is defined as Number=G, but found 5 values and 2 alleles.

This is what I have in position 1508:

enter image description here

Whereas my comment section includes following information for TAG PL:

##FORMAT=<ID=PL,Number=G,Type=Integer,Description="Normalized, Phred-scaled likelihoods for genotypes as defined in the VCF specification">

vcf bcftools

I replaced G with . but now got this error:

[W::bcf_hdr_check_sanity] PL should be declared as Number=G

Is it necessary to perform imputation for GBS data ?

1 answer

Can you show your merging command?

Also check you are using last version of bcftools

Finally normalise your VCF before merging.

Thanks Axzd !

bcftools version 1.15.1

I first bgzipped vcf files using command:

bgzip -c file1.vcf > file1.vcf.gz

Then I used following command for indexing:

tabix -C -h -p vcf file1.vcf.gz

Finally performed merging as follows:

bcftools merge -l input_file.txt -O v -o merged_snps.vcf

I have fixed issue by removing PL TAG. I hope it is not required for filtration and analysis.

Log in to answer this question.