Skip to content
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

Fix edge case where dangling end merging creates cycles #5960

Merged
merged 2 commits into from
May 22, 2019
Merged

Conversation

davidbenjamin
Copy link
Contributor

@meganshand This fixes the Sarah's recent bug, and just makes sense in general.

I am not adding a regression test because our work on linked de Bruijn graphs is going to moot stuff like this soon.

@sarahcalvo
Copy link

Thanks @davidbenjamin! Please let me know when the merge is complete and we will rerun gnomAD analysis.

@codecov
Copy link

codecov bot commented May 22, 2019

Codecov Report

Merging #5960 into master will increase coverage by 0.017%.
The diff coverage is 50%.

@@              Coverage Diff               @@
##              master    #5960       +/-   ##
==============================================
+ Coverage     86.823%   86.84%   +0.017%     
- Complexity     32360    32429       +69     
==============================================
  Files           1993     1993               
  Lines         149509   149725      +216     
  Branches       16524    16598       +74     
==============================================
+ Hits          129808   130021      +213     
+ Misses         13676    13673        -3     
- Partials        6025     6031        +6
Impacted Files Coverage Δ Complexity Δ
...pecaller/readthreading/ReadThreadingAssembler.java 65.844% <50%> (-0.406%) 49 <0> (+1)
...s/haplotypecaller/graphs/KBestHaplotypeFinder.java 95.588% <0%> (+0.134%) 23% <0%> (ø) ⬇️
...ypecaller/graphs/KBestHaplotypeFinderUnitTest.java 98.707% <0%> (+0.16%) 93% <0%> (+12%) ⬆️
...kers/haplotypecaller/ReferenceConfidenceModel.java 93.195% <0%> (+0.213%) 136% <0%> (+49%) ⬆️
...lotypecaller/readthreading/ReadThreadingGraph.java 88.971% <0%> (+0.245%) 159% <0%> (ø) ⬇️
...nder/utils/runtime/StreamingProcessController.java 67.773% <0%> (+0.474%) 33% <0%> (ø) ⬇️
...lotypecaller/ReferenceConfidenceModelUnitTest.java 97.006% <0%> (+1.219%) 60% <0%> (+7%) ⬆️

Copy link
Contributor

@meganshand meganshand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One tiny question, but LGTM. Also, the codecov looks weird, not sure if that's related to this PR or not?

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()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't actually matter if recoverAllDanglingBranches right? You want to return null if there are cycles regardless?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right but I'm being conservative about runtime here. This is all going to be overhauled soon anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And don't worry about the code coverage. It's effectively a random number generator.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, merge away!

@davidbenjamin davidbenjamin merged commit ec2d08f into master May 22, 2019
@davidbenjamin davidbenjamin deleted the db_mito branch May 22, 2019 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants