Reverting bad exact model changes
This commit is contained in:
parent
1561af22af
commit
ab2efe3bd3
|
|
@ -339,7 +339,8 @@ public class ExactAFCalculationModel extends AlleleFrequencyCalculationModel {
|
|||
}
|
||||
}
|
||||
|
||||
final GenotypesContext calls = GenotypesContext.create();
|
||||
GenotypesContext calls = GenotypesContext.create();
|
||||
|
||||
int startIdx = AFofMaxLikelihood;
|
||||
for (int k = sampleIdx; k > 0; k--) {
|
||||
int bestGTguess;
|
||||
|
|
@ -353,7 +354,6 @@ public class ExactAFCalculationModel extends AlleleFrequencyCalculationModel {
|
|||
|
||||
double[] likelihoods = g.getLikelihoods().getAsVector();
|
||||
|
||||
if (MathUtils.sum(likelihoods) <= SUM_GL_THRESH_NOCALL) {
|
||||
if (SIMPLE_GREEDY_GENOTYPER || !vc.isBiallelic()) {
|
||||
bestGTguess = Utils.findIndexOfMaxEntry(likelihoods);
|
||||
}
|
||||
|
|
@ -391,11 +391,22 @@ public class ExactAFCalculationModel extends AlleleFrequencyCalculationModel {
|
|||
}
|
||||
|
||||
final double qual = GenotypeLikelihoods.getQualFromLikelihoods(bestGTguess, likelihoods);
|
||||
//System.out.println(myAlleles.toString());
|
||||
calls.add(new Genotype(sample, myAlleles, qual, null, g.getAttributes(), false));
|
||||
} else {
|
||||
final double qual = Genotype.NO_LOG10_PERROR;
|
||||
calls.add(new Genotype(sample, NO_CALL_ALLELES, qual, null, g.getAttributes(), false));
|
||||
}
|
||||
|
||||
for ( final Genotype genotype : GLs.iterateInSampleNameOrder() ) {
|
||||
if ( !genotype.hasLikelihoods() )
|
||||
continue;
|
||||
Genotype g = GLs.get(genotype.getSampleName());
|
||||
|
||||
double[] likelihoods = genotype.getLikelihoods().getAsVector();
|
||||
|
||||
if (MathUtils.sum(likelihoods) <= SUM_GL_THRESH_NOCALL)
|
||||
continue; // regular likelihoods
|
||||
|
||||
final double qual = Genotype.NO_LOG10_PERROR;
|
||||
calls.add(new Genotype(g.getSampleName(), NO_CALL_ALLELES, qual, null, g.getAttributes(), false));
|
||||
}
|
||||
|
||||
return calls;
|
||||
|
|
|
|||
Loading…
Reference in New Issue