diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/SingleSampleGenotyper.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/SingleSampleGenotyper.java index 499bbe556..0c1a01b2d 100644 --- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/SingleSampleGenotyper.java +++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/SingleSampleGenotyper.java @@ -135,11 +135,9 @@ public class SingleSampleGenotyper extends LocusWalker LOD_THRESHOLD) sum.addGenotypeCall(call); } diff --git a/java/src/org/broadinstitute/sting/utils/genotype/calls/SSGGenotypeCall.java b/java/src/org/broadinstitute/sting/utils/genotype/calls/SSGGenotypeCall.java index 3a275c71d..2ea144f13 100644 --- a/java/src/org/broadinstitute/sting/utils/genotype/calls/SSGGenotypeCall.java +++ b/java/src/org/broadinstitute/sting/utils/genotype/calls/SSGGenotypeCall.java @@ -88,7 +88,7 @@ public class SSGGenotypeCall implements GenotypeCall, GenotypeOutput { // reset the confidence based on either the discovery mode or the genotype mode for (Genotype g : genotypes) { - double val = (discoveryMode) ? Math.abs(likelihoods[index] - best) : Math.abs(likelihoods[index] - ref); + double val = (discoveryMode) ? Math.abs(likelihoods[index] - next) : Math.abs(likelihoods[index] - ref); ((BasicGenotype) g).setConfidenceScore(new BayesianConfidenceScore(val)); mGenotypes.put(likelihoods[index], g); index++; diff --git a/java/src/org/broadinstitute/sting/utils/genotype/confidence/ConfidenceScore.java b/java/src/org/broadinstitute/sting/utils/genotype/confidence/ConfidenceScore.java index f3fe2f199..fd1b46348 100644 --- a/java/src/org/broadinstitute/sting/utils/genotype/confidence/ConfidenceScore.java +++ b/java/src/org/broadinstitute/sting/utils/genotype/confidence/ConfidenceScore.java @@ -12,8 +12,11 @@ public abstract class ConfidenceScore implements Comparable { // the general error of a floating point value private static final Double EPSILON = 1.0e-15; + /** + * the method we use to generate this confidence + */ public enum SCORE_METHOD { - LOD_SCORE, UNKNOWN; + LOD_SCORE, CHIP, UNKNOWN; } private Double mScore; diff --git a/java/src/org/broadinstitute/sting/utils/genotype/variant/Variant.java b/java/src/org/broadinstitute/sting/utils/genotype/variant/Variant.java index 043782317..78bb3d29c 100644 --- a/java/src/org/broadinstitute/sting/utils/genotype/variant/Variant.java +++ b/java/src/org/broadinstitute/sting/utils/genotype/variant/Variant.java @@ -1,6 +1,7 @@ package org.broadinstitute.sting.utils.genotype.variant; import org.broadinstitute.sting.utils.GenomeLoc; +import org.broadinstitute.sting.utils.genotype.confidence.ConfidenceScore; /** * @author aaron @@ -12,7 +13,7 @@ import org.broadinstitute.sting.utils.GenomeLoc; public interface Variant { // the types of variants we currently allow public enum VARIANT_TYPE { - SNP, INDEL, DELETION, REFERENCE + SNP, INDEL, DELETION, REFERENCE // though reference is not really a variant } /** @@ -22,6 +23,13 @@ public interface Variant { */ public VariantFrequency getFrequency(); + /** + * get the confidence score for this variance + * + * @return the confidence score + */ + public ConfidenceScore getConfidenceScore(); + /** @return the VARIANT_TYPE of the current variant */ public VARIANT_TYPE getType(); @@ -57,7 +65,10 @@ public interface Variant { * @return a GenomeLoc */ public GenomeLoc getLocation(); - - + /** + * get the reference base(s) at this position + * @return the reference base or bases, as a string + */ + public String getReference(); }