diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/coverage/DepthOfCoverageWalker.java b/java/src/org/broadinstitute/sting/gatk/walkers/coverage/DepthOfCoverageWalker.java index e181e1cb3..58ba3f499 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/coverage/DepthOfCoverageWalker.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/coverage/DepthOfCoverageWalker.java @@ -46,6 +46,9 @@ public class DepthOfCoverageWalker extends LocusWalker sampleNames = new TreeSet(); // keep track of the histogram data - private ExpandingArrayList coverageHist = null; - private int maxDepth = 0; - private int totalLoci = 0; + private ExpandingArrayList coverageHist = null; + private long maxDepth = 0; + private long totalLoci = 0; // we want to see reads with deletions public boolean includeReadsWithDeletionAtLoci() { return true; } @@ -84,7 +87,7 @@ public class DepthOfCoverageWalker extends LocusWalker(); + coverageHist = new ExpandingArrayList(); } // initialize read group names from BAM header @@ -120,7 +123,7 @@ public class DepthOfCoverageWalker extends LocusWalker 0 && p.getRead().getMappingQuality() < excludeMAPQBelowThis ) @@ -140,14 +143,14 @@ public class DepthOfCoverageWalker extends LocusWalker> results) { // build and print the per-interval header - out.println("\n\nPER_INTERVAL_COVERAGE_SECTION"); - printHeaderLine(true); + if ( ! suppressIntervalPrinting ) { + out.println("\n\nPER_INTERVAL_COVERAGE_SECTION"); + printHeaderLine(true); - // print all of the individual per-interval coverage data - for ( Pair result : results ) - printDoCInfo(result.first, result.second, true); + // print all of the individual per-interval coverage data + for ( Pair result : results ) + printDoCInfo(result.first, result.second, true); + } // if we need to print the histogram, do so now if ( printHistogram ) @@ -220,7 +225,6 @@ public class DepthOfCoverageWalker extends LocusWalker maxDepth ) maxDepth = depth; totalLoci++; } - private int getCov(int depth) { - return coverageHist.get(depth); + private long getCov(long depth) { + return coverageHist.get((int)depth); } private void printHisto() { @@ -292,7 +296,7 @@ public class DepthOfCoverageWalker extends LocusWalker depthByReadGroup = null; - public HashMap depthBySample = null; + public HashMap depthByReadGroup = null; + public HashMap depthBySample = null; public DoCInfo() { if ( printBaseCounts ) { - baseCounts = new int[4]; + baseCounts = new long[4]; } if ( byReadGroup ) { - depthByReadGroup = new HashMap(); + depthByReadGroup = new HashMap(); for ( String readGroupName : readGroupNames ) - depthByReadGroup.put(readGroupName, 0); + depthByReadGroup.put(readGroupName, 0L); } if ( bySample ) { - depthBySample = new HashMap(); + depthBySample = new HashMap(); for ( String sample : sampleNames ) - depthBySample.put(sample, 0); + depthBySample.put(sample, 0L); } }