From c5b0ba641c890d9931c56f8ac32f0b321da69f8c Mon Sep 17 00:00:00 2001 From: Laura Gauthier Date: Thu, 17 Oct 2019 14:44:43 -0400 Subject: [PATCH] Address comments --- .../utils/genotyper/AlleleLikelihoods.java | 6 +++--- .../HaplotypeCallerIntegrationTest.java | 18 +++++++----------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/main/java/org/broadinstitute/hellbender/utils/genotyper/AlleleLikelihoods.java b/src/main/java/org/broadinstitute/hellbender/utils/genotyper/AlleleLikelihoods.java index f64aa0a4282..54dc82c796b 100644 --- a/src/main/java/org/broadinstitute/hellbender/utils/genotyper/AlleleLikelihoods.java +++ b/src/main/java/org/broadinstitute/hellbender/utils/genotyper/AlleleLikelihoods.java @@ -352,10 +352,10 @@ public void normalizeLikelihoods(final double maximumLikelihoodDifferenceCap) { private void normalizeLikelihoodsPerEvidence(final double maximumBestAltLikelihoodDifference, final double[][] sampleValues, final int sampleIndex, final int evidenceIndex) { - //allow the best "alternative" allele to be the reference because asymmetry leads to strange artifacts like het calls with >90% alt reads - final BestAllele bestAlternativeAllele = searchBestAllele(sampleIndex,evidenceIndex,true); + //allow the best allele to be the reference because asymmetry leads to strange artifacts like het calls with >90% alt reads + final BestAllele bestAllele = searchBestAllele(sampleIndex,evidenceIndex,true); - final double worstLikelihoodCap = bestAlternativeAllele.likelihood + maximumBestAltLikelihoodDifference; + final double worstLikelihoodCap = bestAllele.likelihood + maximumBestAltLikelihoodDifference; final int alleleCount = alleles.numberOfAlleles(); diff --git a/src/test/java/org/broadinstitute/hellbender/tools/walkers/haplotypecaller/HaplotypeCallerIntegrationTest.java b/src/test/java/org/broadinstitute/hellbender/tools/walkers/haplotypecaller/HaplotypeCallerIntegrationTest.java index 123677452d1..a294bf9b2cd 100644 --- a/src/test/java/org/broadinstitute/hellbender/tools/walkers/haplotypecaller/HaplotypeCallerIntegrationTest.java +++ b/src/test/java/org/broadinstitute/hellbender/tools/walkers/haplotypecaller/HaplotypeCallerIntegrationTest.java @@ -1228,18 +1228,14 @@ public void testContaminatedHomVarDeletions() { final File outputContaminatedHomVarDeletions = createTempFile("testContaminatedHomVarDeletions", ".vcf"); - // Run both with and without --max-alternate-alleles over our interval, so that we can - // prove that the argument is working as intended. - final String[] argsNoMaxAlternateAlleles = { - "-I", bam, - "-R", hg38Reference, - "-L", intervals, - "-O", outputContaminatedHomVarDeletions.getAbsolutePath(), - "--interval-padding", "50" - }; - runCommandLine(argsNoMaxAlternateAlleles); + final ArgumentsBuilder args = new ArgumentsBuilder().addInput(new File(bam)) + .addReference(hg38Reference) + .addInterval(new SimpleInterval(intervals)) + .addOutput(outputContaminatedHomVarDeletions) + .addNumericArgument(IntervalArgumentCollection.INTERVAL_PADDING_LONG_NAME, 50); + runCommandLine(args); - List vcs = VariantContextTestUtils.readEntireVCFIntoMemory(outputContaminatedHomVarDeletions.getAbsolutePath()).getRight(); + List vcs = VariantContextTestUtils.getVariantContexts(outputContaminatedHomVarDeletions); //check known homozygous deletion for correct genotype for (final VariantContext vc : vcs) {