Skip to content

Commit

Permalink
Merge pull request #1 from mbeavitt/feature/fix-warnings
Browse files Browse the repository at this point in the history
Feature/fix warnings
  • Loading branch information
mbeavitt authored Nov 8, 2024
2 parents 49f0b40 + 14d0176 commit acf7971
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions FindJunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,13 +523,16 @@ bool CompareJunctions( int startLocation, char *cigar )
}
else
{
/*
* REMOVED: Unused variables
int softStart = -1 ;
int softEnd = 0 ;
if ( cigarSeg[0].type == 'S' )
softStart = cigarSeg[0].len ;
if ( cigarSeg[ ccnt - 1 ].type == 'S' )
softEnd = cigarSeg[ ccnt - 1 ].len ;
int readLen = strlen( col[9] ) ;
*/
int count[5] = { 0, 0, 0, 0, 0 } ;

int pos = 0 ;
Expand All @@ -543,7 +546,7 @@ bool CompareJunctions( int startLocation, char *cigar )
case 'I':
{
for ( j = 0 ; j < cigarSeg[i].len ; ++j )
++count[ nucToNum[ col[9][pos + j] - 'A' ] ] ;
++count[ (unsigned char) nucToNum[ col[9][pos + j] - 'A' ] ] ;
pos += j ;
} break ;
case 'N':
Expand All @@ -556,8 +559,9 @@ bool CompareJunctions( int startLocation, char *cigar )
max = count[j] ;
sum += count[j] ;
}
if ( max > 0.8 * sum )
if ( max > 0.8 * sum ) {
validRead = false ;
}
count[0] = count[1] = count[2] = count[3] = count[4] = 0 ;
} break ;
case 'H':
Expand All @@ -571,8 +575,9 @@ bool CompareJunctions( int startLocation, char *cigar )
int sum = 0 ;
for ( j = 0 ; j < 5 ; ++j )
{
if ( count[j] > max )
if ( count[j] > max ) {
max = count[j] ;
}
sum += count[j] ;
}
if ( max > 0.8 * sum )
Expand Down Expand Up @@ -965,11 +970,11 @@ int main( int argc, char *argv[] )
break ;
if ( line[0] == '\0' || line[0] == '@' )
continue ;
sscanf( line, "%s%s%s%s%s%s%s%s%s%s%s", col, col + 1, col + 2, col + 3, col + 4,
col + 5, col + 6, col + 7, col + 8, col + 9, col + 10 ) ;
sscanf( line, "%s%s%s%s%s%s%s%s%s%s%s", col[0], col[1], col[2], col[3], col[4],
col[5], col[6], col[7], col[8], col[9], col[10] ) ;

flag = atoi( col[1] ) ;
if ( p = strstr( line, "NH" ) )
if ( (p = strstr( line, "NH" )) )
{
int k = 0 ;
p += 5 ;
Expand Down

0 comments on commit acf7971

Please sign in to comment.