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
This commit is contained in:
Mark DePristo 2013-05-21 16:01:57 -04:00
parent a1093ad230
commit 010034a650
1 changed files with 1 additions and 1 deletions

View File

@ -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);