From 12b5d9c70cee453f3d848cef299465beed33006f Mon Sep 17 00:00:00 2001 From: hanna Date: Tue, 14 Jul 2009 16:07:00 +0000 Subject: [PATCH] The number of loci can easily overflow an int. Change reduce type to a Long. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1233 348d0f76-0448-11de-a6fe-93d51630548a --- .../sting/gatk/walkers/CountLociWalker.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/CountLociWalker.java b/java/src/org/broadinstitute/sting/gatk/walkers/CountLociWalker.java index f2ba77321..be9affc38 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/CountLociWalker.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/CountLociWalker.java @@ -13,14 +13,14 @@ import java.util.List; * Time: 3:22:14 PM * To change this template use File | Settings | File Templates. */ -public class CountLociWalker extends LocusWalker implements TreeReducible { +public class CountLociWalker extends LocusWalker implements TreeReducible { public Integer map(RefMetaDataTracker tracker, char ref, LocusContext context) { return 1; } - public Integer reduceInit() { return 0; } + public Long reduceInit() { return 0l; } - public Integer reduce(Integer value, Integer sum) { + public Long reduce(Integer value, Long sum) { return value + sum; } @@ -28,7 +28,7 @@ public class CountLociWalker extends LocusWalker implements Tr * Reduces two subtrees together. In this case, the implementation of the tree reduce * is exactly the same as the implementation of the single reduce. */ - public Integer treeReduce(Integer lhs, Integer rhs) { + public Long treeReduce(Long lhs, Long rhs) { return lhs + rhs; } }