diff --git a/.github/actions/upload-gatk-test-results/action.yml b/.github/actions/upload-gatk-test-results/action.yml index 3353b727126..e2c267e2c75 100644 --- a/.github/actions/upload-gatk-test-results/action.yml +++ b/.github/actions/upload-gatk-test-results/action.yml @@ -40,9 +40,10 @@ runs: name: test-results-${{ inputs.is-docker == 'true' && 'docker-' || '' }}${{ matrix.Java }}-${{ matrix.testType }} path: build/reports/tests - - name: Upload to codecov - run: bash <(curl -s https://raw.githubusercontent.com/broadinstitute/codecov-bash-uploader/main/codecov-verified.bash) - shell: bash + # Disabling codecov because it is timing out and failing builds that otherwise succeed. + ## - name: Upload to codecov + ## run: bash <(curl -s https://raw.githubusercontent.com/broadinstitute/codecov-bash-uploader/main/codecov-verified.bash) + ## shell: bash - name: Upload Reports if: ${{ inputs.only-artifact != 'true' }} @@ -91,4 +92,4 @@ runs: run: | pip install --user PyGithub; python scripts/github_actions/Reporter.py ${{ steps.uploadreports.outputs.view_url }}; - shell: bash \ No newline at end of file + shell: bash diff --git a/src/main/java/org/broadinstitute/hellbender/utils/variant/GATKVariantContextUtils.java b/src/main/java/org/broadinstitute/hellbender/utils/variant/GATKVariantContextUtils.java index 675675c958c..2d9cdfb3810 100644 --- a/src/main/java/org/broadinstitute/hellbender/utils/variant/GATKVariantContextUtils.java +++ b/src/main/java/org/broadinstitute/hellbender/utils/variant/GATKVariantContextUtils.java @@ -327,13 +327,11 @@ public static void makeGenotypeCall(final int ploidy, gb.alleles(noCallAlleles(ploidy)); } else if (assignmentMethod == GenotypeAssignmentMethod.USE_PLS_TO_ASSIGN || assignmentMethod == GenotypeAssignmentMethod.PREFER_PLS) { - if (genotypeLikelihoods == null || !isInformative(genotypeLikelihoods)) { - if (assignmentMethod == GenotypeAssignmentMethod.PREFER_PLS) { - if (originalGT == null) { - throw new IllegalArgumentException("original GT cannot be null if assignmentMethod is PREFER_PLS"); - } else { - gb.alleles(bestMatchToOriginalGT(allelesToUse, originalGT.getAlleles())); - } + if ((genotypeLikelihoods == null || !isInformative(genotypeLikelihoods)) && assignmentMethod == GenotypeAssignmentMethod.PREFER_PLS) { + if (originalGT == null) { + throw new IllegalArgumentException("original GT cannot be null if assignmentMethod is PREFER_PLS"); + } else { + gb.alleles(bestMatchToOriginalGT(allelesToUse, originalGT.getAlleles())); } } else { final int maxLikelihoodIndex = MathUtils.maxElementIndex(genotypeLikelihoods); diff --git a/src/test/java/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCFIntegrationTest.java b/src/test/java/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCFIntegrationTest.java index af455202386..6cb90c93150 100644 --- a/src/test/java/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCFIntegrationTest.java +++ b/src/test/java/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCFIntegrationTest.java @@ -668,4 +668,37 @@ public void testAddedHcAsAnnotations() throws IOException { true ); } + @Test + public void testSpanDelRegression() throws IOException { + + final File input = getTestFile("reblock_cleanup_bug_variant.g.vcf"); + final File output = createTempFile("reblockedgvcf", ".vcf"); + + final ArgumentsBuilder args = new ArgumentsBuilder(); + + args.addReference(new File(pf_reference)) + .add("V", input) + .addFlag("do-qual-approx") + .add(StandardArgumentDefinitions.ADD_OUTPUT_VCF_COMMANDLINE, "false") + .add("A", "AssemblyComplexity") + .addFlag("floor-blocks") + .add("GQB", 20) + .add("GQB", 30) + .add("GQB", 40) + .addOutput(output); + + runCommandLine(args); + + Pair> actual = VariantContextTestUtils.readEntireVCFIntoMemory(output.getAbsolutePath()); + List variants = actual.getRight(); + Assert.assertEquals(variants.size(), 4); + VariantContext v0 = variants.get(0); + //crappy deletions are all collapsed into GQ0 ref block + Assert.assertEquals(v0.getStart(), 646914); + Assert.assertEquals(v0.getAttributeAsInt(VCFConstants.END_KEY, 0), 646953); + Assert.assertTrue(v0.getGenotype(0).isHomRef()); + Assert.assertEquals(v0.getGenotype(0).getGQ(), 0); + //no more star alleles because deletions are all gone + Assert.assertFalse(variants.stream().anyMatch(v -> v.getAlternateAlleles().contains(Allele.SPAN_DEL))); + } } diff --git a/src/test/resources/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF/reblock_cleanup_bug_variant.g.vcf b/src/test/resources/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF/reblock_cleanup_bug_variant.g.vcf new file mode 100644 index 00000000000..cbe18a19cbd --- /dev/null +++ b/src/test/resources/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF/reblock_cleanup_bug_variant.g.vcf @@ -0,0 +1,70 @@ +##fileformat=VCFv4.2 +##ALT= +##FILTER= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##GATKCommandLine= +##GVCFBlock0-10=minGQ=0(inclusive),maxGQ=10(exclusive) +##GVCFBlock10-20=minGQ=10(inclusive),maxGQ=20(exclusive) +##GVCFBlock20-30=minGQ=20(inclusive),maxGQ=30(exclusive) +##GVCFBlock30-40=minGQ=30(inclusive),maxGQ=40(exclusive) +##GVCFBlock40-50=minGQ=40(inclusive),maxGQ=50(exclusive) +##GVCFBlock50-60=minGQ=50(inclusive),maxGQ=60(exclusive) +##GVCFBlock60-70=minGQ=60(inclusive),maxGQ=70(exclusive) +##GVCFBlock70-80=minGQ=70(inclusive),maxGQ=80(exclusive) +##GVCFBlock80-90=minGQ=80(inclusive),maxGQ=90(exclusive) +##GVCFBlock90-100=minGQ=90(inclusive),maxGQ=100(exclusive) +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##source=HaplotypeCaller +#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT SENTh086.12-073.18_SEN.Di +Pf3D7_12_v3 646914 . TATA *,T, 0.01 . HAPCOMP=0,0,0;HAPDOM=0.00,0.800,0.00;HEC=7,4,1,0,0,0,0,0,0;MLEAC=0,0,0;MLEAF=NaN,NaN,NaN;NDA=3 GT:PL ./.:0,0,0,0,0,0,0,0,0,0 +Pf3D7_12_v3 646918 . T . . END=646919 GT:DP:GQ:MIN_DP:PL 0/0:0:0:0:0,0,0 +Pf3D7_12_v3 646920 . TTTTTTTTTTTTTC *,T, 0 . DP=5;ExcessHet=0.0000;HAPCOMP=0,1,0;HAPDOM=0.00,1.00,0.00;HEC=7,4,1,0,0,0,0,0,0;MLEAC=0,0,0;MLEAF=0.00,0.00,0.00;NDA=3;RAW_MQandDP=18000,5 GT:AD:DP:GQ:PL:SB 0/0:4,0,0,0:4:12:0,15,123,12,114,180,15,124,152,151:2,2,0,0 +Pf3D7_12_v3 646923 . T A,*, 0.01 . DP=4;ExcessHet=0.0000;HAPCOMP=0,0,0;HAPDOM=0.111,0.00,0.00;HEC=7,4,1,0,0,0;MLEAC=0,0,0;MLEAF=0.00,0.00,0.00;NDA=3;RAW_MQandDP=14400,4 GT:AD:DP:GQ:PL:SB 0/0:0,0,0,0:0:0:0,0,1,12,13,99,11,12,61,50:0,0,0,0 +Pf3D7_12_v3 646924 . T . . END=646925 GT:DP:GQ:MIN_DP:PL 0/0:4:12:4:0,12,99 +Pf3D7_12_v3 646926 . TTTTTTTC *,T, 0 . DP=5;ExcessHet=0.0000;HAPCOMP=0,0,0;HAPDOM=0.00,1.00,0.00;HEC=7,4,1,0,0,0,0,0,0;MLEAC=0,0,0;MLEAF=0.00,0.00,0.00;NDA=3;RAW_MQandDP=18000,5 GT:AD:DP:GQ:PL:SB 0/0:0,0,0,0:0:0:0,12,180,0,12,0,12,102,12,90:0,0,0,0 +Pf3D7_12_v3 646927 . TTTTTTC T,*, 0.01 . DP=5;ExcessHet=0.0000;HAPCOMP=1,0,0;HAPDOM=0.111,0.00,0.00;HEC=7,4,1,0,0,0,0;MLEAC=0,0,0;MLEAF=0.00,0.00,0.00;NDA=3;RAW_MQandDP=18000,5 GT:AD:DP:GQ:PL:SB 1/2:0,0,0,0:0:0:1,1,1,1,0,0,1,1,1,1:0,0,0,0 +Pf3D7_12_v3 646933 . C *,T, 3.15 . DP=5;ExcessHet=0.0000;HAPCOMP=0,1,0;HAPDOM=0.00,0.111,0.00;HEC=7,4,1,0,0,0,0;MLEAC=1,1,0;MLEAF=0.500,0.500,0.00;NDA=3;RAW_MQandDP=18000,5 GT:AD:DP:GQ:PL:SB 1/1:0,0,0,0:0:1:123,15,0,16,1,1,76,14,15,62:0,0,0,0 +Pf3D7_12_v3 646934 . T . . END=646947 GT:DP:GQ:MIN_DP:PL 0/0:7:15:5:0,15,124 +Pf3D7_12_v3 646948 . C . . END=646948 GT:DP:GQ:MIN_DP:PL 0/0:3:9:3:0,9,74 +Pf3D7_12_v3 646949 . A . . END=646953 GT:DP:GQ:MIN_DP:PL 0/0:5:15:5:0,15,124 +Pf3D7_12_v3 646954 . G . . END=646955 GT:DP:GQ:MIN_DP:PL 0/0:7:21:7:0,21,163 +Pf3D7_12_v3 646956 . C . . END=646956 GT:DP:GQ:MIN_DP:PL 0/0:8:10:8:0,10,159 +Pf3D7_12_v3 646957 . A . . END=646991 GT:DP:GQ:MIN_DP:PL 0/0:8:21:7:0,21,163 diff --git a/src/test/resources/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF/reblock_cleanup_bug_variant.g.vcf.idx b/src/test/resources/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF/reblock_cleanup_bug_variant.g.vcf.idx new file mode 100644 index 00000000000..05bb2e7ce76 Binary files /dev/null and b/src/test/resources/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF/reblock_cleanup_bug_variant.g.vcf.idx differ