Bug fix, wherein triple-hets after genotype refinement need to be left unphased, not just prior to refinement
This commit is contained in:
parent
36daaa7bda
commit
412c466de6
|
|
@ -234,7 +234,7 @@ public class PhaseByTransmission extends RodWalker<Integer, Integer> {
|
||||||
finalGenotypes.add(father);
|
finalGenotypes.add(father);
|
||||||
finalGenotypes.add(child);
|
finalGenotypes.add(child);
|
||||||
|
|
||||||
if (mother.isCalled() && father.isCalled() && child.isCalled() && !(mother.isHet() && father.isHet() && child.isHet())) {
|
if (mother.isCalled() && father.isCalled() && child.isCalled()) {
|
||||||
ArrayList<Genotype> possibleMotherGenotypes = createAllThreeGenotypes(ref, alt, mother);
|
ArrayList<Genotype> possibleMotherGenotypes = createAllThreeGenotypes(ref, alt, mother);
|
||||||
ArrayList<Genotype> possibleFatherGenotypes = createAllThreeGenotypes(ref, alt, father);
|
ArrayList<Genotype> possibleFatherGenotypes = createAllThreeGenotypes(ref, alt, father);
|
||||||
ArrayList<Genotype> possibleChildGenotypes = createAllThreeGenotypes(ref, alt, child);
|
ArrayList<Genotype> possibleChildGenotypes = createAllThreeGenotypes(ref, alt, child);
|
||||||
|
|
@ -265,6 +265,7 @@ public class PhaseByTransmission extends RodWalker<Integer, Integer> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!(bestMotherGenotype.isHet() && bestFatherGenotype.isHet() && bestChildGenotype.isHet())) {
|
||||||
Map<String, Object> attributes = new HashMap<String, Object>();
|
Map<String, Object> attributes = new HashMap<String, Object>();
|
||||||
attributes.putAll(bestChildGenotype.getAttributes());
|
attributes.putAll(bestChildGenotype.getAttributes());
|
||||||
attributes.put(TRANSMISSION_PROBABILITY_TAG_NAME, bestPrior*bestConfigurationLikelihood / norm);
|
attributes.put(TRANSMISSION_PROBABILITY_TAG_NAME, bestPrior*bestConfigurationLikelihood / norm);
|
||||||
|
|
@ -272,6 +273,7 @@ public class PhaseByTransmission extends RodWalker<Integer, Integer> {
|
||||||
|
|
||||||
finalGenotypes = getPhasedGenotypes(bestMotherGenotype, bestFatherGenotype, bestChildGenotype);
|
finalGenotypes = getPhasedGenotypes(bestMotherGenotype, bestFatherGenotype, bestChildGenotype);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return finalGenotypes;
|
return finalGenotypes;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue