From 967ff647b886e2421dd7f1960e519ca4bded029b Mon Sep 17 00:00:00 2001 From: Eric Banks Date: Wed, 2 Nov 2011 13:07:20 -0400 Subject: [PATCH 1/6] Reduced reads shouldn't contribute to Fisher Strand calculations --- .../sting/gatk/walkers/annotator/FisherStrand.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/FisherStrand.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/FisherStrand.java index 393eb549c..2d1d1978c 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/FisherStrand.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/FisherStrand.java @@ -205,7 +205,7 @@ public class FisherStrand extends InfoFieldAnnotation implements StandardAnnotat for ( Map.Entry sample : stratifiedContexts.entrySet() ) { for (PileupElement p : sample.getValue().getBasePileup()) { - if ( p.isDeletion() ) // ignore deletions + if ( p.isDeletion() || p.isReducedRead() ) // ignore deletions and reduced reads continue; if ( p.getRead().getMappingQuality() < 20 || p.getQual() < 20 ) @@ -258,6 +258,8 @@ public class FisherStrand extends InfoFieldAnnotation implements StandardAnnotat continue; for (final PileupElement p: pileup) { + if ( p.isReducedRead() ) // ignore reduced reads + continue; if ( p.getRead().getMappingQuality() < 20) continue; if (indelLikelihoodMap.containsKey(p)) { From 4d35272916c4461d25b17288523f4fca7400985a Mon Sep 17 00:00:00 2001 From: Ryan Poplin Date: Wed, 2 Nov 2011 16:29:10 -0400 Subject: [PATCH 2/6] Bug fixes with Mauricio to functions in ReadUtils used by reduced reads and the haplotype caller. --- .../sting/utils/sam/ReadUtils.java | 153 +++++++----------- 1 file changed, 55 insertions(+), 98 deletions(-) diff --git a/public/java/src/org/broadinstitute/sting/utils/sam/ReadUtils.java b/public/java/src/org/broadinstitute/sting/utils/sam/ReadUtils.java index f8e4927ed..da047a3a0 100755 --- a/public/java/src/org/broadinstitute/sting/utils/sam/ReadUtils.java +++ b/public/java/src/org/broadinstitute/sting/utils/sam/ReadUtils.java @@ -726,38 +726,6 @@ public class ReadUtils { return true; } - /** - * Looks for a read coordinate that corresponds to the reference coordinate in the soft clipped region before - * the alignment start of the read. - * - * @param read - * @param refCoord - * @return the corresponding read coordinate or -1 if it failed to find it (it has been hard clipped before) - */ - @Requires({"refCoord >= read.getUnclippedStart()", "refCoord < read.getAlignmentStart()"}) - private static int getReadCoordinateForReferenceCoordinateBeforeAlignmentStart(SAMRecord read, int refCoord) { - if (getRefCoordSoftUnclippedStart(read) <= refCoord) - return refCoord - getRefCoordSoftUnclippedStart(read) + 1; - return -1; - } - - - /** - * Looks for a read coordinate that corresponds to the reference coordinate in the soft clipped region after - * the alignment end of the read. - * - * @param read - * @param refCoord - * @return the corresponding read coordinate or -1 if it failed to find it (it has been hard clipped before) - */ - @Requires({"refCoord <= read.getUnclippedEnd()", "refCoord > read.getAlignmentEnd()"}) - private static int getReadCoordinateForReferenceCoordinateBeforeAlignmentEnd(SAMRecord read, int refCoord) { - if (getRefCoordSoftUnclippedEnd(read) >= refCoord) - return refCoord - getRefCoordSoftUnclippedStart(read) + 1; - return -1; - } - - public enum ClippingTail { LEFT_TAIL, RIGHT_TAIL @@ -802,96 +770,85 @@ public class ReadUtils { * @param refCoord * @return the read coordinate corresponding to the requested reference coordinate. (see warning!) */ - @Requires({"refCoord >= read.getUnclippedStart()", "refCoord <= read.getUnclippedEnd()"}) + @Requires({"refCoord >= getRefCoordSoftUnclippedStart(read)", "refCoord <= getRefCoordSoftUnclippedEnd(read)"}) @Ensures({"result.getFirst() >= 0", "result.getFirst() < read.getReadLength()"}) public static Pair getReadCoordinateForReferenceCoordinate(SAMRecord read, int refCoord) { int readBases = 0; int refBases = 0; boolean fallsInsideDeletion = false; - if (refCoord < read.getAlignmentStart()) { - readBases = getReadCoordinateForReferenceCoordinateBeforeAlignmentStart(read, refCoord); - if (readBases < 0) - throw new ReviewedStingException("Requested a coordinate in a hard clipped area of the read. No equivalent read coordinate."); - } - else if (refCoord > read.getAlignmentEnd()) { - readBases = getReadCoordinateForReferenceCoordinateBeforeAlignmentEnd(read, refCoord); - if (readBases < 0) - throw new ReviewedStingException("Requested a coordinate in a hard clipped area of the read. No equivalent read coordinate."); - } - else { - int goal = refCoord - read.getAlignmentStart(); // The goal is to move this many reference bases - boolean goalReached = refBases == goal; + int goal = refCoord - getRefCoordSoftUnclippedStart(read); // The goal is to move this many reference bases + boolean goalReached = refBases == goal; - Iterator cigarElementIterator = read.getCigar().getCigarElements().iterator(); - while (!goalReached && cigarElementIterator.hasNext()) { - CigarElement cigarElement = cigarElementIterator.next(); - int shift = 0; + Iterator cigarElementIterator = read.getCigar().getCigarElements().iterator(); + while (!goalReached && cigarElementIterator.hasNext()) { + CigarElement cigarElement = cigarElementIterator.next(); + int shift = 0; - if (cigarElement.getOperator().consumesReferenceBases()) { - if (refBases + cigarElement.getLength() < goal) - shift = cigarElement.getLength(); - else - shift = goal - refBases; + if (cigarElement.getOperator().consumesReferenceBases() || cigarElement.getOperator() == CigarOperator.SOFT_CLIP) { + if (refBases + cigarElement.getLength() < goal) + shift = cigarElement.getLength(); + else + shift = goal - refBases; - refBases += shift; - } - goalReached = refBases == goal; + refBases += shift; + } + goalReached = refBases == goal; - if (!goalReached && cigarElement.getOperator().consumesReadBases()) - readBases += cigarElement.getLength(); + if (!goalReached && cigarElement.getOperator().consumesReadBases()) + readBases += cigarElement.getLength(); - if (goalReached) { - // Is this base's reference position within this cigar element? Or did we use it all? - boolean endsWithinCigar = shift < cigarElement.getLength(); + if (goalReached) { + // Is this base's reference position within this cigar element? Or did we use it all? + boolean endsWithinCigar = shift < cigarElement.getLength(); - // If it isn't, we need to check the next one. There should *ALWAYS* be a next one - // since we checked if the goal coordinate is within the read length, so this is just a sanity check. - if (!endsWithinCigar && !cigarElementIterator.hasNext()) - throw new ReviewedStingException("Reference coordinate corresponds to a non-existent base in the read. This should never happen -- call Mauricio"); + // If it isn't, we need to check the next one. There should *ALWAYS* be a next one + // since we checked if the goal coordinate is within the read length, so this is just a sanity check. + if (!endsWithinCigar && !cigarElementIterator.hasNext()) + throw new ReviewedStingException("Reference coordinate corresponds to a non-existent base in the read. This should never happen -- call Mauricio"); - CigarElement nextCigarElement; + CigarElement nextCigarElement; - // if we end inside the current cigar element, we just have to check if it is a deletion - if (endsWithinCigar) - fallsInsideDeletion = cigarElement.getOperator() == CigarOperator.DELETION; + // if we end inside the current cigar element, we just have to check if it is a deletion + if (endsWithinCigar) + fallsInsideDeletion = cigarElement.getOperator() == CigarOperator.DELETION; + + // if we end outside the current cigar element, we need to check if the next element is an insertion or deletion. + else { + nextCigarElement = cigarElementIterator.next(); + + // if it's an insertion, we need to clip the whole insertion before looking at the next element + if (nextCigarElement.getOperator() == CigarOperator.INSERTION) { + readBases += nextCigarElement.getLength(); + if (!cigarElementIterator.hasNext()) + throw new ReviewedStingException("Reference coordinate corresponds to a non-existent base in the read. This should never happen -- call Mauricio"); - // if we end outside the current cigar element, we need to check if the next element is an insertion or deletion. - else { nextCigarElement = cigarElementIterator.next(); - - // if it's an insertion, we need to clip the whole insertion before looking at the next element - if (nextCigarElement.getOperator() == CigarOperator.INSERTION) { - readBases += nextCigarElement.getLength(); - if (!cigarElementIterator.hasNext()) - throw new ReviewedStingException("Reference coordinate corresponds to a non-existent base in the read. This should never happen -- call Mauricio"); - - nextCigarElement = cigarElementIterator.next(); - } - - // if it's a deletion, we will pass the information on to be handled downstream. - fallsInsideDeletion = nextCigarElement.getOperator() == CigarOperator.DELETION; } - // If we reached our goal outside a deletion, add the shift - if (!fallsInsideDeletion && cigarElement.getOperator().consumesReadBases()) - readBases += shift; + // if it's a deletion, we will pass the information on to be handled downstream. + fallsInsideDeletion = nextCigarElement.getOperator() == CigarOperator.DELETION; + } - // If we reached our goal inside a deletion, but the deletion is the next cigar element then we need - // to add the shift of the current cigar element but go back to it's last element to return the last - // base before the deletion (see warning in function contracts) - else if (fallsInsideDeletion && !endsWithinCigar) - readBases += shift - 1; + // If we reached our goal outside a deletion, add the shift + if (!fallsInsideDeletion && cigarElement.getOperator().consumesReadBases()) + readBases += shift; - // If we reached our goal inside a deletion then we must backtrack to the last base before the deletion - else if (fallsInsideDeletion && endsWithinCigar) - readBases--; - } + // If we reached our goal inside a deletion, but the deletion is the next cigar element then we need + // to add the shift of the current cigar element but go back to it's last element to return the last + // base before the deletion (see warning in function contracts) + else if (fallsInsideDeletion && !endsWithinCigar) + readBases += shift - 1; + + // If we reached our goal inside a deletion then we must backtrack to the last base before the deletion + else if (fallsInsideDeletion && endsWithinCigar) + readBases--; + } } if (!goalReached) throw new ReviewedStingException("Somehow the requested coordinate is not covered by the read. Too many deletions?"); - } + return new Pair(readBases, fallsInsideDeletion); } From e4a583a53f086ebf8c086909066b686ea02def2d Mon Sep 17 00:00:00 2001 From: Mauricio Carneiro Date: Wed, 2 Nov 2011 17:53:10 -0400 Subject: [PATCH 3/6] Fixing docs: No -I in this walker --- .../sting/gatk/walkers/coverage/GCContentByIntervalWalker.java | 1 - 1 file changed, 1 deletion(-) diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/coverage/GCContentByIntervalWalker.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/coverage/GCContentByIntervalWalker.java index 5c2a967b9..f01e8bb3c 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/coverage/GCContentByIntervalWalker.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/coverage/GCContentByIntervalWalker.java @@ -56,7 +56,6 @@ import java.util.List; * -R ref.fasta \ * -T GCContentByInterval \ * -o output.txt \ - * -I input.bam \ * -L input.intervals * * From e1edd6bd12948fac819c70494d7e179f09f7f6d2 Mon Sep 17 00:00:00 2001 From: Eric Banks Date: Wed, 2 Nov 2011 20:32:58 -0400 Subject: [PATCH 4/6] Removing the min mapping quality argument since it wasn't being used in the normal processing of the pileups in UG - only for indel pileups. Instead, we apply the min base quality to the reads in the pileup for indels and define it to be the min 'confidence' of the base. Docs are updated but I didn't rename the argument as I don't want people to complain. --- .../genotyper/UnifiedArgumentCollection.java | 25 +++---------------- .../genotyper/UnifiedGenotyperEngine.java | 8 ++---- .../UnifiedGenotyperIntegrationTest.java | 7 +++--- 3 files changed, 9 insertions(+), 31 deletions(-) diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedArgumentCollection.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedArgumentCollection.java index f437db680..07d9892a1 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedArgumentCollection.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedArgumentCollection.java @@ -31,8 +31,6 @@ import org.broadinstitute.sting.commandline.Input; import org.broadinstitute.sting.commandline.RodBinding; import org.broadinstitute.sting.utils.variantcontext.VariantContext; -import java.io.File; - public class UnifiedArgumentCollection { @@ -103,18 +101,13 @@ public class UnifiedArgumentCollection { @Argument(fullName = "assume_single_sample_reads", shortName = "single_sample", doc = "The single sample that we should assume is represented in the input bam (and therefore associate with all reads regardless of whether they have read groups)", required = false) public String ASSUME_SINGLE_SAMPLE = null; - // TODO -- delete me - @Hidden - @Argument(fullName = "abort_at_too_much_coverage", doc = "Don't call a site if the downsampled coverage is greater than this value", required = false) - public int COVERAGE_AT_WHICH_TO_ABORT = -1; - - // control the various parameters to be used + /** + * The minimum confidence needed in a given base for it to be used in variant calling. Note that the base quality of a base + * is capped by the mapping quality so that bases on reads with low mapping quality may get filtered out depending on this value. + */ @Argument(fullName = "min_base_quality_score", shortName = "mbq", doc = "Minimum base quality required to consider a base for calling", required = false) public int MIN_BASE_QUALTY_SCORE = 17; - @Argument(fullName = "min_mapping_quality_score", shortName = "mmq", doc = "Minimum read mapping quality required to consider a read for calling", required = false) - public int MIN_MAPPING_QUALTY_SCORE = 20; - @Argument(fullName = "max_deletion_fraction", shortName = "deletions", doc = "Maximum fraction of reads with deletions spanning this locus for it to be callable [to disable, set to < 0 or > 1; default:0.05]", required = false) public Double MAX_DELETION_FRACTION = 0.05; @@ -165,14 +158,6 @@ public class UnifiedArgumentCollection { @Argument(fullName = "ignoreSNPAlleles", shortName = "ignoreSNPAlleles", doc = "expt", required = false) public boolean IGNORE_SNP_ALLELES = false; - @Deprecated - @Argument(fullName="output_all_callable_bases", shortName="all_bases", doc="Please use --output_mode EMIT_ALL_SITES instead" ,required=false) - private Boolean ALL_BASES_DEPRECATED = false; - - @Deprecated - @Argument(fullName="genotype", shortName="genotype", doc="Please use --output_mode EMIT_ALL_CONFIDENT_SITES instead" ,required=false) - private Boolean GENOTYPE_DEPRECATED = false; - // Developers must remember to add any newly added arguments to the list here as well otherwise they won't get changed from their default value! public UnifiedArgumentCollection clone() { @@ -189,7 +174,6 @@ public class UnifiedArgumentCollection { uac.STANDARD_CONFIDENCE_FOR_CALLING = STANDARD_CONFIDENCE_FOR_CALLING; uac.STANDARD_CONFIDENCE_FOR_EMITTING = STANDARD_CONFIDENCE_FOR_EMITTING; uac.MIN_BASE_QUALTY_SCORE = MIN_BASE_QUALTY_SCORE; - uac.MIN_MAPPING_QUALTY_SCORE = MIN_MAPPING_QUALTY_SCORE; uac.MAX_DELETION_FRACTION = MAX_DELETION_FRACTION; uac.MIN_INDEL_COUNT_FOR_GENOTYPING = MIN_INDEL_COUNT_FOR_GENOTYPING; uac.INDEL_HETEROZYGOSITY = INDEL_HETEROZYGOSITY; @@ -200,7 +184,6 @@ public class UnifiedArgumentCollection { uac.alleles = alleles; // todo- arguments to remove - uac.COVERAGE_AT_WHICH_TO_ABORT = COVERAGE_AT_WHICH_TO_ABORT; uac.IGNORE_SNP_ALLELES = IGNORE_SNP_ALLELES; uac.BANDED_INDEL_COMPUTATION = BANDED_INDEL_COMPUTATION; return uac; 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 e99b6af60..993a434ac 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 @@ -120,7 +120,6 @@ public class UnifiedGenotyperEngine { this.samples = new TreeSet(samples); // note that, because we cap the base quality by the mapping quality, minMQ cannot be less than minBQ this.UAC = UAC.clone(); - this.UAC.MIN_MAPPING_QUALTY_SCORE = Math.max(UAC.MIN_MAPPING_QUALTY_SCORE, UAC.MIN_BASE_QUALTY_SCORE); this.logger = logger; this.verboseWriter = verboseWriter; @@ -146,9 +145,6 @@ public class UnifiedGenotyperEngine { * @return the VariantCallContext object */ public VariantCallContext calculateLikelihoodsAndGenotypes(RefMetaDataTracker tracker, ReferenceContext refContext, AlignmentContext rawContext) { - if ( UAC.COVERAGE_AT_WHICH_TO_ABORT > 0 && rawContext.size() > UAC.COVERAGE_AT_WHICH_TO_ABORT ) - return null; - final GenotypeLikelihoodsCalculationModel.Model model = getCurrentGLModel(tracker, refContext, rawContext ); if( model == null ) { return (UAC.OutputMode == OUTPUT_MODE.EMIT_ALL_SITES && UAC.GenotypingMode == GenotypeLikelihoodsCalculationModel.GENOTYPING_MODE.GENOTYPE_GIVEN_ALLELES ? generateEmptyContext(tracker, refContext, null, rawContext) : null); @@ -566,7 +562,7 @@ public class UnifiedGenotyperEngine { if (UAC.GenotypingMode == GenotypeLikelihoodsCalculationModel.GENOTYPING_MODE.GENOTYPE_GIVEN_ALLELES) { // regular pileup in this case - ReadBackedPileup pileup = rawContext.getBasePileup() .getMappingFilteredPileup(UAC.MIN_MAPPING_QUALTY_SCORE); + ReadBackedPileup pileup = rawContext.getBasePileup() .getMappingFilteredPileup(UAC.MIN_BASE_QUALTY_SCORE); // don't call when there is no coverage if ( pileup.getNumberOfElements() == 0 && UAC.OutputMode != OUTPUT_MODE.EMIT_ALL_SITES ) @@ -583,7 +579,7 @@ public class UnifiedGenotyperEngine { ReadBackedExtendedEventPileup rawPileup = rawContext.getExtendedEventPileup(); // filter the context based on min mapping quality - ReadBackedExtendedEventPileup pileup = rawPileup.getMappingFilteredPileup(UAC.MIN_MAPPING_QUALTY_SCORE); + ReadBackedExtendedEventPileup pileup = rawPileup.getMappingFilteredPileup(UAC.MIN_BASE_QUALTY_SCORE); // don't call when there is no coverage if ( pileup.getNumberOfElements() == 0 && UAC.OutputMode != OUTPUT_MODE.EMIT_ALL_SITES ) diff --git a/public/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java b/public/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java index 7d6cfc7ad..d47c63827 100755 --- a/public/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java +++ b/public/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java @@ -18,8 +18,8 @@ import java.util.Map; public class UnifiedGenotyperIntegrationTest extends WalkerTest { private final static String baseCommand = "-T UnifiedGenotyper -R " + b36KGReference + " -NO_HEADER -glm BOTH --dbsnp " + b36dbSNP129; - private final static String baseCommandIndels = "-T UnifiedGenotyper -R " + b36KGReference + " -NO_HEADER -glm INDEL --dbsnp " + b36dbSNP129; - private final static String baseCommandIndelsb37 = "-T UnifiedGenotyper -R " + b37KGReference + " -NO_HEADER -glm INDEL --dbsnp " + b37dbSNP132; + private final static String baseCommandIndels = "-T UnifiedGenotyper -R " + b36KGReference + " -NO_HEADER -glm INDEL -mbq 20 --dbsnp " + b36dbSNP129; + private final static String baseCommandIndelsb37 = "-T UnifiedGenotyper -R " + b37KGReference + " -NO_HEADER -glm INDEL -mbq 20 --dbsnp " + b37dbSNP132; // -------------------------------------------------------------------------------------------------------------- // @@ -114,7 +114,6 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { public void testCallingParameters() { HashMap e = new HashMap(); e.put( "--min_base_quality_score 26", "531966aee1cd5dced61c96c4fedb59a9" ); - e.put( "--min_mapping_quality_score 26", "c71ca370947739cb7d87b59452be7a07" ); e.put( "--computeSLOD", "1a5648f26c18ced27df4be031b44e72d" ); for ( Map.Entry entry : e.entrySet() ) { @@ -241,7 +240,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { 1, Arrays.asList("5fe98ee853586dc9db58f0bc97daea63")); - executeTest(String.format("test indel caller in SLX witn low min allele count"), spec); + executeTest(String.format("test indel caller in SLX with low min allele count"), spec); } @Test From 52b16bf739facad1b3bfd05fabbfa18855b31906 Mon Sep 17 00:00:00 2001 From: Eric Banks Date: Wed, 2 Nov 2011 20:45:24 -0400 Subject: [PATCH 5/6] Must check whether there's a normal vs. extended pileup before asking for it. --- .../sting/gatk/walkers/annotator/DepthOfCoverage.java | 2 +- .../sting/gatk/walkers/annotator/QualByDepth.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/DepthOfCoverage.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/DepthOfCoverage.java index ea28a28e4..8098de5b1 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/DepthOfCoverage.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/DepthOfCoverage.java @@ -41,7 +41,7 @@ public class DepthOfCoverage extends InfoFieldAnnotation implements StandardAnno int depth = 0; for ( Map.Entry sample : stratifiedContexts.entrySet() ) - depth += sample.getValue().getBasePileup().depthOfCoverage(); + depth += sample.getValue().hasBasePileup() ? sample.getValue().getBasePileup().depthOfCoverage() : sample.getValue().getExtendedEventPileup().depthOfCoverage(); Map map = new HashMap(); map.put(getKeyNames().get(0), String.format("%d", depth)); return map; diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/QualByDepth.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/QualByDepth.java index 7fcb56b1a..ffc852903 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/QualByDepth.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/QualByDepth.java @@ -43,7 +43,7 @@ public class QualByDepth extends InfoFieldAnnotation implements StandardAnnotati if ( context == null ) continue; - depth += context.getBasePileup().depthOfCoverage(); + depth += context.hasBasePileup() ? context.getBasePileup().depthOfCoverage() : context.getExtendedEventPileup().depthOfCoverage(); } if ( depth == 0 ) From 78a00d2ddcfadc90d47854660343a8a234c76143 Mon Sep 17 00:00:00 2001 From: Eric Banks Date: Wed, 2 Nov 2011 21:13:44 -0400 Subject: [PATCH 6/6] Updating UG integration tests (needed updating only because the -mbq default is different from the old -mmq one). --- .../UnifiedGenotyperIntegrationTest.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/public/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java b/public/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java index d47c63827..b80f214b1 100755 --- a/public/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java +++ b/public/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperIntegrationTest.java @@ -51,7 +51,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { public void testSingleSamplePilot2() { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( baseCommand + " -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -o %s -L 1:10,000,000-10,100,000", 1, - Arrays.asList("d1cbd1fb9f3f7323941a95bc2def7e5a")); + Arrays.asList("6762b72ae60155ad71738d7c76b80e4b")); executeTest("test SingleSample Pilot2", spec); } @@ -61,7 +61,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { // // -------------------------------------------------------------------------------------------------------------- - private final static String COMPRESSED_OUTPUT_MD5 = "2732b169cdccb21eb3ea00429619de79"; + private final static String COMPRESSED_OUTPUT_MD5 = "bc71dba7bbdb23e7d5cc60461fdd897b"; @Test public void testCompressedOutput() { @@ -82,7 +82,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { // Note that we need to turn off any randomization for this to work, so no downsampling and no annotations - String md5 = "cbac3960bbcb9d6192c57549208c182c"; + String md5 = "b9504e446b9313559c3ed97add7e8dc1"; WalkerTest.WalkerTestSpec spec1 = new WalkerTest.WalkerTestSpec( baseCommand + " -dt NONE -G none -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -o %s -L 1:10,000,000-10,075,000", 1, @@ -113,8 +113,8 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { @Test public void testCallingParameters() { HashMap e = new HashMap(); - e.put( "--min_base_quality_score 26", "531966aee1cd5dced61c96c4fedb59a9" ); - e.put( "--computeSLOD", "1a5648f26c18ced27df4be031b44e72d" ); + e.put( "--min_base_quality_score 26", "bb3f294eab3e2cf52c70e63b23aac5ee" ); + e.put( "--computeSLOD", "eb34979efaadba1e34bd82bcacf5c722" ); for ( Map.Entry entry : e.entrySet() ) { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( @@ -160,8 +160,8 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { @Test public void testHeterozyosity() { HashMap e = new HashMap(); - e.put( 0.01, "aed69402ddffe7f2ed5ca98563bfba02" ); - e.put( 1.0 / 1850, "fa94a059f08c1821b721335d93ed2ea5" ); + e.put( 0.01, "f84da90c310367bd51f2ab6e346fa3d8" ); + e.put( 1.0 / 1850, "5791e7fef40d4412b6d8f84e0a809c6c" ); for ( Map.Entry entry : e.entrySet() ) { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( @@ -185,7 +185,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { " -o %s" + " -L 1:10,000,000-10,100,000", 1, - Arrays.asList("1c080e6596d4c830bb5d147b04e2a82c")); + Arrays.asList("9cc9538ac83770e12bd0830d285bfbd0")); executeTest(String.format("test multiple technologies"), spec); } @@ -204,7 +204,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest { " -L 1:10,000,000-10,100,000" + " -baq CALCULATE_AS_NECESSARY", 1, - Arrays.asList("9129ad748ca3be2d3b321d2d7e83ae5b")); + Arrays.asList("eaf8043edb46dfbe9f97ae03baa797ed")); executeTest(String.format("test calling with BAQ"), spec); }