Skip to content

Commit

Permalink
Fix an issue of wrong op precedence
Browse files Browse the repository at this point in the history
  • Loading branch information
mourisl committed May 6, 2022
1 parent 8f26bde commit d322427
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions FindJunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -747,14 +747,13 @@ char GetStrandFromStrandedLib(int flag)
{
if (strandedLib == 0)
return '?' ;

if (flag & 0x80 == 0) // first read or single-end case
if ((flag & 0x80) == 0) // first read or single-end case
{
return (((flag >> 4) & 1) ^ (strandedLib & 1)) ? '+' : '-' ;
return (((flag >> 4) & 1) ^ (strandedLib & 1)) ? '-' : '+' ;
}
else
{
return (((flag >> 4) & 1) ^ (strandedLib & 1)) ? '-' : '+' ;
return (((flag >> 4) & 1) ^ (strandedLib & 1)) ? '+' : '-' ;
}
}

Expand Down
6 changes: 3 additions & 3 deletions alignments.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,13 +414,13 @@ class Alignments
else if (strandedLib != 0)
{
int flag = b->core.flag ;
if (flag & 0x80 == 0) // first read or single-end case
if ((flag & 0x80) == 0) // first read or single-end case
{
return (((flag >> 4) & 1) ^ (strandedLib & 1)) ? 1 : -1 ;
return (((flag >> 4) & 1) ^ (strandedLib & 1)) ? -1 : 1 ;
}
else
{
return (((flag >> 4) & 1) ^ (strandedLib & 1)) ? -1 : 1 ;
return (((flag >> 4) & 1) ^ (strandedLib & 1)) ? 1 : -1 ;
}
}
else
Expand Down

0 comments on commit d322427

Please sign in to comment.