diff --git a/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java b/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java index e658c2a58..a71f0715d 100755 --- a/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java +++ b/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java @@ -309,8 +309,7 @@ public class GenomeAnalysisEngine { * Returns sets of samples present in the (merged) input SAM stream, grouped by readers (i.e. underlying * individual bam files). For instance: if GATK is run with three input bam files (three -I arguments), then the list * returned by this method will contain 3 elements (one for each reader), with each element being a set of sample names - * found in the corresponding bam file. The sample names returned will be in order of the files passed in the input - * parameter list of the GATK. + * found in the corresponding bam file. * * @return */ @@ -385,7 +384,7 @@ public class GenomeAnalysisEngine { rg_sets.add(groups); for (SAMReadGroupRecord g : r.getFileHeader().getReadGroups()) { - if (hm.hasGroupIdDuplicates()) { // Check if there were read group clashes with hasGroupIdDuplicates and if so: + if (hm.hasReadGroupCollisions()) { // Check if there were read group clashes with hasGroupIdDuplicates and if so: // use HeaderMerger to translate original read group id from the reader into the read group id in the // merged stream, and save that remapped read group id to associate it with specific reader groups.add(hm.getReadGroupId(r, g.getReadGroupId())); diff --git a/java/src/org/broadinstitute/sting/gatk/iterators/MergingSamRecordIterator2.java b/java/src/org/broadinstitute/sting/gatk/iterators/MergingSamRecordIterator2.java index 265df5879..a70ebcc5d 100644 --- a/java/src/org/broadinstitute/sting/gatk/iterators/MergingSamRecordIterator2.java +++ b/java/src/org/broadinstitute/sting/gatk/iterators/MergingSamRecordIterator2.java @@ -235,15 +235,22 @@ public class MergingSamRecordIterator2 implements CloseableIterator, final SAMRecord record = iterator.next(); addIfNotEmpty(iterator); - if (this.samHeaderMerger.hasGroupIdDuplicates()) { - final String id = (String) record.getAttribute(ReservedTagConstants.READ_GROUP_ID); - final String newId = this.samHeaderMerger.getReadGroupId(iterator.getReader(), id); - record.setAttribute(ReservedTagConstants.READ_GROUP_ID, newId); + // Fix the read group if needs be + if (this.samHeaderMerger.hasReadGroupCollisions()) { + final String oldGroupId = (String) record.getAttribute(ReservedTagConstants.READ_GROUP_ID); + if (oldGroupId != null ) { + final String newGroupId = this.samHeaderMerger.getReadGroupId(iterator.getReader(), oldGroupId); + record.setAttribute(ReservedTagConstants.READ_GROUP_ID, newGroupId); + } } - final String oldProgramGroupId = (String) record.getAttribute(SAMTag.PG.toString()); - if (oldProgramGroupId != null) { - final String newProgramGroupId = this.samHeaderMerger.getProgramGroupId(iterator.getReader(), oldProgramGroupId); - record.setAttribute(SAMTag.PG.toString(), newProgramGroupId); + + // Fix the program group if needs be + if (this.samHeaderMerger.hasProgramGroupCollisions()) { + final String oldGroupId = (String) record.getAttribute(ReservedTagConstants.PROGRAM_GROUP_ID); + if (oldGroupId != null ) { + final String newGroupId = this.samHeaderMerger.getProgramGroupId(iterator.getReader(), oldGroupId); + record.setAttribute(ReservedTagConstants.PROGRAM_GROUP_ID, newGroupId); + } } // if we don't have a read group, set one correctly diff --git a/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java b/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java index 48c83274b..85233b6d0 100755 --- a/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java +++ b/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java @@ -43,7 +43,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { public void testMultiSamplePilot1() { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( "-T UnifiedGenotyper -R /broad/1KG/reference/human_b36_both.fasta -I /humgen/gsa-scr1/GATK_Data/Validation_Data/low_coverage_CEU.chr1.10k-11k.bam -varout %s -L 1:10,023,400-10,024,000 -bm empirical -gm EM_POINT_ESTIMATE -confidence 50", 1, - Arrays.asList("8f14c1efea00b32984ec52db7a800d1b")); + Arrays.asList("b7e12c4011d0043024e0dd2dd5764752")); executeTest("testMultiSamplePilot1", spec); } @@ -205,7 +205,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { public void empirical1MbTestBinaryGeli() { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( baseTestString() + " -L 1:10,000,000-11,000,000 -bm empirical --variant_output_format GELI_BINARY -confidence 50", 1, - Arrays.asList("915abf82a04fcd1842f6865501bae67c")); + Arrays.asList("18f175c7ccaeca57b8d412e9f4ebbe50")); executeTest("empirical1MbTestBinaryGeli", spec); } } diff --git a/settings/repository/edu.mit.broad/picard-private-1084.jar b/settings/repository/edu.mit.broad/picard-private-1109.jar similarity index 77% rename from settings/repository/edu.mit.broad/picard-private-1084.jar rename to settings/repository/edu.mit.broad/picard-private-1109.jar index 66dce1a99..40e4b6323 100644 Binary files a/settings/repository/edu.mit.broad/picard-private-1084.jar and b/settings/repository/edu.mit.broad/picard-private-1109.jar differ diff --git a/settings/repository/edu.mit.broad/picard-private-1084.xml b/settings/repository/edu.mit.broad/picard-private-1109.xml similarity index 63% rename from settings/repository/edu.mit.broad/picard-private-1084.xml rename to settings/repository/edu.mit.broad/picard-private-1109.xml index 18204e9a7..15aa14c9c 100644 --- a/settings/repository/edu.mit.broad/picard-private-1084.xml +++ b/settings/repository/edu.mit.broad/picard-private-1109.xml @@ -1,3 +1,3 @@ - + diff --git a/settings/repository/net.sf/picard-1.05.140.xml b/settings/repository/net.sf/picard-1.05.140.xml deleted file mode 100644 index aac545236..000000000 --- a/settings/repository/net.sf/picard-1.05.140.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/settings/repository/net.sf/picard-1.05.140.jar b/settings/repository/net.sf/picard-1.07.168.jar similarity index 59% rename from settings/repository/net.sf/picard-1.05.140.jar rename to settings/repository/net.sf/picard-1.07.168.jar index b93c47700..d3c6b6509 100644 Binary files a/settings/repository/net.sf/picard-1.05.140.jar and b/settings/repository/net.sf/picard-1.07.168.jar differ diff --git a/settings/repository/net.sf/picard-1.07.168.xml b/settings/repository/net.sf/picard-1.07.168.xml new file mode 100644 index 000000000..3bcd91517 --- /dev/null +++ b/settings/repository/net.sf/picard-1.07.168.xml @@ -0,0 +1,3 @@ + + + diff --git a/settings/repository/net.sf/sam-1.05.140.xml b/settings/repository/net.sf/sam-1.05.140.xml deleted file mode 100644 index a9e5a57b2..000000000 --- a/settings/repository/net.sf/sam-1.05.140.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/settings/repository/net.sf/sam-1.05.140.jar b/settings/repository/net.sf/sam-1.07.168.jar similarity index 82% rename from settings/repository/net.sf/sam-1.05.140.jar rename to settings/repository/net.sf/sam-1.07.168.jar index e983077fd..d2baad787 100644 Binary files a/settings/repository/net.sf/sam-1.05.140.jar and b/settings/repository/net.sf/sam-1.07.168.jar differ diff --git a/settings/repository/net.sf/sam-1.07.168.xml b/settings/repository/net.sf/sam-1.07.168.xml new file mode 100644 index 000000000..b970b0f3c --- /dev/null +++ b/settings/repository/net.sf/sam-1.07.168.xml @@ -0,0 +1,3 @@ + + +