Skip to content

Commit

Permalink
update use of rand
Browse files Browse the repository at this point in the history
  • Loading branch information
brentp committed Aug 7, 2020
1 parent 08c5296 commit c996190
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/copy_number_sampler.nim
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ proc internal_sampler(ibam:Bam, obam:var Bam, regions:TableRef[string, seq[cnv]]

var po = overlap_p(res[0], record)

if res[0].prob < 1 and random(1.0) < res[0].prob:
if po == 1 or po < 3.0 * random(1.0):
if res[0].prob < 1 and rand(1.0) < res[0].prob:
if po == 1 or po < 3.0 * rand(1.0):
obam.write(record)
continue

Expand Down

0 comments on commit c996190

Please sign in to comment.