Skip to content

Commit

Permalink
whoops
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbenjamin committed Sep 20, 2023
1 parent ce5b927 commit 7ea5494
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,20 +171,16 @@ public static AssemblyResultSet generatePDHaplotypes(final AssemblyResultSet sou
.map(events -> constructHaplotypeFromEvents(referenceHaplotype, events, true)).toList();
branchHaplotypesDebugMessage(referenceHaplotype, debug, branch, branchHaps);
outputHaplotypes.addAll(branchHaps);

Check warning on line 173 in src/main/java/org/broadinstitute/hellbender/tools/walkers/haplotypecaller/PartiallyDeterminedHaplotypeComputationEngine.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/broadinstitute/hellbender/tools/walkers/haplotypecaller/PartiallyDeterminedHaplotypeComputationEngine.java#L169-L173

Added lines #L169 - L173 were not covered by tests
}

if (outputHaplotypes.size() > MAX_PD_HAPS_TO_GENERATE) {
Utils.printIf(debug,() -> "Too many branch haplotypes found, aborting ["+outputHaplotypes.size()+"]");
return sourceSet;
}
if (outputHaplotypes.size() > MAX_PD_HAPS_TO_GENERATE) {
Utils.printIf(debug,() -> "Too many branch haplotypes found, aborting ["+outputHaplotypes.size()+"]");

Check warning on line 177 in src/main/java/org/broadinstitute/hellbender/tools/walkers/haplotypecaller/PartiallyDeterminedHaplotypeComputationEngine.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/broadinstitute/hellbender/tools/walkers/haplotypecaller/PartiallyDeterminedHaplotypeComputationEngine.java#L177

Added line #L177 was not covered by tests
return sourceSet;
}
}
}
}

if (outputHaplotypes.size() > MAX_PD_HAPS_TO_GENERATE) {
Utils.printIf(debug,() -> "Too many branch haplotypes found, aborting ["+outputHaplotypes.size()+"]");
return sourceSet;
}
sourceSet.storeAssemblyHaplotypes();

// TODO: Sorting haplotypes is unnecessary but makes debugging against previous versions much easier.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2165,6 +2165,41 @@ public void testPDPairHMMResultsFile() throws Exception {
}
}

@Test()
// Since the PDHMM isn't currently slot-in compared to the pairHMM modes this has to be computed seperately...
public void oneOffBugFixTest() throws Exception {
Utils.resetRandomGenerator();

Check warning on line 2171 in src/test/java/org/broadinstitute/hellbender/tools/walkers/haplotypecaller/HaplotypeCallerIntegrationTest.java

View check run for this annotation

Codecov / codecov/patch

src/test/java/org/broadinstitute/hellbender/tools/walkers/haplotypecaller/HaplotypeCallerIntegrationTest.java#L2171

Added line #L2171 was not covered by tests

final File vcfOutput = createTempFile("hmmResultFileTest", ".vcf");
final File expected = new File(largeFileTestDir, "expected.PDHMM.hmmresults.txt");

Check warning on line 2174 in src/test/java/org/broadinstitute/hellbender/tools/walkers/haplotypecaller/HaplotypeCallerIntegrationTest.java

View check run for this annotation

Codecov / codecov/patch

src/test/java/org/broadinstitute/hellbender/tools/walkers/haplotypecaller/HaplotypeCallerIntegrationTest.java#L2173-L2174

Added lines #L2173 - L2174 were not covered by tests


final String[] args = {

Check warning on line 2177 in src/test/java/org/broadinstitute/hellbender/tools/walkers/haplotypecaller/HaplotypeCallerIntegrationTest.java

View check run for this annotation

Codecov / codecov/patch

src/test/java/org/broadinstitute/hellbender/tools/walkers/haplotypecaller/HaplotypeCallerIntegrationTest.java#L2177

Added line #L2177 was not covered by tests
"-I", "gs://broad-dsde-methods-dragen/reprocessed_data_v3.7.5_masked/CH1_CHM13_WGS4/CH1_CHM13_WGS4.bam",
"-R", "gs://gcp-public-data--broad-references/hg38/v0/dragen_reference/Homo_sapiens_assembly38_masked.fasta",
"-L", "chr7:138621900-138622300", //"gs://fc-secure-a44694f1-6f9f-4e39-8a92-3bb74d92d547/submissions/2bdd7519-3398-4441-9d72-dd7a8d045e85/VariantCalling/1772b061-1e78-42fb-b748-a2bf1f3a7abf/call-ScatterIntervalList/glob-cb4648beeaff920acb03de7603c06f98/185scattered.interval_list",
"-ip", "300",
"-O", vcfOutput.getAbsolutePath(),

Check warning on line 2182 in src/test/java/org/broadinstitute/hellbender/tools/walkers/haplotypecaller/HaplotypeCallerIntegrationTest.java

View check run for this annotation

Codecov / codecov/patch

src/test/java/org/broadinstitute/hellbender/tools/walkers/haplotypecaller/HaplotypeCallerIntegrationTest.java#L2182

Added line #L2182 was not covered by tests
"--dragen-mode",
"--dragstr-params-path", TEST_FILES_DIR+"example.dragstr-params.txt",

// Pileup Caller args
"--" + PileupDetectionArgumentCollection.PILEUP_DETECTION_LONG_NAME,
"--" + PileupDetectionArgumentCollection.PILEUP_DETECTION_ABSOLUTE_ALT_DEPTH, "0",
"--" + StandardArgumentDefinitions.ADD_OUTPUT_VCF_COMMANDLINE, "false",

// Pileup caller and PDHMM arguments
"--" + PileupDetectionArgumentCollection.PILEUP_DETECTION_BAD_READ_RATIO_LONG_NAME, "0.40",
"--" + PileupDetectionArgumentCollection.PILEUP_DETECTION_ENABLE_INDELS,
"--" + PileupDetectionArgumentCollection.PILEUP_DETECTION_ACTIVE_REGION_PHRED_THRESHOLD_LONG_NAME, "3.0",
"--" + PileupDetectionArgumentCollection.PILEUP_DETECTION_FILTER_ASSEMBLY_HAPS_THRESHOLD, "0.4",
"--" + PileupDetectionArgumentCollection.GENERATE_PARTIALLY_DETERMINED_HAPLOTYPES_LONG_NAME,

};

runCommandLine(args);
}

Check warning on line 2201 in src/test/java/org/broadinstitute/hellbender/tools/walkers/haplotypecaller/HaplotypeCallerIntegrationTest.java

View check run for this annotation

Codecov / codecov/patch

src/test/java/org/broadinstitute/hellbender/tools/walkers/haplotypecaller/HaplotypeCallerIntegrationTest.java#L2200-L2201

Added lines #L2200 - L2201 were not covered by tests

@Test
public void testVcfFlowLikelihoodOptimizedCompConsistentWithPreviousResults() throws Exception {
Utils.resetRandomGenerator();
Expand Down

0 comments on commit 7ea5494

Please sign in to comment.