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

mutect2 expose param #8447

Merged
merged 4 commits into from
Aug 14, 2023
Merged

mutect2 expose param #8447

merged 4 commits into from
Aug 14, 2023

Conversation

ldgauthier
Copy link
Contributor

Allow users to turn off Mutect2 error model fix from 4.1.9.0

@droazen
Copy link
Contributor

droazen commented Aug 1, 2023

@ldgauthier Did you intend to include the GnarlyGenotyper changes on this branch?

Copy link
Contributor

@davidbenjamin davidbenjamin left a comment

Choose a reason for hiding this comment

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

Just one suggestion.



@Test
public void testOldErrorModelBehavior() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Delete

*/
@Advanced
@Argument(fullName = USER_DEFINED_BASE_QUAL_CORRECTION, optional = true, doc = "Set to zero to turn off the error model changes included in GATK 4.1.9.0.")
public double userDefinedBaseQualCorrection = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

I lean toward making this private int activeRegionMultipleSubstitutionBaseQualCorrection = Math.round(10 * Math.log(3)) (maybe make the name a bit more graceful than that). That way 1) setting it to zero is inherently the desired behavior of turning off the change without requiring interpretation as a sentinel value, 2) it eliminates the indirection of the user-defined multiplier and goes straight to the desired variable, 3) it makes the variable an int from the beginning.

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 think I get what you're saying, but in that case it would be public since it's an arg right?

Copy link
Contributor

Choose a reason for hiding this comment

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

For sure, I'm not sure why I wrote private.

@ldgauthier
Copy link
Contributor Author

I think I got it right but please double check the actual base qual equation -- back to you @davidbenjamin

Copy link
Contributor

@davidbenjamin davidbenjamin left a comment

Choose a reason for hiding this comment

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

Yep, that's what I had in mind. Back to @ldgauthier.

private static final int ONE_THIRD_QUAL_CORRECTION = 5;

private static double USER_DEFINED_QUAL_CORRECTION = 1;
private static double MULTIPLE_SUBSTITUTION_BASE_QUAL_CORRECTION = 5;
Copy link
Contributor

Choose a reason for hiding this comment

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

The constant default isn't needed anymore because now the default is set in the argument collection, right?

@Argument(fullName = USER_DEFINED_BASE_QUAL_CORRECTION, optional = true, doc = "Set to zero to turn off the error model changes included in GATK 4.1.9.0.")
public double userDefinedBaseQualCorrection = 1;
@Argument(fullName = MULTIPLE_SUBSTITUTION_BASE_QUAL_CORRECTION, optional = true, doc = "Set to zero to turn off the error model changes included in GATK 4.1.9.0.")
public long activeRegionMultipleSubstitutionBaseQualCorrection = Math.round(10 * Math.log(3));
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be an int.

@gatk-bot
Copy link

Github actions tests reported job failures from actions build 5822346095
Failures in the following jobs:

Test Type JDK Job ID Logs
variantcalling 17.0.6+10 5822346095.2 logs

Copy link
Contributor

@davidbenjamin davidbenjamin left a comment

Choose a reason for hiding this comment

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

👍

@ldgauthier ldgauthier merged commit 9e0e1ff into master Aug 14, 2023
20 checks passed
@ldgauthier ldgauthier deleted the ldg_mutect2_expose_param branch August 14, 2023 18:36
@ldgauthier
Copy link
Contributor Author

Addresses #7921

rickymagner pushed a commit that referenced this pull request Nov 28, 2023
Allow users to turn off fix from 4.1.9.0 for consistency's sake
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.

4 participants