Skip to content

Commit

Permalink
Ensure VariantContexts are sorted in MergeVcfsAndGenotypes (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbimber committed Jul 29, 2024
1 parent f002b29 commit 8e61722
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down

0 comments on commit 8e61722

Please sign in to comment.