diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotatorEngine.java b/java/src/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotatorEngine.java index ede54514c..dfd76bcc5 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotatorEngine.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotatorEngine.java @@ -145,7 +145,7 @@ public class VariantAnnotatorEngine { List dataSources = engine.getRodDataSources(); for ( ReferenceOrderedDataSource source : dataSources ) { RMDTrack rod = source.getReferenceOrderedData(); - if ( rod.getType().equals(rodDbSNP.class) ) { + if ( rod.getName().equals(rodDbSNP.STANDARD_DBSNP_TRACK_NAME) ) { annotateDbsnp = true; } if ( rod.getName().equals("hapmap2") ) { diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/JointEstimateGenotypeCalculationModel.java b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/JointEstimateGenotypeCalculationModel.java index f8ca92d73..bf9f0dc78 100644 --- a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/JointEstimateGenotypeCalculationModel.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/JointEstimateGenotypeCalculationModel.java @@ -54,10 +54,13 @@ public abstract class JointEstimateGenotypeCalculationModel extends GenotypeCalc // find the alternate allele with the largest sum of quality scores initializeBestAlternateAllele(ref, contexts); + // did we trigger on the provided track? + boolean triggerTrack = tracker.getReferenceMetaData(UnifiedGenotyperEngine.TRIGGER_TRACK_NAME, false).size() > 0; + // if there are no non-ref bases... if ( bestAlternateAllele == null ) { // if we don't want all bases, then we don't need to calculate genotype likelihoods - if ( !ALL_BASE_MODE && !GENOTYPE_MODE ) { + if ( !triggerTrack && !ALL_BASE_MODE && !GENOTYPE_MODE ) { VariantCallContext vcc = new VariantCallContext(false); estimateReferenceConfidence(vcc, contexts, DiploidGenotypePriors.HUMAN_HETEROZYGOSITY, false); return vcc; @@ -77,7 +80,7 @@ public abstract class JointEstimateGenotypeCalculationModel extends GenotypeCalc if ( verboseWriter != null ) printAlleleFrequencyData(ref, loc, frequencyEstimationPoints); - VariantCallContext vcc = createCalls(tracker, ref, contexts, loc, frequencyEstimationPoints); + VariantCallContext vcc = createCalls(tracker, ref, contexts, loc, frequencyEstimationPoints, triggerTrack); // technically, at this point our confidence in a reference call isn't accurately // estimated because it didn't take into account samples with no data @@ -323,7 +326,7 @@ public abstract class JointEstimateGenotypeCalculationModel extends GenotypeCalc return new HashMap(); } - protected VariantCallContext createCalls(RefMetaDataTracker tracker, char ref, Map contexts, GenomeLoc loc, int frequencyEstimationPoints) { + protected VariantCallContext createCalls(RefMetaDataTracker tracker, char ref, Map contexts, GenomeLoc loc, int frequencyEstimationPoints, boolean triggerTrack) { // only need to look at the most likely alternate allele int indexOfMax = BaseUtils.simpleBaseToBaseIndex(bestAlternateAllele); @@ -347,7 +350,7 @@ public abstract class JointEstimateGenotypeCalculationModel extends GenotypeCalc } // return a null call if we don't pass the confidence cutoff or the most likely allele frequency is zero - if ( !ALL_BASE_MODE && ((!GENOTYPE_MODE && bestAFguess == 0) || phredScaledConfidence < CONFIDENCE_THRESHOLD) ) + if ( !triggerTrack && !ALL_BASE_MODE && ((!GENOTYPE_MODE && bestAFguess == 0) || phredScaledConfidence < CONFIDENCE_THRESHOLD) ) return new VariantCallContext(phredScaledConfidence >= CONFIDENCE_THRESHOLD); // output to beagle file if requested diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyper.java b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyper.java index 94b74556e..88ab0d390 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyper.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyper.java @@ -41,8 +41,8 @@ import java.io.File; /** - * A variant caller which unifies the approaches of several disparate callers. Works for single-sample, - * multi-sample, and pooled data. The user can choose from several different incorporated calculation models. + * A variant caller which unifies the approaches of several disparate callers. Works for single-sample and + * multi-sample data. The user can choose from several different incorporated calculation models. */ @Reference(window=@Window(start=-20,stop=20)) @By(DataSource.REFERENCE) diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java index 5b52447b9..a506ae774 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java @@ -56,6 +56,8 @@ import java.util.*; public class UnifiedGenotyperEngine { + public static final String TRIGGER_TRACK_NAME = "trigger"; + // should we annotate dbsnp? protected boolean annotateDbsnp = false; // should we annotate hapmap2? @@ -122,7 +124,7 @@ public class UnifiedGenotyperEngine { List dataSources = toolkit.getRodDataSources(); for ( ReferenceOrderedDataSource source : dataSources ) { RMDTrack rod = source.getReferenceOrderedData(); - if ( rod.getType().equals(rodDbSNP.class) ) { + if ( rod.getName().equals(rodDbSNP.STANDARD_DBSNP_TRACK_NAME) ) { this.annotateDbsnp = true; } if ( rod.getName().equals("hapmap2") ) { @@ -212,7 +214,6 @@ public class UnifiedGenotyperEngine { return null; // stratify the AlignmentContext and cut by sample - // Note that for testing purposes, we may want to throw multi-samples at pooled mode Map stratifiedContexts = StratifiedAlignmentContext.splitContextBySample(pileup, UAC.ASSUME_SINGLE_SAMPLE, null); if ( stratifiedContexts == null ) return null;