Skip to content

Commit 03eb727

Browse files
committed
Implemented code review suggestions
1 parent 7ad446b commit 03eb727

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/main/java/org/broadinstitute/hellbender/tools/walkers/genotyper/GenotypingEngine.java

+7-3
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,13 @@ public VariantContext calculateGenotypes(final VariantContext vc, final Genotype
182182

183183
// return a null call if we don't pass the confidence cutoff or the most likely allele frequency is zero
184184
// skip this if we are already looking at a vc with NON_REF as the first alt allele i.e. if we are in GenotypeGVCFs
185-
if ( !passesEmitThreshold(phredScaledConfidence, outputAlternativeAlleles.siteIsMonomorphic) && !emitAllSites()
185+
if ( !passesEmitThreshold(phredScaledConfidence, outputAlternativeAlleles.siteIsMonomorphic) && !emitAllActiveSites()
186186
&& noAllelesOrFirstAlleleIsNotNonRef(outputAlternativeAlleles.alleles) && givenAlleles.isEmpty()) {
187187
return null;
188188
}
189189

190190
// return a null call if we aren't forcing site emission and the only alt allele is a spanning deletion
191-
if (! emitAllSites() && outputAlternativeAlleles.alleles.size() == 1 && Allele.SPAN_DEL.equals(outputAlternativeAlleles.alleles.get(0))) {
191+
if (! emitAllActiveSites() && outputAlternativeAlleles.alleles.size() == 1 && Allele.SPAN_DEL.equals(outputAlternativeAlleles.alleles.get(0))) {
192192
return null;
193193
}
194194

@@ -375,7 +375,11 @@ protected final boolean hasTooManyAlternativeAlleles(final VariantContext vc) {
375375
return true;
376376
}
377377

378-
protected boolean emitAllSites() {
378+
/**
379+
* Whether or not all calls at any region over the activity threshold should be emitted regardless of confidence.
380+
* This does not necessarily emit calls for all sites in a region (see {@link OutputMode}).
381+
*/
382+
protected boolean emitAllActiveSites() {
379383
return configuration.outputMode == OutputMode.EMIT_ALL_ACTIVE_SITES;
380384
}
381385

src/main/java/org/broadinstitute/hellbender/tools/walkers/genotyper/OutputMode.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ public enum OutputMode {
1010
/** produces calls at variant sites and confident reference sites */
1111
EMIT_ALL_CONFIDENT_SITES,
1212

13-
/** produces calls at any callable site regardless of confidence. This does not necessarily output calls for all
14-
* sites in a region. This argument is intended only for point mutations (SNPs); it will not produce a
15-
* comprehensive set of indels. */
13+
/** Produces calls at any region over the activity threshold regardless of confidence. This does not necessarily
14+
* output calls for all sites in a region. This argument is intended only for point mutations (SNPs); it will not
15+
* produce a comprehensive set of indels. */
1616
EMIT_ALL_ACTIVE_SITES
1717
}

0 commit comments

Comments
 (0)