From b99bf85ec8ec56e8a420e69c5cb8983968bfb196 Mon Sep 17 00:00:00 2001 From: Eric Banks Date: Mon, 3 Mar 2014 22:42:56 -0500 Subject: [PATCH] Fixed bug where dangling tail merging occasionally created a cycle in the graph. Added unit tests to cover this case. Delivers PT#66690470. --- .../readthreading/DanglingChainMergingGraph.java | 10 ++++++++-- .../DanglingChainMergingGraphUnitTest.java | 13 ++++++++++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/protected/gatk-protected/src/main/java/org/broadinstitute/sting/gatk/walkers/haplotypecaller/readthreading/DanglingChainMergingGraph.java b/protected/gatk-protected/src/main/java/org/broadinstitute/sting/gatk/walkers/haplotypecaller/readthreading/DanglingChainMergingGraph.java index e59d39a97..c696c50ae 100644 --- a/protected/gatk-protected/src/main/java/org/broadinstitute/sting/gatk/walkers/haplotypecaller/readthreading/DanglingChainMergingGraph.java +++ b/protected/gatk-protected/src/main/java/org/broadinstitute/sting/gatk/walkers/haplotypecaller/readthreading/DanglingChainMergingGraph.java @@ -97,7 +97,7 @@ public abstract class DanglingChainMergingGraph extends BaseGraph danglingPath, referencePath; final byte[] danglingPathString, referencePathString; final Cigar cigar; @@ -222,7 +222,7 @@ public abstract class DanglingChainMergingGraph extends BaseGraph MAX_CIGAR_COMPLEXITY ) return false; - // the last element must be an M + // the first element must be an M if ( requireFirstElementM && elements.get(0).getOperator() != CigarOperator.M ) return false; @@ -263,6 +263,12 @@ public abstract class DanglingChainMergingGraph extends BaseGraph