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 f140abe3a..adda6317a 100644 --- a/java/src/org/broadinstitute/sting/gatk/walkers/coverage/DepthOfCoverageWalker.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/coverage/DepthOfCoverageWalker.java @@ -148,15 +148,18 @@ public class DepthOfCoverageWalker extends LocusWalker allSamples = getSamplesFromToolKit(partitionTypes); + ArrayList allSampleList = new ArrayList(allSamples.size()); + for ( String s : allSamples ) { + allSampleList.add(s); + } + Collections.sort(allSampleList); - for ( String s : allSamples) { + for ( String s : allSampleList) { out.printf("\t%s_%s","Depth_for",s); if ( printBaseCounts ) { out.printf("\t%s_%s",s,"base_counts"); @@ -258,6 +261,7 @@ public class DepthOfCoverageWalker extends LocusWalker> thisMap, CoveragePartitioner prevReduce) { if ( ! omitDepthOutput ) { + //checkOrder(prevReduce); // tests prevReduce.getIdentifiersByType().get(t) against the initialized header order printDepths(getCorrectStream(null, DoCOutputType.Aggregation.locus, DoCOutputType.FileType.summary),thisMap,prevReduce.getIdentifiersByType()); // this is an additional iteration through thisMap, plus dealing with IO, so should be much slower without // turning on omit @@ -757,6 +761,7 @@ public class DepthOfCoverageWalker extends LocusWalker order = orderCheck.get(t); List namesInAg = ag.getIdentifiersByType().get(t); diff --git a/java/src/org/broadinstitute/sting/utils/classloader/PackageUtils.java b/java/src/org/broadinstitute/sting/utils/classloader/PackageUtils.java index 7d49de573..ff2442882 100755 --- a/java/src/org/broadinstitute/sting/utils/classloader/PackageUtils.java +++ b/java/src/org/broadinstitute/sting/utils/classloader/PackageUtils.java @@ -77,6 +77,9 @@ public class PackageUtils { for( Class type: allTypes ) { if( JVMUtils.isConcrete(type) ) concreteTypes.add(type); + else { + System.out.printf("%s %s %s%n","Class",type.getSimpleName()," is not concrete. Skipping."); + } } return concreteTypes; diff --git a/java/test/org/broadinstitute/sting/gatk/walkers/coverage/DepthOfCoverageB36IntegrationTest.java b/java/test/org/broadinstitute/sting/gatk/walkers/coverage/DepthOfCoverageB36IntegrationTest.java index f175aa24f..99d7efb95 100644 --- a/java/test/org/broadinstitute/sting/gatk/walkers/coverage/DepthOfCoverageB36IntegrationTest.java +++ b/java/test/org/broadinstitute/sting/gatk/walkers/coverage/DepthOfCoverageB36IntegrationTest.java @@ -72,4 +72,19 @@ public class DepthOfCoverageB36IntegrationTest extends WalkerTest { execute("testMapQ0Only",spec); } + @Test + public void testLotsOfSamples() { + File baseOutputFile = this.createTempFile("testManySamples",".tmp"); + this.setOutputFileLocation(baseOutputFile); + String[] intervals = {"1:1105290-1105295"}; + String[] bams = {"/humgen/gsa-hpprojects/GATK/data/Validation_Data/pilot3.CEU+TSI.5loci.bam"}; + String cmd = buildRootCmd(b36KGReference, new ArrayList(Arrays.asList(bams)), new ArrayList(Arrays.asList(intervals))); + + WalkerTestSpec spec = new WalkerTestSpec(cmd,0,new ArrayList()); + + spec.addAuxFile("c9561b52344536d2b06ab97b0bb1a234",baseOutputFile); + + execute("testLotsOfSamples",spec); + } + } diff --git a/java/test/org/broadinstitute/sting/gatk/walkers/coverage/DepthOfCoverageIntegrationTest.java b/java/test/org/broadinstitute/sting/gatk/walkers/coverage/DepthOfCoverageIntegrationTest.java index f027109f1..a314f9f82 100644 --- a/java/test/org/broadinstitute/sting/gatk/walkers/coverage/DepthOfCoverageIntegrationTest.java +++ b/java/test/org/broadinstitute/sting/gatk/walkers/coverage/DepthOfCoverageIntegrationTest.java @@ -55,7 +55,7 @@ public class DepthOfCoverageIntegrationTest extends WalkerTest { WalkerTestSpec spec = new WalkerTestSpec(cmd,0, new ArrayList()); // now add the expected files that get generated - spec.addAuxFile("494c174ea0773bda98297a0cbdc188eb", baseOutputFile); + spec.addAuxFile("423571e4c05e7934322172654ac6dbb7", baseOutputFile); spec.addAuxFile("9df5e7e07efeb34926c94a724714c219", createTempFileFromBase(baseOutputFile.getAbsolutePath()+".library_cumulative_coverage_counts")); spec.addAuxFile("b9a7748e5aec4dc06daed893c901c00d", createTempFileFromBase(baseOutputFile.getAbsolutePath()+".library_cumulative_coverage_proportions")); spec.addAuxFile("9cd395f47b329b9dd00ad024fcac9929", createTempFileFromBase(baseOutputFile.getAbsolutePath()+".library_interval_statistics")); @@ -89,7 +89,7 @@ public class DepthOfCoverageIntegrationTest extends WalkerTest { String cmd = buildRootCmd(hg18Reference,new ArrayList(Arrays.asList(bams)),new ArrayList(Arrays.asList(intervals))) + " -mmq 0 -mbq 5 --maxBaseQuality 4 -dels -baseCounts -pt readgroup -pt sample -pt library --outputFormat csv"; WalkerTestSpec spec = new WalkerTestSpec(cmd,0, new ArrayList()); - spec.addAuxFile("d570c27d82a80ebd2852e9d34aff4e87",baseOutputFile); + spec.addAuxFile("6ccd7d8970ba98cb95fe41636a070c1c",baseOutputFile); spec.addAuxFile("0ee40f3e5091536c14e077b77557083a",createTempFileFromBase(baseOutputFile.getAbsolutePath()+".library_interval_summary")); execute("testNoCoverageDueToFiltering",spec);