Commit 424c4047 authored by Louis Duchemin's avatar Louis Duchemin
Browse files

Fixes overflow error in Mutsel CpG dinucleotide ratios computation

parent 94b3e90f
......@@ -135,7 +135,7 @@ module Evolution_model = struct
let expected = float_of_int Nucleotide.Table.(get single_counts nuc1 * get single_counts nuc2) /.
float_of_int (Array.length nucleotide_sequence) in
let observed = Array.counti nucleotide_sequence ~f:(fun pos nuc ->
if pos = Array.length nucleotide_sequence then false
if (pos + 1) = Array.length nucleotide_sequence then false
else Nucleotide.(equal nuc nuc1 && equal nucleotide_sequence.(pos+1) nuc2)
)
in
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment