getBestGenotype() does not necessarily return hets in alphabetical order;
the string (unfortunately) needs to be sorted for lookup in the table (otherwise we throw a NullPointerException) TO DO: have the table be smarter instead of sorting each genotype string git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1298 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
ee8ed534e0
commit
f8b1dbe3b3
|
|
@ -267,7 +267,7 @@ public abstract class RatioFilter implements VariantExclusionCriterion {
|
|||
ReadBackedPileup pileup = new ReadBackedPileup(ref, context);
|
||||
if ( applyToVariant(variant) ) {
|
||||
Pair<Integer, Integer> counts = scoreVariant(ref, pileup, variant);
|
||||
GenotypeFeatureData gfd = dataTable.get(variant.getBestGenotype());
|
||||
GenotypeFeatureData gfd = dataTable.get(orderedBases(variant.getBestGenotype()));
|
||||
|
||||
if (integrateOverSamplingProbabilities)
|
||||
exclude = integralExclude(gfd, counts);
|
||||
|
|
@ -314,4 +314,10 @@ public abstract class RatioFilter implements VariantExclusionCriterion {
|
|||
//double value = counts.first / (1.0 * Math.max(counts.second, 1.0));
|
||||
return ! gfd.passesThreshold(value);
|
||||
}
|
||||
|
||||
private String orderedBases(String s) {
|
||||
char[] charArray = s.toCharArray();
|
||||
java.util.Arrays.sort(charArray);
|
||||
return new String(charArray);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue