Get Insertion / Deletion Count From Vcf
2
1
Entering edit mode
11.0 years ago
win ▴ 990

I have a VCF file and I wanted to get only the count for insertion and deletions identified in the VCF. Is there any way to simply output the count of insertions and deletions from a VCF file?

vcf • 8.8k views
ADD COMMENT
0
Entering edit mode

Line representing indel has a "INDEL" tag in most of the vcf files. You now have to compare the reference sequence and alternate sequence to find out if the variant is an insertion or deletion.

ADD REPLY
3
Entering edit mode
11.0 years ago

In BEDOPS 2.4 and greater, you can do the following to get the counts of the number of single nucleotide variants:

$ vcf2bed --snvs < myVariants.vcf | wc -l

To get the number of insertions:

$ vcf2bed --insertions < myVariants.vcf | wc -l

And the number of deletions:

$ vcf2bed --deletions < myVariants.vcf | wc -l
ADD COMMENT
1
Entering edit mode
11.0 years ago
Erik Garrison ★ 2.4k

vcfstats provides one simple method to do so. You can also generate length-frequency distributions using vcflengthdelta (also in vcflib).

ADD COMMENT

Login before adding your answer.

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