From 3dcbce17cb981836c993eaab01889f4140cbccda Mon Sep 17 00:00:00 2001 From: schaudge Date: Mon, 30 Sep 2024 10:30:19 +0800 Subject: [PATCH] correct ECNTH calc. --- .../tools/walkers/mutect/SomaticGenotypingEngine.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/broadinstitute/hellbender/tools/walkers/mutect/SomaticGenotypingEngine.java b/src/main/java/org/broadinstitute/hellbender/tools/walkers/mutect/SomaticGenotypingEngine.java index a9b7b5f24ba..125b0ff16bc 100644 --- a/src/main/java/org/broadinstitute/hellbender/tools/walkers/mutect/SomaticGenotypingEngine.java +++ b/src/main/java/org/broadinstitute/hellbender/tools/walkers/mutect/SomaticGenotypingEngine.java @@ -269,7 +269,7 @@ public CalledHaplotypes callMutations( } final List outputCallsWithEventCountAnnotation = outputCalls.stream() .map(vc -> new VariantContextBuilder(vc) - .attribute(GATKVCFConstants.EVENT_COUNT_IN_HAPLOTYPE_KEY, eventCountAnnotations.containsKey(vc) ? eventCountAnnotations.get(vc): 0) + .attribute(GATKVCFConstants.EVENT_COUNT_IN_HAPLOTYPE_KEY, eventCountAnnotations.getOrDefault(vc, Collections.singletonList(0))) .attribute(GATKVCFConstants.EVENT_COUNT_IN_REGION_KEY, potentialSomaticEventsInRegion.size()).make()) .collect(Collectors.toList()); return new CalledHaplotypes(outputCallsWithEventCountAnnotation, calledHaplotypes);