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

Type change int -> long to prevent tranche novel variant count overflow #7864

Merged
merged 2 commits into from Jun 17, 2022

Conversation

ldgauthier
Copy link
Contributor

in VQSR scattered mode

@codecov
Copy link

codecov bot commented May 20, 2022

Codecov Report

Merging #7864 (de85ab0) into master (6c6db6e) will decrease coverage by 0.013%.
The diff coverage is 68.966%.

@@               Coverage Diff               @@
##              master     #7864       +/-   ##
===============================================
- Coverage     86.946%   86.933%   -0.013%     
- Complexity     36929     36954       +25     
===============================================
  Files           2219      2221        +2     
  Lines         173667    173799      +132     
  Branches       18755     18775       +20     
===============================================
+ Hits          150996    151089       +93     
- Misses         16057     16081       +24     
- Partials        6614      6629       +15     
Impacted Files Coverage Δ
...er/tools/walkers/vqsr/TruthSensitivityTranche.java 88.172% <ø> (ø)
...stitute/hellbender/tools/walkers/vqsr/Tranche.java 62.222% <35.714%> (-3.210%) ⬇️
...e/hellbender/tools/walkers/vqsr/VQSLODTranche.java 85.859% <100.000%> (ø)
...ls/walkers/vqsr/GatherTranchesIntegrationTest.java 100.000% <100.000%> (ø)
...ellbender/tools/DumpTabixIndexIntegrationTest.java 100.000% <0.000%> (ø)
...roadinstitute/hellbender/tools/DumpTabixIndex.java 70.536% <0.000%> (ø)
...nstitute/hellbender/engine/MultiFeatureWalker.java 88.462% <0.000%> (+0.558%) ⬆️
...llbender/utils/io/FeatureOutputStreamUnitTest.java 84.906% <0.000%> (+1.232%) ⬆️
...itute/hellbender/utils/io/FeatureOutputStream.java 85.366% <0.000%> (+2.033%) ⬆️

@mcovarr
Copy link
Collaborator

mcovarr commented May 23, 2022

Would it be difficult to write a test for this with numKnown and numNovel > Integer.MAX_VALUE just to make sure all the required spots have been updated?

Copy link
Collaborator

@droazen droazen left a comment

Choose a reason for hiding this comment

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

One question for you @ldgauthier

public Tranche(final String name, final double knownTiTv, final int numNovel, final double minVQSLod, final VariantRecalibratorArgumentCollection.Mode model, final double novelTiTv, final int accessibleTruthSites, final int numKnown, final int callsAtTruthSites) {
public Tranche(final String name, final double knownTiTv, final long numNovel, final double minVQSLod,
final VariantRecalibratorArgumentCollection.Mode model, final double novelTiTv,
final int accessibleTruthSites, final long numKnown, final int callsAtTruthSites) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you check the upstream call sites for uses of int to store the number of known/novel sites? If there's an int anywhere in the call chain the overflow issues will likely persist...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I found one in the input parsing and fixed it. (The number of truth sites values are also ints, but with the resources we use today they're way, way below Integer.MAX_VALUE and I don't expect that to ever change based on the size of the human genome.)

@ldgauthier
Copy link
Contributor Author

@mcovarr added two tests (and refactored a dataprovider, because I'm a good person) -- take another look?

Copy link
Collaborator

@mcovarr mcovarr left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

@ldgauthier
Copy link
Contributor Author

Closes #7859

Copy link
Collaborator

@droazen droazen left a comment

Choose a reason for hiding this comment

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

👍 Looks good @ldgauthier !

@ldgauthier ldgauthier merged commit add34e1 into master Jun 17, 2022
@ldgauthier ldgauthier deleted the ldg_gatherTranchesDebug branch June 17, 2022 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants