Skip to content

Commit

Permalink
Update new test for copying arg sync
Browse files Browse the repository at this point in the history
  • Loading branch information
rickymagner committed Dec 8, 2023
1 parent a99eae2 commit 0e44296
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1050,15 +1050,15 @@ public void testArgCollectionCopiesAreSynchronized() {
hcArgs.applyBQD = !hcArgs.applyBQD;
hcArgs.dontGenotype = !hcArgs.dontGenotype;
hcArgs.standardArgs.annotateAllSitesWithPLs = !hcArgs.standardArgs.annotateAllSitesWithPLs;
hcArgs.standardArgs.genotypeArgs.annotateNumberOfAllelesDiscovered = !hcArgs.standardArgs.genotypeArgs.annotateNumberOfAllelesDiscovered;
hcArgs.standardArgs.genotypeArgs.ANNOTATE_NUMBER_OF_ALLELES_DISCOVERED = !hcArgs.standardArgs.genotypeArgs.ANNOTATE_NUMBER_OF_ALLELES_DISCOVERED;

// Create copy with different ploidy and check tweaked values (and one control non-changed value) remain in sync
HaplotypeCallerArgumentCollection hcArgsCopy = hcArgs.copyWithNewPloidy(3);
Assert.assertEquals(hcArgs.applyBQD, hcArgsCopy.applyBQD);
Assert.assertEquals(hcArgs.dontGenotype, hcArgsCopy.dontGenotype);
Assert.assertEquals(hcArgs.standardArgs.annotateAllSitesWithPLs, hcArgsCopy.standardArgs.annotateAllSitesWithPLs);
Assert.assertEquals(hcArgs.standardArgs.CONTAMINATION_FRACTION, hcArgsCopy.standardArgs.CONTAMINATION_FRACTION);
Assert.assertEquals(hcArgs.standardArgs.genotypeArgs.annotateNumberOfAllelesDiscovered, hcArgsCopy.standardArgs.genotypeArgs.annotateNumberOfAllelesDiscovered);
Assert.assertEquals(hcArgs.standardArgs.genotypeArgs.ANNOTATE_NUMBER_OF_ALLELES_DISCOVERED, hcArgsCopy.standardArgs.genotypeArgs.ANNOTATE_NUMBER_OF_ALLELES_DISCOVERED);

// Modify other values of copy and check they are now distinct, i.e. a "deep copy" was created above
hcArgsCopy.applyBQD = !hcArgsCopy.applyBQD;
Expand Down

0 comments on commit 0e44296

Please sign in to comment.