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

Update SamComparisonMetric.java and SamComparison.java to refactor ints to longs #1985

Merged
merged 4 commits into from
Dec 17, 2024

Conversation

gokalpcelik
Copy link
Contributor

CompareSAMs tool may cause overflows in metrics due to integer usage in variables.

This commit changes integers to longs to prevent possible overflowing of counters in cases such as the forum topic below.

https://gatk.broadinstitute.org/hc/en-us/community/posts/31913243796891-Negative-number-in-the-output-file-of-CompareSAMs

This commit changes integers to longs to prevent possible overflowing of counters in cases such as the forum topic below.

https://gatk.broadinstitute.org/hc/en-us/community/posts/31913243796891-Negative-number-in-the-output-file-of-CompareSAMs
@gokalpcelik gokalpcelik marked this pull request as draft December 16, 2024 13:15
Updated methods for metrics.
@gokalpcelik gokalpcelik changed the title Update SamComparisonMetric.java to refactor ints to longs Update SamComparisonMetric.java and SamComparison.java to refactor ints to longs Dec 16, 2024
@gokalpcelik gokalpcelik marked this pull request as ready for review December 16, 2024 13:21
@gokalpcelik gokalpcelik marked this pull request as draft December 16, 2024 13:29
Additional refactors to fix possible problematic for loops for remaning reads.
Variables converted to longs to prevent casting longs to integers in tests.
@gokalpcelik gokalpcelik marked this pull request as ready for review December 16, 2024 15:24
Copy link
Member

@lbergelson lbergelson left a comment

Choose a reason for hiding this comment

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

@gokalpcelik Thank you, this seems very reasonable to me.

@lbergelson lbergelson merged commit 886d5f0 into master Dec 17, 2024
9 checks passed
@lbergelson lbergelson deleted the gc_SamComparisonMetric_refactor branch December 17, 2024 21:58
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.

2 participants