Bug fix for complex records: do not ever reverse clip out a complete allele.

This commit is contained in:
Eric Banks 2011-12-14 11:21:28 -05:00
parent 9740ae2090
commit 9497e9492c
1 changed files with 5 additions and 0 deletions

View File

@ -595,6 +595,11 @@ public abstract class AbstractVCFCodec implements FeatureCodec, NameAwareCodec {
if ( a.isSymbolic() )
continue;
// we need to ensure that we don't reverse clip out all of the bases from an allele because we then will have the wrong
// position set for the VariantContext (although it's okay to forward clip it all out, because the position will be fine).
if ( a.length() - clipping == 0 )
return clipping - 1;
if ( a.length() - clipping <= forwardClipping || a.length() - forwardClipping == 0 )
stillClipping = false;
else if ( ref.length() == clipping )