Help With Custom Vcf-Annotate Feature In Vcftools
1
0
Entering edit mode
12.4 years ago
714 ▴ 110

Hi guys,

I am still trying to familiarise myself with perl and NGS-based bioinformatics tools. In the VCFtools' vcf-annotate feature, there is an option to customise your filtering. I have tried the following script (named filter.txt) to filter out those with a minimum QUAL score of 20:

#filter qual score 
 tag      => 'QUAL',
 name => 'phred score of wrong ALT call',
 desc=> 'phred score too low',
 apply_to => 'SNPs',
 test     => sub { if ($MATCH >=20) {return $PASS;} else {return $FAIL;}}

I then type the following command:

zcat AD0062-C.vcf.gz | vcf-annotate -f filter2.txt > out.txt

However this gives me the error "Can't use string ("tag") as a HASH ref while "strict refs" in use at /usr/bin/vcf-annotate line 172". I know that is giving me the warning that "tag" is not a hash element, however I'm not sure how to fix this.

vcftools vcf next-gen perl • 3.5k views
ADD COMMENT
0
Entering edit mode
12.3 years ago

Can't you just do this as a one-liner in VCFtools? You can do filtering this way as well.

Try

zcat AD0062-C.vcf.gz | vcf-annotate -f Q>=20 > out.txt
ADD COMMENT

Login before adding your answer.

Traffic: 1985 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