From 736a857e82316642cc7bf1d5583b66eeca1d807c Mon Sep 17 00:00:00 2001 From: Valentin Ruano-Rubio Date: Fri, 12 Dec 2014 00:01:33 -0500 Subject: [PATCH] Fixing CombineGVCFs that writes out the wrong REF allele Story: ===== - https://www.pivotaltracker.com/story/show/83259038 Changes: ======= - Done minimal changes to make the fix after an arduous attempt to understand CombineGVCFs code. Test: ==== - Added a integration test to explicitly test for the bug. - Updated a md5 changes as the bug was actually affecting one of the existing integration tests. --- .../tools/walkers/variantutils/CombineGVCFs.java | 9 +++------ .../variantutils/CombineGVCFsIntegrationTest.java | 12 +++++++++++- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/variantutils/CombineGVCFs.java b/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/variantutils/CombineGVCFs.java index b2c33de27..c0c73af67 100644 --- a/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/variantutils/CombineGVCFs.java +++ b/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/variantutils/CombineGVCFs.java @@ -256,11 +256,8 @@ public class CombineGVCFs extends RodWalker 1 ? startingStates.refBases[1] : (byte)'N'; - else - refBase = startingStates.refBases[0]; + final byte refBase = startingStates.refBases[0]; + final byte refNextBase = (atCurrentPosition) ? (startingStates.refBases.length > 1 ? startingStates.refBases[1] : (byte)'N' ): refBase; final List stoppedVCs = new ArrayList<>(state.VCs.size()); @@ -300,7 +297,7 @@ public class CombineGVCFs extends RodWalker