From 2ef2f1b24ad2b64604a02a3c6cf8d9c4886c08af Mon Sep 17 00:00:00 2001 From: ebanks Date: Fri, 20 Aug 2010 15:35:47 +0000 Subject: [PATCH] Fix UG's simple indel calculation model so that deletions are created correctly git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4072 348d0f76-0448-11de-a6fe-93d51630548a --- .../gatk/walkers/genotyper/SimpleIndelCalculationModel.java | 3 ++- .../sting/gatk/walkers/genotyper/UnifiedGenotyper.java | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/SimpleIndelCalculationModel.java b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/SimpleIndelCalculationModel.java index b4ad9b7c4..7750ebdf1 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/SimpleIndelCalculationModel.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/SimpleIndelCalculationModel.java @@ -69,7 +69,7 @@ public class SimpleIndelCalculationModel extends GenotypeCalculationModel { if ( bestEvent.charAt(0) == '-' ) { alleles.add( Allele.create(Allele.NULL_ALLELE_STRING,false) ); alleles.add( Allele.create(bestEvent.substring(1), true )); - loc = GenomeLocParser.setStop(loc, loc.getStop() + bestEvent.length()-2); + loc = GenomeLocParser.setStop(loc, loc.getStop() + bestEvent.length()-1); } else throw new StingException("Internal error (probably a bug): event does not conform to expected format: "+ bestEvent); } @@ -78,6 +78,7 @@ public class SimpleIndelCalculationModel extends GenotypeCalculationModel { -1.0 /* log error */, null /* filters */, null /* attributes */); vcc = new VariantCallContext(vc,true); + vcc.setRefBase(ref[0]); /* if ( totalIndels > 0 ) { System.out.println("Calling: "+bestEvent+" ["+bestIndelCount+"/"+totalIndels+"/"+totalCoverage+"] at "+loc); 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 15a763bfc..7c9e74939 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyper.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyper.java @@ -34,7 +34,6 @@ import org.broadinstitute.sting.gatk.walkers.annotator.VariantAnnotatorEngine; import org.broadinstitute.sting.utils.*; import org.broadinstitute.sting.commandline.*; import org.broadinstitute.sting.utils.vcf.VCFUtils; -import org.broadinstitute.sting.utils.genotype.*; import org.broadinstitute.sting.utils.genotype.vcf.*; import java.util.*;