Bug fix for the case of overlapping assembled and partially-assembled events created by the HC. Unfortunately the symbolic allele can't be combined with the indel allele because the reference basis will change.
This commit is contained in:
parent
6787f86803
commit
487fb2afb4
|
|
@ -92,6 +92,7 @@ public class GenotypingEngine {
|
||||||
cleanUpSymbolicUnassembledEvents( haplotypes );
|
cleanUpSymbolicUnassembledEvents( haplotypes );
|
||||||
if( !in_GGA_mode && samples.size() >= 10 ) { // if not in GGA mode and have at least 10 samples try to create MNP and complex events by looking at LD structure
|
if( !in_GGA_mode && samples.size() >= 10 ) { // if not in GGA mode and have at least 10 samples try to create MNP and complex events by looking at LD structure
|
||||||
mergeConsecutiveEventsBasedOnLD( haplotypes, samples, haplotypeReadMap, startPosKeySet, ref, refLoc );
|
mergeConsecutiveEventsBasedOnLD( haplotypes, samples, haplotypeReadMap, startPosKeySet, ref, refLoc );
|
||||||
|
cleanUpSymbolicUnassembledEvents( haplotypes ); // the newly created merged events could be overlapping the unassembled events
|
||||||
}
|
}
|
||||||
if( in_GGA_mode ) {
|
if( in_GGA_mode ) {
|
||||||
for( final VariantContext compVC : activeAllelesToGenotype ) {
|
for( final VariantContext compVC : activeAllelesToGenotype ) {
|
||||||
|
|
@ -261,7 +262,6 @@ public class GenotypingEngine {
|
||||||
return returnMap;
|
return returnMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected static void cleanUpSymbolicUnassembledEvents( final List<Haplotype> haplotypes ) {
|
protected static void cleanUpSymbolicUnassembledEvents( final List<Haplotype> haplotypes ) {
|
||||||
final ArrayList<Haplotype> haplotypesToRemove = new ArrayList<Haplotype>();
|
final ArrayList<Haplotype> haplotypesToRemove = new ArrayList<Haplotype>();
|
||||||
for( final Haplotype h : haplotypes ) {
|
for( final Haplotype h : haplotypes ) {
|
||||||
|
|
@ -269,7 +269,7 @@ public class GenotypingEngine {
|
||||||
if( vc.isSymbolic() ) {
|
if( vc.isSymbolic() ) {
|
||||||
for( final Haplotype h2 : haplotypes ) {
|
for( final Haplotype h2 : haplotypes ) {
|
||||||
for( final VariantContext vc2 : h2.getEventMap().values() ) {
|
for( final VariantContext vc2 : h2.getEventMap().values() ) {
|
||||||
if( vc.getStart() == vc2.getStart() && vc2.isIndel() ) {
|
if( vc.getStart() == vc2.getStart() && (vc2.isIndel() || vc2.isMNP()) ) { // unfortunately symbolic alleles can't currently be combined with non-point events
|
||||||
haplotypesToRemove.add(h);
|
haplotypesToRemove.add(h);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue