From 010034a65024a3c6c2b89f8a68c34efae881c59a Mon Sep 17 00:00:00 2001 From: Mark DePristo Date: Tue, 21 May 2013 16:01:57 -0400 Subject: [PATCH] Optimization/bugfix for PerReadAlleleLikelihoodMap -- Add() call had a misplaced map.put call, so that we were always putting the result of get() back into the map, when what we really intended was to only put the value back in if the original get() resulted in a null and so initialized the result --- .../sting/utils/genotyper/PerReadAlleleLikelihoodMap.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/java/src/org/broadinstitute/sting/utils/genotyper/PerReadAlleleLikelihoodMap.java b/public/java/src/org/broadinstitute/sting/utils/genotyper/PerReadAlleleLikelihoodMap.java index c8bb7ff79..f253fc9c9 100644 --- a/public/java/src/org/broadinstitute/sting/utils/genotyper/PerReadAlleleLikelihoodMap.java +++ b/public/java/src/org/broadinstitute/sting/utils/genotyper/PerReadAlleleLikelihoodMap.java @@ -66,8 +66,8 @@ public class PerReadAlleleLikelihoodMap { if (likelihoodMap == null){ // LinkedHashMap will ensure iterating through alleles will be in consistent order likelihoodMap = new LinkedHashMap<>(); + likelihoodReadMap.put(read,likelihoodMap); } - likelihoodReadMap.put(read,likelihoodMap); likelihoodMap.put(a,likelihood);