Synchronize modification/access to practicalAlleleCountForPloidy

This commit is contained in:
Ron Levine 2017-01-06 22:16:35 -05:00
parent 7447616766
commit 4f52395795
1 changed files with 1 additions and 1 deletions

View File

@ -353,7 +353,7 @@ public class HaplotypeCallerGenotypingEngine extends GenotypingEngine<AssemblyBa
* @param ploidy ploidy of the sample
* @param alleleMapper original allele to haplotype map
*/
private VariantContext removeAltAllelesIfTooManyGenotypes(final int ploidy, final Map<Allele, List<Haplotype>> alleleMapper, final VariantContext mergedVC) {
private synchronized VariantContext removeAltAllelesIfTooManyGenotypes(final int ploidy, final Map<Allele, List<Haplotype>> alleleMapper, final VariantContext mergedVC) {
final int originalAlleleCount = alleleMapper.size();
practicalAlleleCountForPloidy.putIfAbsent(ploidy, GenotypeLikelihoodCalculators.computeMaxAcceptableAlleleCount(ploidy, maxGenotypeCountToEnumerate));