<p>hi there,
is there a way to get count of SNP, indels, CNVs etc from a VCF file, so some thing like</p>

<p>SNPs = ?</p>

<p>Insertions = ?</p>

<p>Deletions = ?</p>

<p>CNVs = ?</p>

<p>using simple linux commands</p>

<p>thanks,
a</p>

There are a couple of ways that variant type is annotated within a VCF file, so there are correspondingly a few ways to get close to what you want.  Here's one choice that should work with most VCF files:

Use the `vcftools` tool `vcf-annotate` to fill in the variant type field:

    zcat in.vcf.gz | vcftools_0.1.9/bin/vcf-annotate --fill-type > out.vcf

Then count up the variants by looking at the (newly-filled) TYPE field:

    grep -oP "TYPE=\w+" out.vcf | sort | uniq -c

Or in one step that doesn't change the original VCF file:

    zcat in.vcf.gz | vcftools_0.1.9/bin/vcf-annotate --fill-type | grep -oP "TYPE=\w+" | sort | uniq -c

On an example I had, this yielded:

    3410 TYPE=del
    4487 TYPE=ins
    56744 TYPE=snp

1000 Genomes VCF files will be annotated in a finer-grained way (e.g. choices including DUP, INV, CNV, TANDEM, see [here](http://www.1000genomes.org/wiki/Analysis/Variant%20Call%20Format/vcf-variant-call-format-version-41)), but I'm not sure how to get their range of annotations from your own raw read data.  However, if these distinctions are critical to you, that may be a useful direction to explore.