From 9b8d41160b59ece0a8948bbcb012704cb7a7f711 Mon Sep 17 00:00:00 2001 From: depristo Date: Fri, 18 Mar 2011 02:59:28 +0000 Subject: [PATCH] GENOTYPE_GIVEN_ALLELES now respects the filter status of the incoming alleles file. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@5466 348d0f76-0448-11de-a6fe-93d51630548a --- .../genotyper/DindelGenotypeLikelihoodsCalculationModel.java | 2 +- .../genotyper/SNPGenotypeLikelihoodsCalculationModel.java | 2 +- .../sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/DindelGenotypeLikelihoodsCalculationModel.java b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/DindelGenotypeLikelihoodsCalculationModel.java index c1f23b7e4..fd9d388e5 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/DindelGenotypeLikelihoodsCalculationModel.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/DindelGenotypeLikelihoodsCalculationModel.java @@ -291,7 +291,7 @@ public class DindelGenotypeLikelihoodsCalculationModel extends GenotypeLikelihoo if (getAlleleListFromVCF) { for( final VariantContext vc_input : tracker.getVariantContexts(ref, "alleles", null, ref.getLocus(), false, false) ) { - if( vc_input != null && vc_input.isIndel() && ref.getLocus().getStart() == vc_input.getStart()) { + if( vc_input != null && ! vc_input.isFiltered() && vc_input.isIndel() && ref.getLocus().getStart() == vc_input.getStart()) { vc = vc_input; break; } diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/SNPGenotypeLikelihoodsCalculationModel.java b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/SNPGenotypeLikelihoodsCalculationModel.java index 3372a955b..ae2e1b91d 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/SNPGenotypeLikelihoodsCalculationModel.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/SNPGenotypeLikelihoodsCalculationModel.java @@ -71,7 +71,7 @@ public class SNPGenotypeLikelihoodsCalculationModel extends GenotypeLikelihoodsC bestAlternateAllele = alternateAlleleToUse.getBases()[0]; } else if ( useAlleleFromVCF ) { final VariantContext vcInput = tracker.getVariantContext(ref, "alleles", null, ref.getLocus(), true); - if ( vcInput == null ) + if ( vcInput == null || vcInput.isFiltered() ) return null; if ( !vcInput.isSNP() ) { logger.info("Record at position " + ref.getLocus() + " is not a SNP; skipping..."); 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 0a1880770..f54509c4a 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java @@ -208,7 +208,7 @@ public class UnifiedGenotyperEngine { VariantContext vc; if ( UAC.GenotypingMode == GenotypeLikelihoodsCalculationModel.GENOTYPING_MODE.GENOTYPE_GIVEN_ALLELES ) { final VariantContext vcInput = tracker.getVariantContext(ref, "alleles", null, ref.getLocus(), true); - if ( vcInput == null ) + if ( vcInput == null || vcInput.isFiltered() ) return null; vc = new VariantContext("UG_call", vcInput.getChr(), vcInput.getStart(), vcInput.getEnd(), vcInput.getAlleles()); } else {