This is a test version of Biostars. For the public version, visit https://www.biostars.org.
A strange problem with annotation of vcf file

Hi friends,

I did variant calling of a bam file (it's related to whole-genome sequencing of a human sample) with GATK (version 4) and then tried to annotate it with dbsnp, but it was not successful. I download human reference genome and dbsnp files from the following addresses:

For annotation with dbsnp, firstly, I used the below command from GATK

Gatk VariantAnnotator –R genom.fa –I file1.bam –V file1.vcf –A coverage –D All_20180418.vcf

GATK4 said

Warning: VariantAnnotator is a BETA tool and is not yet ready for use in production

and didn’t return me any output. So, I used bcftools for annotation with the below command:

bcftools annotate –c ID –a All_20180418.vcf.gz file1.vcf.gz > file1_annotate.vcf

But, bcftools also didn’t annotate my vcf file without returning any error.

Could you please help me what’s wrong and kindly tell me how I can annotate my vcf file with dbsnp?

Many thanks

genome annotation gatk4 bcftools vcf

1 answer

SnpSift Annotate does a good job of annotating the ID field of a VCF. You will have to download the dbSNP VCF, though, which is > 10GB last time that I checked.

Yes, I downloaded dbsnp vcf file with 15.2 GB in gzip. Could you please tell me what is wrong in my work to annotate the vcf file?

I cannot comment on the GATK command because I have never used it. The warning message issue by that command speaks for itself, too.

Regarding BCFtools, you likely have to first unset your VCF IDs with

bcftools annotate --remove ID file1.vcf.gz | \
bcftools annotate -c ID -a All_20180418.vcf.gz file1_annotate.vcf -Ov \
> file1_annotate.vcf

Of course, SnpSift also works.

Nota bene: also check that your contig names are the same as those in the dbSNP VCF. One may have a 'chr' prefix, while, the other, not

Many thanks for your points. I'll try them

Log in to answer this question.