From f096a958d6a1ac989bbe81c1b0ac6c83049d83f1 Mon Sep 17 00:00:00 2001 From: ebanks Date: Tue, 9 Mar 2010 19:13:01 +0000 Subject: [PATCH] Initial commit for Andrey of plumbing for indels. Not finished - need to track down bug with him. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2967 348d0f76-0448-11de-a6fe-93d51630548a --- .../genotyper/GenotypeCalculationModel.java | 3 ++- .../GenotypeCalculationModelFactory.java | 3 +++ .../SimpleIndelCalculationModel.java | 23 +++++++++++++++++++ .../walkers/genotyper/UnifiedGenotyper.java | 8 ++++++- .../genotyper/UnifiedGenotyperEngine.java | 3 +++ 5 files changed, 38 insertions(+), 2 deletions(-) create mode 100755 java/src/org/broadinstitute/sting/gatk/walkers/genotyper/SimpleIndelCalculationModel.java diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/GenotypeCalculationModel.java b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/GenotypeCalculationModel.java index 30d2d1c3c..e13bab43c 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/GenotypeCalculationModel.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/GenotypeCalculationModel.java @@ -19,7 +19,8 @@ public abstract class GenotypeCalculationModel implements Cloneable { public enum Model { JOINT_ESTIMATE, - POOLED + POOLED, + INDELS } protected BaseMismatchModel baseModel; diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/GenotypeCalculationModelFactory.java b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/GenotypeCalculationModelFactory.java index e97af33ad..a3d258d82 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/GenotypeCalculationModelFactory.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/GenotypeCalculationModelFactory.java @@ -70,6 +70,9 @@ public class GenotypeCalculationModelFactory { case POOLED: gcm = new PooledCalculationModel(); break; + case INDELS: + gcm = new SimpleIndelCalculationModel(); + break; default: throw new RuntimeException("Unexpected GenotypeCalculationModel " + UAC.genotypeModel); } diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/SimpleIndelCalculationModel.java b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/SimpleIndelCalculationModel.java new file mode 100755 index 000000000..bd76cd10f --- /dev/null +++ b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/SimpleIndelCalculationModel.java @@ -0,0 +1,23 @@ +package org.broadinstitute.sting.gatk.walkers.genotyper; + +import org.broadinstitute.sting.utils.*; +import org.broadinstitute.sting.utils.pileup.*; +import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker; +import org.broadinstitute.sting.gatk.refdata.rodDbSNP; +import org.broadinstitute.sting.gatk.contexts.*; +import org.broadinstitute.sting.gatk.contexts.variantcontext.*; + +import java.util.*; + +public class SimpleIndelCalculationModel extends GenotypeCalculationModel { + + protected SimpleIndelCalculationModel() {} + + public VariantCallContext callLocus(RefMetaDataTracker tracker, char ref, GenomeLoc loc, Map contexts, DiploidGenotypePriors priors) { + + return null; + + //VariantContext vc = new MutableVariantContext("UG_indel_call", loc, alleles, genotypes, phredScaledConfidence/10.0, null, attributes); + //return new VariantCallContext(vc, phredScaledConfidence >= CONFIDENCE_THRESHOLD); + } +} \ No newline at end of file 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 b02b1649a..6ec9ed068 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyper.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyper.java @@ -62,9 +62,13 @@ public class UnifiedGenotyper extends LocusWalker 0 && UAC.genotypeModel != GenotypeCalculationModel.Model.POOLED ) { throw new IllegalArgumentException("Attempting to use a model other than POOLED with pooled data. Please set the model to POOLED."); }