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

fixed incoherent unit test cases in allele subsetting utils #6448

Merged
merged 2 commits into from Feb 16, 2020

Conversation

davidbenjamin
Copy link
Contributor

Closes #3672.

@ldgauthier The ADs, GTs, and PLs were inconsistent.

@gatk-bot
Copy link

gatk-bot commented Feb 9, 2020

Travis reported job failures from build 29063
Failures in the following jobs:

Test Type JDK Job ID Logs
python openjdk8 29063.5 logs
unit openjdk8 29063.3 logs
integration openjdk8 29063.2 logs

Copy link
Contributor

@ldgauthier ldgauthier left a comment

Choose a reason for hiding this comment

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

More comments than I expected. There are a few test cases that still need changes. Also IntelliJ tells me some of the AD/PL variables are unused.

attribute(GATKVCFConstants.STRAND_COUNT_BY_SAMPLE_KEY, new int[]{10, 10, 11, 11}).GQ(200).make())});

tests.add(new Object[]{
new VariantContextBuilder(vcBase).alleles(ACG).genotypes(new GenotypeBuilder(base).alleles(AA).AD(hetCG3AllelesAD).PL(hetCG3AllelesPL).
Copy link
Contributor

Choose a reason for hiding this comment

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

What was wrong with this test case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Based on the ADs and PLs this case was supposed to be: triallelic (A,C,G) variant with het alt (C/G) genotype, subset to just the ref and one alt allele. But that throws an error since the genotype has both alt alleles. Previously no error was thrown because the genotype was accidentally set as hom ref, contradicting the ADs and PLs. The test as intended was inherently impossible.

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it. You can take it out entirely then.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's gone; the diff mixed-and-matched similar lines to give the appearance that part of this case remained.

@davidbenjamin
Copy link
Contributor Author

Ready for round 2 of review.

Copy link
Contributor

@ldgauthier ldgauthier left a comment

Choose a reason for hiding this comment

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

Axe that dead test and then this is good to go.

@davidbenjamin davidbenjamin merged commit 5887df8 into master Feb 16, 2020
@davidbenjamin davidbenjamin deleted the db_allele_subsettingtest branch February 16, 2020 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

investigate potential bug in AlleleSubsettingUtilsUnitTest
3 participants