using vcftools to add gene name to vcf file
1
0
Entering edit mode
5.4 years ago
bioguy24 ▴ 220

I am trying to add gene identifiers to a vcf file using vcftools 0.1.14. I first use the below command to unzip the vcf, sort, compress with bgzip, and index it with tabix. Thank you :).

gunzip -c TSVC_007.vcf.gz | vcf-sort |  bgzip -c >  TSVC_007.vcf && tabix -p vcf TSVC_007.vcf

I then take the bgzip vcf and in vcf-tools run: where TSVC_007 is bgzip compressed vcf and test.bed is the bed file to use:

example bed:

chr1   1234   12345   AGRN

command:

cat TSVC_007.vcf | vcf-annotate -a test.bed   -d key=INFO,ID=ANN,Number=1,Type=Integer,Description='My custom annotation'    -c CHROM,FROM,TO,INFO/ANN > out.vcf

Error:

Broken VCF header, no column names?
 at /usr/local/share/perl/5.18.2/Vcf.pm line 172.
    Vcf::throw('Vcf4_2=HASH(0x16ffc20)', 'Broken VCF header, no column names?') called at /usr/local/share/perl/5.18.2/Vcf.pm line 866
    VcfReader::_read_column_names('Vcf4_2=HASH(0x16ffc20)') called at /usr/local/share/perl/5.18.2/Vcf.pm line 601
    VcfReader::parse_header('Vcf4_2=HASH(0x16ffc20)') called at /usr/local/bin/vcf-annotate line 408
    main::annotate('HASH(0x1786e00)') called at /usr/local/bin/vcf-annotate line 33
vcftools • 2.0k views
ADD COMMENT
1
Entering edit mode
5.4 years ago
Noushin N ▴ 590

If you are open to trying other tools, and the gene annotations come from one of the databases supported by SnpEff, you may like to give it a try.

The syntax will be as simple as:

java -Xmx4g -jar snpEff.jar -v -stats ex1.html GRCh37.75 protocols/ex1.vcf > protocols/ex1.ann.vcf
ADD COMMENT
0
Entering edit mode

I will give this a try as well.... thank you.

ADD REPLY

Login before adding your answer.

Traffic: 1746 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6