Get Insertion / Deletion Count From Vcf
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?
• 9,512 views
•
link
2 answers
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
• 0 views
•
link
Log in to answer this question.
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.