Add sanity check and possible bug fix for forum user: if haplotypes cannot be created from given alleles when genotyping indels (e.g. too close to contig boundary, etc.) in pool mode, empty allele list, signifying site can't be genotyped
This commit is contained in:
parent
79195b97a3
commit
01265f78e6
|
|
@ -105,6 +105,10 @@ public class PoolIndelGenotypeLikelihoodsCalculationModel extends PoolGenotypeLi
|
|||
haplotypeMap.clear();
|
||||
}
|
||||
IndelGenotypeLikelihoodsCalculationModel.getHaplotypeMapFromAlleles(alleles, ref, ref.getLocus(), haplotypeMap);
|
||||
|
||||
// sanity check: if haplotype map couldn't be created, clear allele list
|
||||
if (haplotypeMap.isEmpty())
|
||||
alleles.clear();
|
||||
return alleles;
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue