Temp bug fix for indel genotyper: if there are two or more variant contexts at a site, just choose the first one containing an indel and genotype that. There might be cases where IGv2 emits 2 indel variant contexts in at the same ref location which made us fail there. A better solution will be to form underlying haplotypes supported by reads and compute likelihoods of that.

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4667 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
delangel 2010-11-14 00:21:54 +00:00
parent 82f9327b5e
commit cb1e8ad43a
1 changed files with 8 additions and 1 deletions

View File

@ -74,8 +74,14 @@ public class DindelGenotypeLikelihoodsCalculationModel extends GenotypeLikelihoo
if ( tracker == null )
return null;
VariantContext vc = null;
VariantContext vc = tracker.getVariantContext(ref, "indels", null, ref.getLocus(), true);
for( final VariantContext vc_input : tracker.getVariantContexts(ref, "indels", null, ref.getLocus(), false, false) ) {
if( vc_input != null && vc_input.isIndel() ) {
vc = vc_input;
break;
}
}
// ignore places where we don't have a variant
if ( vc == null )
return null;
@ -143,6 +149,7 @@ public class DindelGenotypeLikelihoodsCalculationModel extends GenotypeLikelihoo
GLs.put(sample.getKey(), new BiallelicGenotypeLikelihoods(sample.getKey(),vc.getReference(),
vc.getAlternateAllele(0),
genotypeLikelihoods[0],genotypeLikelihoods[1], genotypeLikelihoods[2]));
//System.out.format("%4.2f %4.2f %4.2f\n",genotypeLikelihoods[0],genotypeLikelihoods[1], genotypeLikelihoods[2]);
}
}