From e05af54f3eaa9100bbddb2267aead8a72c3b7423 Mon Sep 17 00:00:00 2001 From: ebanks Date: Sun, 7 Nov 2010 03:39:57 +0000 Subject: [PATCH] Found the cause of 80% of our non-called FNs: an excess of filtered bases were causing us to choose the wrong alternate allele. More details to dev team. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4634 348d0f76-0448-11de-a6fe-93d51630548a --- .../gatk/walkers/genotyper/GridSearchAFEstimation.java | 3 ++- .../genotyper/SNPGenotypeLikelihoodsCalculationModel.java | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/genotyper/GridSearchAFEstimation.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/genotyper/GridSearchAFEstimation.java index 6d4cbdc27..23f52471d 100755 --- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/genotyper/GridSearchAFEstimation.java +++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/genotyper/GridSearchAFEstimation.java @@ -228,6 +228,7 @@ public class GridSearchAFEstimation extends AlleleFrequencyCalculationModel { /* System.out.println(frequency); for (int i = 0; i < N; i++) { + System.out.print(samples.get(i)); for (int j=0; j < 3; j++) { System.out.print(String.valueOf(matrix[i][j])); System.out.print(indexes[i] == j ? "* " : " "); @@ -280,4 +281,4 @@ public class GridSearchAFEstimation extends AlleleFrequencyCalculationModel { samplesToGenotypesPerAF.put(frequency, samplesToGenotypes); } } -} \ No newline at end of file +} diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/genotyper/SNPGenotypeLikelihoodsCalculationModel.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/genotyper/SNPGenotypeLikelihoodsCalculationModel.java index cffa3c465..e744c5ca3 100755 --- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/genotyper/SNPGenotypeLikelihoodsCalculationModel.java +++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/genotyper/SNPGenotypeLikelihoodsCalculationModel.java @@ -35,6 +35,7 @@ import org.broadinstitute.sting.gatk.contexts.ReferenceContext; import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker; import org.broad.tribble.util.variantcontext.Allele; import org.apache.log4j.Logger; +import org.broadinstitute.sting.utils.sam.GATKSAMRecord; import java.util.*; @@ -115,8 +116,9 @@ public class SNPGenotypeLikelihoodsCalculationModel extends GenotypeLikelihoodsC // calculate the sum of quality scores for each base ReadBackedPileup pileup = sample.getValue().getContext(StratifiedAlignmentContext.StratifiedContextType.COMPLETE).getBasePileup(); for ( PileupElement p : pileup ) { - // ignore deletions - if ( p.isDeletion() ) + // ignore deletions and filtered bases + if ( p.isDeletion() || + (p.getRead() instanceof GATKSAMRecord && !((GATKSAMRecord)p.getRead()).isGoodBase(p.getOffset())) ) continue; int index = BaseUtils.simpleBaseToBaseIndex(p.getBase());