git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/seqbias@54558 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -70,11 +70,11 @@ void kmer_matrix::to_yaml( YAML::Emitter& out ) const |
70 | 70 |
out << YAML::BeginMap; |
71 | 71 |
|
72 | 72 |
out << YAML::Key << "k"; |
73 |
- out << YAML::Value << k; |
|
73 |
+ out << YAML::Value << (unsigned int)k; |
|
74 | 74 |
out << YAML::Key << "n"; |
75 |
- out << YAML::Value << n; |
|
75 |
+ out << YAML::Value << (unsigned int)n; |
|
76 | 76 |
out << YAML::Key << "m"; |
77 |
- out << YAML::Value << m; |
|
77 |
+ out << YAML::Value << (unsigned int)m; |
|
78 | 78 |
out << YAML::Key << "A"; |
79 | 79 |
out << YAML::Flow; |
80 | 80 |
out << YAML::Value; |
... | ... |
@@ -335,13 +335,13 @@ void motif::to_yaml( YAML::Emitter& out ) const |
335 | 335 |
out << YAML::BeginMap; |
336 | 336 |
|
337 | 337 |
out << YAML::Key << "n"; |
338 |
- out << YAML::Value << n; |
|
338 |
+ out << YAML::Value << (unsigned int)n; |
|
339 | 339 |
|
340 | 340 |
out << YAML::Key << "k"; |
341 |
- out << YAML::Value << k; |
|
341 |
+ out << YAML::Value << (unsigned int)k; |
|
342 | 342 |
|
343 | 343 |
out << YAML::Key << "c"; |
344 |
- out << YAML::Value << c; |
|
344 |
+ out << YAML::Value << (unsigned int)c; |
|
345 | 345 |
|
346 | 346 |
out << YAML::Key << "parents"; |
347 | 347 |
out << YAML::Value; |
... | ... |
@@ -722,7 +722,7 @@ void train_motifs( motif& M0, motif& M1, |
722 | 722 |
while( true ) { |
723 | 723 |
round_num++; |
724 | 724 |
|
725 |
- log_printf( LOG_MSG, "round %4d (ic = %0.4e) ", round_num, ic_curr ); |
|
725 |
+ log_printf( LOG_MSG, "round %4zu (ic = %0.4e) ", round_num, ic_curr ); |
|
726 | 726 |
col = 0; |
727 | 727 |
|
728 | 728 |
ic_forw_best = ic_back_best = ic_rev_best = -HUGE_VAL; |
... | ... |
@@ -383,21 +383,22 @@ void sequencing_bias::build( const char* ref_fn, |
383 | 383 |
|
384 | 384 |
/* add a background sequence */ |
385 | 385 |
/* adjust the current read position randomly, and sample */ |
386 |
- for( bg_sample_num = 0; bg_sample_num < bg_samples; bg_sample_num++ ) { |
|
386 |
+ for( bg_sample_num = 0; bg_sample_num < bg_samples; ) { |
|
387 | 387 |
|
388 | 388 |
bg_pos = S[i].pos + (pos)ceil( rand_trunc_gauss( offset_std, -100, 100 ) ); |
389 | 389 |
|
390 | 390 |
if( S[i].strand ) { |
391 |
- if( bg_pos < R || S[i].pos >= seqlen - L ) continue; |
|
391 |
+ if( bg_pos < R || bg_pos >= seqlen - L ) continue; |
|
392 | 392 |
memcpy( local_seq, seq + bg_pos - R, (L+1+R)*sizeof(char) ); |
393 | 393 |
seqrc( local_seq, L+1+R ); |
394 | 394 |
} |
395 | 395 |
else { |
396 |
- if( bg_pos < L || S[i].pos >= seqlen - R ) continue; |
|
396 |
+ if( bg_pos < L || bg_pos >= seqlen - R ) continue; |
|
397 | 397 |
memcpy( local_seq, seq + (bg_pos-L), (L+1+R)*sizeof(char) ); |
398 | 398 |
} |
399 | 399 |
|
400 | 400 |
training_seqs.push_back( new sequence( local_seq, 0 ) ); |
401 |
+ bg_sample_num++; |
|
401 | 402 |
} |
402 | 403 |
} |
403 | 404 |
|