Handle NPE in UG indel code: deletions immediately preceding insertions were not handled well in the code.

This commit is contained in:
Eric Banks 2012-04-17 15:51:23 -04:00
parent 91cb654791
commit 13c800417e
1 changed files with 4 additions and 0 deletions

View File

@ -146,6 +146,10 @@ public class ConsensusAlleleCounter {
String indelString = p.getEventBases();
if ( p.isBeforeInsertion() ) {
// edge case: ignore a deletion immediately preceding an insertion as p.getEventBases() returns null [EB]
if ( indelString == null )
continue;
boolean foundKey = false;
// copy of hashmap into temp arrayList
ArrayList<Pair<String,Integer>> cList = new ArrayList<Pair<String,Integer>>();