Fix corner condition that happens when there are indels right at the end of a contig and there's not enough reference to build a haplotype.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4996 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
c0031b05ff
commit
00310c05bb
|
|
@ -292,6 +292,9 @@ public class DindelGenotypeLikelihoodsCalculationModel extends GenotypeLikelihoo
|
||||||
if (loc.getStart() <= HAPLOTYPE_SIZE)
|
if (loc.getStart() <= HAPLOTYPE_SIZE)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
// check if there is enough reference window to create haplotypes (can be an issue at end of contigs)
|
||||||
|
if (ref.getWindow().getStop() <= loc.getStop()+HAPLOTYPE_SIZE)
|
||||||
|
return null;
|
||||||
if ( !(priors instanceof DiploidIndelGenotypePriors) )
|
if ( !(priors instanceof DiploidIndelGenotypePriors) )
|
||||||
throw new StingException("Only diploid-based Indel priors are supported in the DINDEL GL model");
|
throw new StingException("Only diploid-based Indel priors are supported in the DINDEL GL model");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue