Remove the capability of EventMap to emit symbolic alleles for unassembled events

-- These events always occur on the very edge of the haplotypes, and are intrinsically dodgy.  So instead of emitting them and then potentially having to deal with merging real basepair events into them we just no longer emit those events.
This commit is contained in:
Mark DePristo 2013-04-02 15:57:45 -04:00
parent f1d772ac25
commit 7105ad65a6
1 changed files with 3 additions and 2 deletions

View File

@ -105,8 +105,9 @@ public class EventMap extends TreeMap<Integer, VariantContext> {
if( BaseUtils.isRegularBase(refByte) ) {
insertionAlleles.add( Allele.create(refByte, true) );
}
if( cigarIndex == 0 || cigarIndex == cigar.getCigarElements().size() - 1 ) { // if the insertion isn't completely resolved in the haplotype then make it a symbolic allele
insertionAlleles.add( SYMBOLIC_UNASSEMBLED_EVENT_ALLELE );
if( cigarIndex == 0 || cigarIndex == cigar.getCigarElements().size() - 1 ) {
// if the insertion isn't completely resolved in the haplotype, skip it
// note this used to emit SYMBOLIC_UNASSEMBLED_EVENT_ALLELE but that seems dangerous
} else {
byte[] insertionBases = new byte[]{};
insertionBases = ArrayUtils.add(insertionBases, ref[refPos - 1]); // add the padding base