Counting variants with SnpEff
Heys, I am working with snpEff and I want to calculate the number of variants for specific categories. I am following this code:
cat output.ann.vcf \
| cut -f 8 \
| tr ";" "\n" \
| grep ^EFF= \
| cut -f 2 -d = \
| tr "," "\n" \
| grep MODIFIER \
| wc -l
But it does not work. It seems when I try to look for the EFF fields, I do not have any. Do you know why is that?
Thanks in advance!
• 1,635 views
•
link
1 answer
not tested:
bcftools query -f '.' -i 'ANN ~ "MODIFIER" ' in.vcf | wc -c
• 0 views
•
link
Log in to answer this question.
if you're using a modern SNPEFF, this should be ANN= , not EFF=
furthermore, you're not counting the number of variants but the number of transcripts.
I've just seen it, thanks Pierre!