let background_of_sequence seq pc =
let counts = Caml.Array.make 4 0
and n = ref 0 in
for i = 0 to String.length seq - 1 do
let k = int_of_char seq.[i] in
if k < 4 then (
counts.(k) <- counts.(k) + 1 ;
incr n
)
done ;
Array.map (fun c -> (float c +. pc) /. (float !n +. 4. *. pc)) counts