-
Notifications
You must be signed in to change notification settings - Fork 596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HOLD: Bring in more duplication expansion calls #3668
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,9 +104,8 @@ public ChimericAlignment(final AlignmentInterval intervalWithLowerCoordOnContig, | |
|
||
this.strandSwitch = determineStrandSwitch(intervalWithLowerCoordOnContig, intervalWithHigherCoordOnContig); | ||
|
||
final boolean involvesRefIntervalSwitch = involvesRefPositionSwitch(intervalWithLowerCoordOnContig, intervalWithHigherCoordOnContig); | ||
this.isForwardStrandRepresentation = isForwardStrandRepresentation(intervalWithLowerCoordOnContig, intervalWithHigherCoordOnContig, | ||
this.strandSwitch, involvesRefIntervalSwitch); | ||
this.strandSwitch, involvesRefPositionSwitch(intervalWithLowerCoordOnContig, intervalWithHigherCoordOnContig)); | ||
|
||
this.insertionMappings = insertionMappings; | ||
} | ||
|
@@ -161,10 +160,10 @@ public static List<ChimericAlignment> parseOneContig(final AlignedContig aligned | |
} | ||
} | ||
|
||
final boolean isNotSimpleTranslocation = isNotSimpleTranslocation(current, next, | ||
determineStrandSwitch(current, next), involvesRefPositionSwitch(current, next)); | ||
if (isNotSimpleTranslocation) | ||
results.add(new ChimericAlignment(current, next, insertionMappings, alignedContig.contigName)); | ||
final ChimericAlignment chimericAlignment = new ChimericAlignment(current, next, insertionMappings, alignedContig.contigName); | ||
if (chimericAlignment.isNotSimpleTranslocation() && | ||
!BreakpointComplications.isLikelyInvertedDuplication(current, next)) | ||
results.add(chimericAlignment); | ||
|
||
current = next; | ||
} | ||
|
@@ -191,9 +190,9 @@ static boolean firstAlignmentIsTooShort(final AlignmentInterval first, final Ali | |
* To implement the idea that for two consecutive alignment regions of a contig, the one with higher reference coordinate might be a novel insertion. | ||
*/ | ||
@VisibleForTesting | ||
public static boolean nextAlignmentMayBeInsertion(final AlignmentInterval current, final AlignmentInterval next, | ||
final Integer minAlignLength, final int mapQThresholdInclusive, | ||
final boolean filterWhollyContained) { | ||
static boolean nextAlignmentMayBeInsertion(final AlignmentInterval current, final AlignmentInterval next, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. check how this is different from the new method |
||
final Integer minAlignLength, final int mapQThresholdInclusive, | ||
final boolean filterWhollyContained) { | ||
// not unique: inserted sequence may have low mapping quality (low reference uniqueness) or may be very small (low read uniqueness) | ||
final boolean isNotUnique = mapQualTooLow(next, mapQThresholdInclusive) || firstAlignmentIsTooShort(next, current, minAlignLength); | ||
return isNotUnique | ||
|
@@ -202,7 +201,7 @@ public static boolean nextAlignmentMayBeInsertion(final AlignmentInterval curren | |
} | ||
|
||
@VisibleForTesting | ||
public static StrandSwitch determineStrandSwitch(final AlignmentInterval first, final AlignmentInterval second) { | ||
static StrandSwitch determineStrandSwitch(final AlignmentInterval first, final AlignmentInterval second) { | ||
if (first.forwardStrand == second.forwardStrand) { | ||
return StrandSwitch.NO_SWITCH; | ||
} else { | ||
|
@@ -214,8 +213,8 @@ public static StrandSwitch determineStrandSwitch(final AlignmentInterval first, | |
* Determine if the region that maps to a lower coordinate on the contig also maps to a lower coordinate on the reference. | ||
*/ | ||
@VisibleForTesting | ||
public static boolean involvesRefPositionSwitch(final AlignmentInterval regionWithLowerCoordOnContig, | ||
final AlignmentInterval regionWithHigherCoordOnContig) { | ||
static boolean involvesRefPositionSwitch(final AlignmentInterval regionWithLowerCoordOnContig, | ||
final AlignmentInterval regionWithHigherCoordOnContig) { | ||
|
||
return regionWithHigherCoordOnContig.referenceSpan.getStart() < regionWithLowerCoordOnContig.referenceSpan.getStart(); | ||
} | ||
|
@@ -267,10 +266,11 @@ public boolean isNotSimpleTranslocation() { | |
} | ||
|
||
Tuple2<SimpleInterval, SimpleInterval> getCoordSortedReferenceSpans() { | ||
if (involvesRefPositionSwitch(regionWithLowerCoordOnContig, regionWithHigherCoordOnContig)) | ||
return new Tuple2<>(regionWithHigherCoordOnContig.referenceSpan, regionWithLowerCoordOnContig.referenceSpan); | ||
else | ||
if (isForwardStrandRepresentation) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. used in two places: |
||
return new Tuple2<>(regionWithLowerCoordOnContig.referenceSpan, regionWithHigherCoordOnContig.referenceSpan); | ||
} else { | ||
return new Tuple2<>(regionWithHigherCoordOnContig.referenceSpan, regionWithLowerCoordOnContig.referenceSpan); | ||
} | ||
} | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method to be phased out, but it makes sense to let down stream users to check what type of novel adjacency this CA could point to, which requests the state checkers to be more comprehensive