From 3a4844ebde9238fb05e2806830c4a6b4e09e020d Mon Sep 17 00:00:00 2001 From: chartl Date: Thu, 2 Sep 2010 19:30:03 +0000 Subject: [PATCH] Additional partition types into DepthOfCoverage: - Sequencing Center - Platform - Sample by Center - Sample by Platform - Sample by Platform by Center <---- needed for analysis I'm doing The fact that the latter three needed their own partition types, rather than being dictatable from the command line, combined with the new hierarchical traversal types, and new output formatting engine, suggest that DepthOfCoverageV3 is about ready to be retired in favor of a newer, sleeker version. For now, this will do. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4193 348d0f76-0448-11de-a6fe-93d51630548a --- .../gatk/walkers/coverage/CoverageUtils.java | 10 ++++++++++ .../coverage/DepthOfCoverageWalker.java | 20 +++++++++++++++++++ .../gatk/walkers/coverage/DoCOutputType.java | 2 +- 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/coverage/CoverageUtils.java b/java/src/org/broadinstitute/sting/gatk/walkers/coverage/CoverageUtils.java index 32dcd1b0e..c5efe3df6 100644 --- a/java/src/org/broadinstitute/sting/gatk/walkers/coverage/CoverageUtils.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/coverage/CoverageUtils.java @@ -45,6 +45,16 @@ public class CoverageUtils { return String.format("%s_rg_%s",r.getSample(),r.getReadGroupId()); } else if ( type == DoCOutputType.Partition.library ) { return r.getLibrary(); + } else if ( type == DoCOutputType.Partition.center ) { + return r.getSequencingCenter(); + } else if ( type == DoCOutputType.Partition.platform ) { + return r.getPlatform(); + } else if ( type == DoCOutputType.Partition.sample_by_center ) { + return String.format("%s_cn_%s",r.getSample(),r.getSequencingCenter()); + } else if ( type == DoCOutputType.Partition.sample_by_platform) { + return String.format("%s_pl_%s",r.getSample(),r.getPlatform()); + } else if ( type == DoCOutputType.Partition.sample_by_platform_by_center ) { + return String.format("%s_pl_%s_cn_%s",r.getSample(),r.getPlatform(),r.getSequencingCenter()); } else { throw new StingException("Invalid type ID sent to getTypeID. This is a BUG!"); } 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 6846bafe4..edf142aaf 100644 --- a/java/src/org/broadinstitute/sting/gatk/walkers/coverage/DepthOfCoverageWalker.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/coverage/DepthOfCoverageWalker.java @@ -205,6 +205,26 @@ public class DepthOfCoverageWalker extends LocusWalker