From 9f3328db5365f676604a02b1f9b60105602bd9dd Mon Sep 17 00:00:00 2001 From: Andrey Sivachenko Date: Tue, 16 Aug 2011 13:45:40 -0400 Subject: [PATCH 1/2] fixing read group name collision: before writing the read into respective stream in nway-out mode we now retrieve the original rg, not the merged/modified one --- .../broadinstitute/sting/utils/sam/NWaySAMFileWriter.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/java/src/org/broadinstitute/sting/utils/sam/NWaySAMFileWriter.java b/public/java/src/org/broadinstitute/sting/utils/sam/NWaySAMFileWriter.java index 3718345a4..70417889b 100644 --- a/public/java/src/org/broadinstitute/sting/utils/sam/NWaySAMFileWriter.java +++ b/public/java/src/org/broadinstitute/sting/utils/sam/NWaySAMFileWriter.java @@ -135,6 +135,11 @@ public class NWaySAMFileWriter implements SAMFileWriter { public void addAlignment(SAMRecord samRecord) { final SAMReaderID id = toolkit.getReaderIDForRead(samRecord); + String rg = samRecord.getStringAttribute("RG"); + if ( rg != null ) { + String rg_orig = toolkit.getReadsDataSource().getOriginalReadGroupId(rg); + samRecord.setAttribute("RG",rg_orig); + } writerMap.get(id).addAlignment(samRecord); } From 170d1ff7b677fddd2002a86f0bbca29da4b7f076 Mon Sep 17 00:00:00 2001 From: Ryan Poplin Date: Tue, 16 Aug 2011 14:17:46 -0400 Subject: [PATCH 2/2] Fix in UG for trying to call indels at IUPAC code bases when in EMIT_ALL_SITES mode --- .../gatk/walkers/genotyper/UnifiedGenotyperEngine.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java index a10897172..1b72aae25 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java @@ -485,6 +485,9 @@ public class UnifiedGenotyperEngine { Map stratifiedContexts = null; + if ( !BaseUtils.isRegularBase( refContext.getBase() ) ) + return null; + if ( model == GenotypeLikelihoodsCalculationModel.Model.INDEL ) { if (UAC.GenotypingMode == GenotypeLikelihoodsCalculationModel.GENOTYPING_MODE.GENOTYPE_GIVEN_ALLELES) { @@ -499,6 +502,7 @@ public class UnifiedGenotyperEngine { stratifiedContexts = AlignmentContextUtils.splitContextBySampleName(pileup, UAC.ASSUME_SINGLE_SAMPLE); } else { + // todo - tmp will get rid of extended events so this wont be needed if (!rawContext.hasExtendedEventPileup()) return null; @@ -516,9 +520,6 @@ public class UnifiedGenotyperEngine { } } else if ( model == GenotypeLikelihoodsCalculationModel.Model.SNP ) { - if ( !BaseUtils.isRegularBase( refContext.getBase() ) ) - return null; - // stratify the AlignmentContext and cut by sample stratifiedContexts = AlignmentContextUtils.splitContextBySampleName(rawContext.getBasePileup(), UAC.ASSUME_SINGLE_SAMPLE);