From 1ac09ca81e55dee67b012bf1510bb4d9a5fa53fd Mon Sep 17 00:00:00 2001 From: Mark DePristo Date: Fri, 12 Oct 2012 16:16:45 -0400 Subject: [PATCH] More bugfixes on the way to a final push with new Exact model framework -- UnifiedGenotyperEngine uses only the alleles used in genotyping, not the original alleles, when considering which alleles to include in output -- AFCalcFactory has a more informative info message when looking for and selecting an exact model to use in genotyping --- .../sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java | 2 ++ .../sting/gatk/walkers/genotyper/afcalc/AFCalcFactory.java | 5 +++-- 2 files changed, 5 insertions(+), 2 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 fd0f4f0b5..42a47fc5f 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 @@ -375,6 +375,8 @@ public class UnifiedGenotyperEngine { myAlleles.add(vc.getReference()); for ( int i = 0; i < AFresult.getAllelesUsedInGenotyping().size(); i++ ) { final Allele alternateAllele = AFresult.getAllelesUsedInGenotyping().get(i); + if ( alternateAllele.isReference() ) + continue; // we are non-ref if the probability of being non-ref > the emit confidence. // the emit confidence is phred-scaled, say 30 => 10^-3. diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/AFCalcFactory.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/AFCalcFactory.java index 046593c4a..981100eaa 100644 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/AFCalcFactory.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/AFCalcFactory.java @@ -98,7 +98,7 @@ public class AFCalcFactory { final Logger logger) { final int maxAltAlleles = Math.max(UAC.MAX_ALTERNATE_ALLELES, UAC.MAX_ALTERNATE_ALLELES_FOR_INDELS); if ( ! UAC.AFmodel.usableForParams(UAC.samplePloidy, maxAltAlleles) ) { - logger.warn("Requested ploidy / maxAltAlleles " + UAC.samplePloidy + " not supported by requested model " + UAC.AFmodel + " looking for an option"); + logger.info("Requested ploidy " + UAC.samplePloidy + " maxAltAlleles " + maxAltAlleles + " not supported by requested model " + UAC.AFmodel + " looking for an option"); final List supportingCalculations = new LinkedList(); for ( final Calculation calc : Calculation.values() ) { if ( calc.usableForParams(UAC.samplePloidy, maxAltAlleles) ) @@ -108,9 +108,10 @@ public class AFCalcFactory { if ( supportingCalculations.isEmpty() ) throw new UserException("no AFCalculation model found that supports ploidy of " + UAC.samplePloidy + " and max alt alleles " + maxAltAlleles); else if ( supportingCalculations.size() > 1 ) - logger.warn("Warning, multiple supporting AFCalcs found " + Utils.join(",", supportingCalculations) + " choosing first arbitrarily"); + logger.debug("Warning, multiple supporting AFCalcs found " + Utils.join(",", supportingCalculations) + " choosing first arbitrarily"); else UAC.AFmodel = supportingCalculations.get(0); + logger.info("Selecting model " + UAC.AFmodel); } final AFCalc calc = createAFCalc(UAC.AFmodel, nSamples, UAC.MAX_ALTERNATE_ALLELES, UAC.MAX_ALTERNATE_ALLELES_FOR_INDELS, UAC.samplePloidy);