Skip to content

Commit

Permalink
Fix edge case where dangling end merging creates cycles (#5960)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbenjamin authored May 22, 2019
1 parent 497fef2 commit ec2d08f
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,12 @@ private AssemblyResult createGraph(final Iterable<GATKRead> reads,
return null;
}

return getAssemblyResult(refHaplotype, kmerSize, rtgraph, aligner);
final AssemblyResult result = getAssemblyResult(refHaplotype, kmerSize, rtgraph, aligner);
// check whether recovering dangling ends created cycles
if (recoverAllDanglingBranches && rtgraph.hasCycles()) {
return null;
}
return result;
}

private AssemblyResult getAssemblyResult(final Haplotype refHaplotype, final int kmerSize, final ReadThreadingGraph rtgraph, final SmithWatermanAligner aligner) {
Expand Down

0 comments on commit ec2d08f

Please sign in to comment.