Skip to content

Commit 14ab33d

Browse files
committed
PR comments
1 parent 4798e80 commit 14ab33d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/main/java/org/broadinstitute/hellbender/tools/walkers/haplotypecaller/AlleleFiltering.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,8 @@ private AlleleLikelihoods<GATKRead, Allele> getAlleleLikelihoodMatrix(final Alle
352352
.forEach(alleleHaplotypeMap.get(notAllele)::add);
353353

354354
final AlleleLikelihoods<GATKRead, Allele> alleleLikelihoods = readLikelihoods.marginalize(alleleHaplotypeMap);
355-
final SimpleInterval variantCallingRelevantFragmentOverlap = new SimpleInterval(allele).expandWithinContig(assemblyArgs.informativeReadOverlapMargin, sequenceDictionary);
356-
alleleLikelihoods.retainEvidence(variantCallingRelevantFragmentOverlap::overlaps);
355+
final SimpleInterval expandedVariantInterval = new SimpleInterval(allele).expandWithinContig(assemblyArgs.informativeReadOverlapMargin, sequenceDictionary);
356+
alleleLikelihoods.retainEvidence(expandedVariantInterval::overlaps);
357357

358358
logger.debug(() -> String.format("GALM: %s %d %d", allele, alleleHaplotypeMap.get(allele.altAllele()).size(), alleleHaplotypeMap.get(notAllele).size()));
359359
return alleleLikelihoods;

src/main/java/org/broadinstitute/hellbender/tools/walkers/haplotypecaller/AlleleFilteringMutect.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public AlleleFilteringMutect(M2ArgumentCollection _m2args,
5050
* This is very similar to what is done in the callMutations function in MutectEngine, but here the haplotypes that do
5151
* not support the allele are all haplotypes that do not contain the allele rather than only the haplotypes that support reference
5252
* etc.
53-
* The log odds is calculated separately for the tumor and the normal samples and the smalles (the strongest) is returned
53+
* The log odds is calculated separately for the tumor and the normal samples and the smallest (the strongest) is returned
5454
*
5555
* @param alleleLikelihoods
5656
* @param allele
@@ -64,6 +64,9 @@ int getAlleleLikelihoodVsInverse(final AlleleLikelihoods<GATKRead, Allele> allel
6464
.filter(i -> !normalSamples.contains(alleleLikelihoods.getSample(i)))
6565
.mapToObj(alleleLikelihoods::sampleMatrix)
6666
.collect(Collectors.toList());
67+
if (allMatrices.size()==0){
68+
throw new GATKException.ShouldNeverReachHereException("No tumor samples found when calculating allele likelihood vs inverse");
69+
}
6770
final AlleleList<Allele> alleleList = allMatrices.get(0);
6871
final LikelihoodMatrix<GATKRead, Allele> logAllMatrix = SomaticGenotypingEngine.combinedLikelihoodMatrix(allMatrices, alleleList);
6972
final double alleleLogOddsTumor = somaticAltLogOdds(logAllMatrix);

0 commit comments

Comments
 (0)