git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2466 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
depristo 2009-12-29 18:08:41 +00:00
parent 5fdf17fccb
commit 29f94119d1
1 changed files with 4 additions and 5 deletions

View File

@ -51,11 +51,10 @@ public class GATKPaperGenotyper extends LocusWalker<SimpleCall, Integer> impleme
if (quals[index] > 0) {
double epsilon = Math.pow(10, quals[index] / -10.0);
byte pileupBase = bases[index];
for (char genotypeBase : genotype.toString().toCharArray())
if (genotypeBase == pileupBase)
likelihoods[genotype.ordinal()] += Math.log10(0.5 * (1 - epsilon) + epsilon / 3);
else
likelihoods[genotype.ordinal()] += Math.log10(epsilon / 3);
for (char genotypeBase : genotype.toString().toCharArray()) {
double p = genotypeBase == pileupBase ? 1 - epsilon : epsilon / 3;
likelihoods[genotype.ordinal()] += Math.log10(p / 2);
}
}
}