binomial coefficient was in log2, changed to log10.

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@6052 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
droazen 2011-06-22 22:54:55 +00:00
parent 082abfd84f
commit ff6386c29b
1 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
package org.broadinstitute.sting.playground.gatk.walkers.replication_validation;
import cern.jet.math.Arithmetic;
import com.google.common.collect.ArrayListMultimap;
import com.sun.xml.internal.ws.client.BindingProviderProperties;
import net.sf.samtools.SAMFileHeader;
@ -102,7 +103,7 @@ public class ReplicationValidationWalker extends LocusWalker<Integer, Long> impl
for (byte q=0; q<=maxQualityScore; q++) {
double probMismatch = MathUtils.phredScaleToProbability(q);
model[q] = MathUtils.phredScaleToLog10Probability(phredScaledPrior) +
org.apache.commons.math.util.MathUtils.binomialCoefficientLog(coverage, mismatches) +
Math.log10(Arithmetic.binomial(coverage, mismatches)) +
mismatches * Math.log10(probMismatch) +
matches * Math.log10(1-probMismatch);
}