Question: using vcftools to add gene name to vcf file
0
gravatar for bioguy24
3.6 years ago by
bioguy24190
Chicago
bioguy24190 wrote:

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 • 1.5k views
ADD COMMENTlink modified 12 months ago by RamRS24k • written 3.6 years ago by bioguy24190
1
gravatar for Noushin N
3.6 years ago by
Noushin N560
Baltimore, MD
Noushin N560 wrote:

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 COMMENTlink modified 12 months ago by RamRS24k • written 3.6 years ago by Noushin N560

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

ADD REPLYlink modified 12 months ago by RamRS24k • written 3.6 years ago by bioguy24190
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1212 users visited in the last hour