]> git.donarmstrong.com Git - biopieces.git/blobdiff - code_c/Maasha/src/bed2tag_contigs.c
added bed2tag_contigs as backend to assemble_tag_contigs
[biopieces.git] / code_c / Maasha / src / bed2tag_contigs.c
index ae61b359ddcfbea6f391d35f2c835eced72f2e7a..265eb11bc4dcfc25ab12d1b114934a997143a373 100644 (file)
@@ -101,8 +101,8 @@ int main( int argc, char *argv[] )
 
         score = ( ushort ) get_score( entry->q_id );
 
-        if ( score > entry->score ) {
-            barray_interval_inc( ba, entry->chr_beg, entry->chr_end - 1, ( short ) score / entry->score );
+        if ( score > entry->score && entry->score > 0 ) {
+            barray_interval_inc( ba, entry->chr_beg, entry->chr_end - 1, ( ushort ) ( score / entry->score ) );
         }
     }
 
@@ -123,7 +123,7 @@ int main( int argc, char *argv[] )
 
 //                printf( "chr: %s   pos: %zu   beg: %zu   end: %zu   max: %hd\n", chr, pos, beg, end, max );
 
-                printf( "%s\t%zu\t%zu\tID_%08zu\t%hd\n", chr, beg, end + 1, id, max );
+                printf( "%s\t%zu\t%zu\t%s_%08zu\t%u\n", chr, beg, end + 1, chr, id, ( uint ) max );
 
                 id++;
             }