From 58e354176e14e4175940f6783962661d33f18774 Mon Sep 17 00:00:00 2001 From: Ryan Poplin Date: Tue, 11 Jun 2013 10:33:22 -0400 Subject: [PATCH] Minor changes to docs in the graph pruning. --- .../haplotypecaller/graphs/LowWeightChainPruner.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/protected/java/src/org/broadinstitute/sting/gatk/walkers/haplotypecaller/graphs/LowWeightChainPruner.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/haplotypecaller/graphs/LowWeightChainPruner.java index 7327b5736..27b6bd902 100644 --- a/protected/java/src/org/broadinstitute/sting/gatk/walkers/haplotypecaller/graphs/LowWeightChainPruner.java +++ b/protected/java/src/org/broadinstitute/sting/gatk/walkers/haplotypecaller/graphs/LowWeightChainPruner.java @@ -80,7 +80,7 @@ public class LowWeightChainPruner { final Set edgesToKeep = new LinkedHashSet<>(); for ( final Path linearChain : getLinearChains(graph) ) { - if( mustBeKeep(linearChain, pruneFactor) ) { + if( mustBeKept(linearChain, pruneFactor) ) { // we must keep edges in any path that contains a reference edge or an edge with weight > pruneFactor edgesToKeep.addAll(linearChain.getEdges()); } @@ -96,10 +96,14 @@ public class LowWeightChainPruner { } /** - * Get the maximum pruning multiplicity seen on any edge in this graph - * @return an integer > 0 + * Traverse the edges in the path and determine if any are either ref edges or have weight above + * the pruning factor and should therefore not be pruned away. + * + * @param path the path in question + * @param pruneFactor the integer pruning factor + * @return true if any edge in the path must be kept */ - private boolean mustBeKeep(final Path path, final int pruneFactor) { + private boolean mustBeKept(final Path path, final int pruneFactor) { for ( final E edge : path.getEdges() ) { if ( edge.getPruningMultiplicity() >= pruneFactor || edge.isRef() ) return true;