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;
|
int startIdx = AFofMaxLikelihood;
|
||||||
for (int k = sampleIdx; k > 0; k--) {
|
for (int k = sampleIdx; k > 0; k--) {
|
||||||
int bestGTguess;
|
int bestGTguess;
|
||||||
|
|
@ -353,7 +354,6 @@ public class ExactAFCalculationModel extends AlleleFrequencyCalculationModel {
|
||||||
|
|
||||||
double[] likelihoods = g.getLikelihoods().getAsVector();
|
double[] likelihoods = g.getLikelihoods().getAsVector();
|
||||||
|
|
||||||
if (MathUtils.sum(likelihoods) <= SUM_GL_THRESH_NOCALL) {
|
|
||||||
if (SIMPLE_GREEDY_GENOTYPER || !vc.isBiallelic()) {
|
if (SIMPLE_GREEDY_GENOTYPER || !vc.isBiallelic()) {
|
||||||
bestGTguess = Utils.findIndexOfMaxEntry(likelihoods);
|
bestGTguess = Utils.findIndexOfMaxEntry(likelihoods);
|
||||||
}
|
}
|
||||||
|
|
@ -391,11 +391,22 @@ public class ExactAFCalculationModel extends AlleleFrequencyCalculationModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
final double qual = GenotypeLikelihoods.getQualFromLikelihoods(bestGTguess, likelihoods);
|
final double qual = GenotypeLikelihoods.getQualFromLikelihoods(bestGTguess, likelihoods);
|
||||||
|
//System.out.println(myAlleles.toString());
|
||||||
calls.add(new Genotype(sample, myAlleles, qual, null, g.getAttributes(), false));
|
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;
|
return calls;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue