diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/MultiSampleCaller2.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/MultiSampleCaller2.java index 0046dbf0a..d44aef7ea 100644 --- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/MultiSampleCaller2.java +++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/MultiSampleCaller2.java @@ -38,7 +38,7 @@ public class MultiSampleCaller2 extends LocusWalker= 10000) { return null; } // to deal with big piles -- totally arbitrary threshold @@ -369,18 +386,18 @@ public class MultiSampleCaller2 extends LocusWalker delta=%e < %e == %b%n", contexts[0].getLocation(), - allele_likelihoods[0], allele_likelihoods[1], allele_likelihoods[2], allele_likelihoods[3], + Math.log10(allele_likelihoods[0]), Math.log10(allele_likelihoods[1]), Math.log10(allele_likelihoods[2]), Math.log10(allele_likelihoods[3]), alDelta, ALLELE_FREQ_TOLERANCE, alDelta < ALLELE_FREQ_TOLERANCE); + } - if ( alDelta < ALLELE_FREQ_TOLERANCE ) { - if ( DEBUG_PRINT ) System.out.printf("Aborting after %d iterations%n", i); - break; - } + //if ( alDelta < ALLELE_FREQ_TOLERANCE ) { + // System.out.printf("Converged after %d iterations%n", i); + // break; + //} // if (CALL_INDELS) // { @@ -812,7 +830,16 @@ public class MultiSampleCaller2 extends LocusWalker MIN_LOD_FOR_STRAND ? StrandScore(context) : 0.0; + + int n_ref = Compute_n_ref(ref, em_result.genotype_likelihoods); + int n_het = Compute_n_het(ref, em_result.genotype_likelihoods); + int n_hom = Compute_n_hom(ref, em_result.genotype_likelihoods); + + //double strand_score = lod > MIN_LOD_FOR_STRAND ? StrandScore(context) : 0.0; + double strand_score; + if (n_het+n_hom > 0) { strand_score = StrandScore(context); } + else { strand_score = 0; } + //EM_Result em_result = EM(contexts); //ClassicGenotypeLikelihoods population_genotype_likelihoods = HardyWeinberg(em_result.allele_likelihoods); @@ -822,10 +849,6 @@ public class MultiSampleCaller2 extends LocusWalker 0.0) { alt = PickAlt(ref, em_result.allele_likelihoods); } if ((n_het > 0) || (n_hom > 0)) { alt = PickAlt(ref, em_result.allele_likelihoods); }