It works perfectly! Thank you!
• 0 views
•
link
Hi,
I have a small question. I just started to work with bash and i want to count the amount of specific mutations my file has.
So for example; A >>> T
Not al the mutations but just one mutation on its own, compared to the reference genome.
The file I use is an VCF-file
Thank you in advance!
bcftools view --no-header -i 'REF=="A" && ALT=="T" ' input.vcf | wc -l
or using awk
awk -F '\t' '($4=="A" && $5=="T" && !($0 ~ /^#/))' input.vcf | wc -l
Log in to answer this question.