Help With Custom Vcf-Annotate Feature In Vcftools
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.
• 3,895 views
•
link
1 answer
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
• 1 views
•
link
Log in to answer this question.