Variation Count Based On Chromosome
I have a VCF file and i want the count of variations per chromosome i.e. for each chromosome how many variations found. i am aware that the command lc - w <filename> will give the count of total lines in the VCF but how could i indicate the chromosome number such as chr1, chr2 etc...
help much appreciated.
• 3,627 views
•
link
2 answers
grep -v -E '^#' your.vcf | cut -f 1 | sort | uniq -c
• 136 views
•
link
awk '! /\#/' varaints.vcf | awk '{print $1}' | sort | uniq -c
• 157 views
•
link
Log in to answer this question.