Skip to content

Commit

Permalink
Fix an about reinitalizing an varible
Browse files Browse the repository at this point in the history
  • Loading branch information
mourisl committed Sep 1, 2017
1 parent 0339e80 commit dfd1266
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions alignments.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ class Alignments
if ( bam_cigar2qlen( &b->core, rawCigar ) != b->core.l_qseq )
continue ;

len = 0 ;
for ( i = 0 ; i < b->core.n_cigar ; ++i )
{
int op = rawCigar[i] & BAM_CIGAR_MASK ;
Expand Down Expand Up @@ -157,10 +158,12 @@ class Alignments
segments[ segCnt ].b = start + len - 1 ;
++segCnt ;
}

/*for ( i = 0 ; i < segCnt ; ++i )
printf( "(%d %d) ", segments[i].a, segments[i].b ) ;
printf( "\n" ) ;*/
/*if ( !strcmp( bam1_qname( b ), "chr1:109656301-109749401W:ENST00000490758.2:381:1480:1090:1290:X" ) )
{
for ( i = 0 ; i < segCnt ; ++i )
printf( "(%d %d) ", segments[i].a, segments[i].b ) ;
printf( "\n" ) ;
}*/

// Check whether the mates are compatible
//int mChrId = b->core.mtid ;
Expand Down Expand Up @@ -232,6 +235,11 @@ class Alignments
return 1 ;
}

int GetReadLength()
{
return b->core.l_qseq ;
}

bool IsReverse()
{
if ( b->core.flag & 0x10 )
Expand Down

0 comments on commit dfd1266

Please sign in to comment.