This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Indel Left/Right Alignment

When matching indels between different VCF files (generated by different callers), there is this issue with left / right indel alignment, For example:

enter image description here

Here is a real example for one indel (from the same sample) called by:

Samtools --> 1 161047125 CTATA C

GATK --> 1 161047130 TATAG T

I know GATK has a small tool called "LeftAlignIndels" to solve this issue in the BAM files but I can't use it.

I am wondering if someone knows what is the indel alignment direction in samtools, GATK and Dindel? Is there an easy way to correct this at level of VCF files?

Thanks!

indel

4 answers

For NGS analysis, the convention is to left align indels. To use GATK and samtools, you should use an aligner that left aligns indels; otherwise at least samtools will have worse performance and accuracy. It is too late to fix the issue in VCF.

EDIT: wait.. In your example, the two callers deleted different bases. The two calls are intrinsically different. You cannot move the indel to make them the same.

I suggest taking a look at vt. It includes a very nice left alignment routine. They've got a nice paper describing the method for normalizing the representation: http://bioinformatics.oxfordjournals.org/content/31/13/2202

Thanks Erik. Vt is awesome. We have been using it for couple of months now.

There is the "vcf norm" tool in htscmd which left-aligns and normalizes indels in VCFs. It can be downloaded from github, google for 'htslib'.

Thanks Ixe, we used similar tool from GATK specifically for VCF files (http://goo.gl/0f7bT) but as lh3 pointed out, it is too late to correct in the VCF file.

Why too late in VCF?

a) Create a reversed reference genome b) Create a tool that reverse variants alleles .. and changes position (subtrack length_of_chrom +1- vcf_pos) c) Use a left-normalizing/shifting tool. d) use step b) again.

Voila.. Right shifting tool. Will post once I have it done.

Log in to answer this question.