Skip to content

Commit

Permalink
This fixes a null pointer exception was thrown when the cigar string
Browse files Browse the repository at this point in the history
contains a deletion immediately prior to the intron. 

This is because the junction counting method required that the read
nucleotides flanking the junction are aligned to the genome. This
commit relaxes this requirement so that the null pointer exception is
not thrown.
  • Loading branch information
shenkers committed Apr 20, 2015
1 parent 6dfdabb commit cc2a50e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions IsoSCM/src/processing/FindSpliceJunctions.java
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,10 @@ public static void updateJunctionCounts2(SAMRecord sr, MapFactory<Character, Map
if(cigarElement.getOperator().consumesReferenceBases()){
boolean consumesReadBases = cigarElement.getOperator().consumesReadBases();

if(consumesReadBases){
if(cigarElement.getOperator()==CigarOperator.N){
alignmentPosition+=cigarElement.getLength();
}
else{
for(int j=0; j<cigarElement.getLength(); j++){
if(lastAlignedPosition!=null){

Expand Down Expand Up @@ -797,9 +800,6 @@ else if(alignmentPosition-lastAlignedPosition!=1 && prevCigarElement.getOperator
alignmentPosition++;
}
}
else{
alignmentPosition+=cigarElement.getLength();
}
}
prevCigarElement = cigarElement;
}
Expand Down

0 comments on commit cc2a50e

Please sign in to comment.