Weird corner condition fix in indel genotyper: if there are 2 consecutive locations on candidate sites to genotype, we can get both when calling getVariantContexts and if we are triggering on an extended event - this leads to confusion and we can end up picking the wrong one. So, we require start of the vc to be the same as the start of the ref locus to be sure.

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4812 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
delangel 2010-12-09 19:34:23 +00:00
parent 27acede64d
commit a2d6cef181
1 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@ public class DindelGenotypeLikelihoodsCalculationModel extends GenotypeLikelihoo
VariantContext vc = null;
for( final VariantContext vc_input : tracker.getVariantContexts(ref, "indels", null, ref.getLocus(), false, false) ) {
if( vc_input != null && vc_input.isIndel() ) {
if( vc_input != null && vc_input.isIndel() && ref.getLocus().getStart() == vc_input.getStart()) {
vc = vc_input;
break;
}
@ -90,6 +90,7 @@ public class DindelGenotypeLikelihoodsCalculationModel extends GenotypeLikelihoo
boolean visitedBefore = false;
synchronized (this) {
if (sitesVisited.contains(new Integer(vc.getStart())) &&
contextType.equals(StratifiedAlignmentContext.StratifiedContextType.COMPLETE))
visitedBefore = true;
@ -105,7 +106,6 @@ public class DindelGenotypeLikelihoodsCalculationModel extends GenotypeLikelihoo
if (vc.getStart() <= HAPLOTYPE_SIZE)
return null;
if ( !(priors instanceof DiploidIndelGenotypePriors) )
throw new StingException("Only diploid-based Indel priors are supported in the DINDEL GL model");