This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Failed Annotating The Example Vcf File In The Installation Folder Of Vcftools

Dear BioStarers,

I need your helps on fixing problems I faced when annotating the example vcf file (annotate.txt) in the installation folder of VCFtools. I have listed the commands I used and the results I got.

Also, I want to know what type of annotation information file it (VCFtools) supported, gff file or others?

cat annotate-test.vcf | vcf-annotate -a annotate.txt -d
key=INFO,ID=ANN,Number=1,Type=Integer,Description='My custom
annotation' | bgzip -c > annout.vcf.gz
Can't use an undefined value as an ARRAY reference at
/ebio/abt6_projects/backup/solexa_tools/VCFtools/bin/vcf-annotate line
134.
vcf annotation

Which version of VCFtools did you use, remeber to always mention the version!

2 answers

The vcf-annotate script is described in the "VCFtools: Perl tools and API" documentation. The annotations file is a tab-delimited file, which has been compressed and indexed with tabix (part of samtools). I suspect your error message relates to attempting to use a, presumably un-indexed, text file as input for the annotations.

The annotation format is described in the documentation, and additional information can be found in the script's help message, available using:

vcf-annotate -h

Hello, I end up using a lot more VariantAnnotator from GATK to treat my VCF files against anything I really want. I gave up using vcf-annotate, it's not very functional...

Right now I'm annotating using 1000genomes(nov2011), dbsnp135, Exome Variation Server, snpeff. And after this I also created a python script to include some annotations made with annovar (SIFT and Polyphen for example)

My big command:

command = "java -Xmx4G -jar ~/lgc/programs/GenomeAnalysisTK-1.4-30-gf2ef8d1/Geno
meAnalysisTK.jar 
-T VariantAnnotator 
-R ~/lgc/datasets/gatk_data/b37/human_g1k_v37.fasta 
-A SnpEff 
--variant %s 
--snpEffFile snpEff_output.vcf 
-L %s 
-o %s.snpeff.dbsnp135.exomeserver.vcf 
--dbsnp /home/raony/lgc/datasets/dbsnp/dbsnp-135.vcf 
--resource:dbsnp135 /lgc/datasets/dbsnp/dbsnp-135.vcf 
--resource:exome_server /lgc/datasets/exome_variation_server/ESP5400.snps.vcf 
--resource:1000genomes /lgc/datasets/1000new_release/ALL.wgs.phase1_release_v2.20101123.snps_indels_sv.sites.vcf 
-E 1000genomes.AF 
-E dbsnp135.GMAF 
-E dbsnp135.dbSNPBuildID 
-E exome_server.AAC 
-E exome_server.GS 
-E exome_server.PP 
-E exome_server.CDP 
-E exome_server.MAF" % (options.vcf_file, options.vcf_file, filename)

It's very useful specially when we are receiving VCF Files from different centers and I want to include the same annotations that we use in house.

Log in to answer this question.