hash *chr_hash = NULL;
hash_elem *bucket = NULL;
barray *ba = NULL;
- ushort score = 0;
+ uint score = 0;
size_t i = 0;
char *chr = NULL;
size_t beg = 0;
size_t end = 0;
size_t pos = 0;
- ushort max = 0;
+ uint max = 0;
size_t id = 0;
entry = bed_entry_new( BED_COLS );
hash_add( chr_hash, entry->chr, ba );
}
- score = ( ushort ) get_score( entry->q_id );
+ score = ( uint ) 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, ( uint ) ( score / entry->score ) );
}
}
// 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++;
}