From 8cba86a69dff0e0d64fff77e850fd4459665c2d6 Mon Sep 17 00:00:00 2001 From: depristo Date: Thu, 18 Nov 2010 12:32:55 +0000 Subject: [PATCH] Trivial code organization for the haplotype score git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4703 348d0f76-0448-11de-a6fe-93d51630548a --- .../sting/gatk/walkers/annotator/HaplotypeScore.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/annotator/HaplotypeScore.java b/java/src/org/broadinstitute/sting/gatk/walkers/annotator/HaplotypeScore.java index d539007dd..36093f129 100644 --- a/java/src/org/broadinstitute/sting/gatk/walkers/annotator/HaplotypeScore.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/annotator/HaplotypeScore.java @@ -50,7 +50,15 @@ public class HaplotypeScore implements InfoFieldAnnotation, StandardAnnotation { public boolean useRead(PileupElement p) { return ! ReadUtils.is454Read(p.getRead()); - //return ! (p.getRead() instanceof GATKSAMRecord && ! ((GATKSAMRecord)p.getRead()).isGoodBase(p.getOffset())) && ! ReadUtils.is454Read(p.getRead()); + // TODO -- warning, min. mapping quality fixed to constant 1 here for indels. How can I determine the min. mapping quality? + // if ( ReadUtils.is454Read(p.getRead()) ) // we're not a 454 read + // return false; + // else if ( p.getOffset() == -1 ) // indel + // return p.getRead().getMappingQuality() > 0; + // else if ( ! (p.getRead() instanceof GATKSAMRecord) ) // we're not a GATKSamRecord, so we can't filter + // return true; + // else + // return ((GATKSAMRecord)p.getRead()).isGoodBase(p.getOffset()); // we used the base to call the variant } public Map annotate(RefMetaDataTracker tracker, ReferenceContext ref, Map stratifiedContexts, VariantContext vc) {