From 0d82a706331c4ac04849b2f19a259241a4e3b8e8 Mon Sep 17 00:00:00 2001 From: Eric Banks Date: Thu, 20 Mar 2014 15:55:09 -0400 Subject: [PATCH] Fixed docs for method and fixed the edge case optimization to properly use equals() on Integers. Shouldn't affect actual results at all. --- .../sting/utils/fragments/FragmentUtils.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/gatk-framework/src/main/java/org/broadinstitute/sting/utils/fragments/FragmentUtils.java b/public/gatk-framework/src/main/java/org/broadinstitute/sting/utils/fragments/FragmentUtils.java index e88065c4a..6068ab085 100644 --- a/public/gatk-framework/src/main/java/org/broadinstitute/sting/utils/fragments/FragmentUtils.java +++ b/public/gatk-framework/src/main/java/org/broadinstitute/sting/utils/fragments/FragmentUtils.java @@ -209,11 +209,11 @@ public final class FragmentUtils { } /** - * Merge two overlapping reads from the same fragment into a single super read, if possible + * Fix two overlapping reads from the same fragment by adjusting base qualities, if possible * * firstRead and secondRead must be part of the same fragment (though this isn't checked). Looks - * at the bases and alignment, and tries its best to create a meaningful synthetic single super read - * that represents the entire sequenced fragment. + * at the bases and alignment, and tries its best to create adjusted base qualities so that the observations + * are not treated independently. * * Assumes that firstRead starts before secondRead (according to their soft clipped starts) * @@ -228,7 +228,7 @@ public final class FragmentUtils { if ( ! clippedFirstRead.getReadName().equals(clippedSecondRead.getReadName()) ) throw new IllegalArgumentException("attempting to merge two reads with different names " + clippedFirstRead + " and " + clippedSecondRead); // don't adjust fragments that do not overlap - if ( clippedFirstRead.getAlignmentEnd() < clippedSecondRead.getAlignmentStart() || clippedFirstRead.getReferenceIndex() != clippedSecondRead.getReferenceIndex() ) + if ( clippedFirstRead.getAlignmentEnd() < clippedSecondRead.getAlignmentStart() || !clippedFirstRead.getReferenceIndex().equals(clippedSecondRead.getReferenceIndex()) ) return; final Pair pair = ReadUtils.getReadCoordinateForReferenceCoordinate(clippedFirstRead, clippedSecondRead.getAlignmentStart());