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