diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/SingleSampleGenotyper.java b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/SingleSampleGenotyper.java index 937d48840..dbd58589a 100644 --- a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/SingleSampleGenotyper.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/SingleSampleGenotyper.java @@ -7,7 +7,6 @@ import org.broadinstitute.sting.gatk.filters.ZeroMappingQualityReadFilter; import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker; import org.broadinstitute.sting.gatk.walkers.LocusWalker; import org.broadinstitute.sting.gatk.walkers.ReadFilters; -import org.broadinstitute.sting.gatk.walkers.TreeReducible; import org.broadinstitute.sting.utils.BaseUtils; import org.broadinstitute.sting.utils.ReadBackedPileup; import org.broadinstitute.sting.utils.cmdLine.Argument; @@ -17,7 +16,7 @@ import org.broadinstitute.sting.utils.genotype.GenotypeWriterFactory; import java.io.File; @ReadFilters(ZeroMappingQualityReadFilter.class) -public class SingleSampleGenotyper extends LocusWalker implements TreeReducible { +public class SingleSampleGenotyper extends LocusWalker { // Control output settings @Argument(fullName = "variants_out", shortName = "varout", doc = "File to which variants should be written", required = false) public File VARIANTS_FILE = null; @@ -48,16 +47,17 @@ public class SingleSampleGenotyper extends LocusWalker= LOD_THRESHOLD) { sum.nConfidentCalls++; //System.out.printf("Call %s%n", call); - genotypeWriter.addGenotypeCall(call); + sum.writer.addGenotypeCall(call); } else sum.nNonConfidentCalls++; } return sum; } - /** - * Combine adjacent call results. - * - * @param lhs first set of partial call results from genotyper; guaranteed to have come from 'earlier' in genome. - * @param rhs second set of partial call results from genotyper; guaranteed to have come from 'later' in genome. - * - * @return combined call results. - */ - public CallResult treeReduce( CallResult lhs, CallResult rhs ) { - CallResult combined = new CallResult(); - combined.nCalledBases = lhs.nCalledBases + rhs.nCalledBases; - combined.nConfidentCalls = lhs.nConfidentCalls + rhs.nConfidentCalls; - combined.nNonConfidentCalls = lhs.nNonConfidentCalls + rhs.nNonConfidentCalls; - return combined; - } - /** Close the variant file. */ public void onTraversalDone(CallResult sum) { - // If the VARIANTS_FILE is null, the GATK is managing the output stream. Close the file. - if ( VARIANTS_FILE == null ) - genotypeWriter.close(); + sum.writer.close(); } }