Variation Count Based On Chromosome
2
0
Entering edit mode
10.4 years ago
win ▴ 970

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.

vcf • 3.2k views
ADD COMMENT
6
Entering edit mode
10.4 years ago
 grep -v -E '^#'  your.vcf | cut -f 1 | sort | uniq -c
ADD COMMENT
0
Entering edit mode
10.4 years ago
Vivek ★ 2.7k
awk '! /\#/' varaints.vcf | awk '{print $1}' | sort | uniq -c
ADD COMMENT

Login before adding your answer.

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