diff --git a/src/main/java/com/github/discvrseq/walkers/MergeVcfsAndGenotypes.java b/src/main/java/com/github/discvrseq/walkers/MergeVcfsAndGenotypes.java index 758ac06d..89b4c47a 100644 --- a/src/main/java/com/github/discvrseq/walkers/MergeVcfsAndGenotypes.java +++ b/src/main/java/com/github/discvrseq/walkers/MergeVcfsAndGenotypes.java @@ -340,6 +340,8 @@ else if (multipleAllelesMergeType == MultipleAllelesMergeType.MIX_TYPES) { logger.warn("Ignoring all records at site " + referenceContext.getContig() + ":" + referenceContext.getStart()); } + // Ensure the result matches GATK's expected sort + mergedVCs.sort(new VariantContextComparator(getBestAvailableSequenceDictionary())); for ( final VariantContext mergedVC : mergedVCs ) { // only operate at the start of events if ( mergedVC == null )