Small change for Matt -- output partition types in lexicographic order.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4365 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
7ad87d328d
commit
862c94c8ce
|
|
@ -148,15 +148,18 @@ public class DepthOfCoverageWalker extends LocusWalker<Map<DoCOutputType.Partiti
|
|||
PrintStream out = getCorrectStream(null, DoCOutputType.Aggregation.locus, DoCOutputType.FileType.summary);
|
||||
out.printf("%s\t%s","Locus","Total_Depth");
|
||||
for (DoCOutputType.Partition type : partitionTypes ) {
|
||||
// mhanna 22 Aug 2010 - Deliberately force this header replacement to make sure integration tests pass.
|
||||
// TODO: Update integration tests and get rid of this.
|
||||
String typeName = (type == DoCOutputType.Partition.readgroup ? "read_group" : type.toString());
|
||||
out.printf("\t%s_%s","Average_Depth",typeName);
|
||||
out.printf("\t%s_%s","Average_Depth",type.toString());
|
||||
}
|
||||
|
||||
// get all the samples
|
||||
HashSet<String> allSamples = getSamplesFromToolKit(partitionTypes);
|
||||
ArrayList<String> allSampleList = new ArrayList<String>(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<Map<DoCOutputType.Partiti
|
|||
|
||||
public CoveragePartitioner reduce(Map<DoCOutputType.Partition,Map<String,int[]>> 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<Map<DoCOutputType.Partiti
|
|||
}
|
||||
|
||||
private void checkOrder(CoveragePartitioner ag) {
|
||||
// make sure the ordering stored at initialize() is propagated along reduce
|
||||
for (DoCOutputType.Partition t : partitionTypes ) {
|
||||
List<String> order = orderCheck.get(t);
|
||||
List<String> namesInAg = ag.getIdentifiersByType().get(t);
|
||||
|
|
|
|||
|
|
@ -77,6 +77,9 @@ public class PackageUtils {
|
|||
for( Class<? extends T> 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;
|
||||
|
|
|
|||
|
|
@ -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<String>(Arrays.asList(bams)), new ArrayList<String>(Arrays.asList(intervals)));
|
||||
|
||||
WalkerTestSpec spec = new WalkerTestSpec(cmd,0,new ArrayList<String>());
|
||||
|
||||
spec.addAuxFile("c9561b52344536d2b06ab97b0bb1a234",baseOutputFile);
|
||||
|
||||
execute("testLotsOfSamples",spec);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public class DepthOfCoverageIntegrationTest extends WalkerTest {
|
|||
WalkerTestSpec spec = new WalkerTestSpec(cmd,0, new ArrayList<String>());
|
||||
|
||||
// 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<String>(Arrays.asList(bams)),new ArrayList<String>(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<String>());
|
||||
|
||||
spec.addAuxFile("d570c27d82a80ebd2852e9d34aff4e87",baseOutputFile);
|
||||
spec.addAuxFile("6ccd7d8970ba98cb95fe41636a070c1c",baseOutputFile);
|
||||
spec.addAuxFile("0ee40f3e5091536c14e077b77557083a",createTempFileFromBase(baseOutputFile.getAbsolutePath()+".library_interval_summary"));
|
||||
|
||||
execute("testNoCoverageDueToFiltering",spec);
|
||||
|
|
|
|||
Loading…
Reference in New Issue