struct
module Common_config = struct
type t = {
name: string;
gap_open_penalty: int;
gap_extension_penalty: int;
mismatch_penalty: int;
}
end
module Bwa_config (D: sig val default: Common_config.t end) = struct
include Common_config
let name t = t.name
let default = D.default
let to_json
{name; gap_open_penalty; gap_extension_penalty; mismatch_penalty}
=
`Assoc [
"name", `String name;
"gap_open_penalty", `Int gap_open_penalty;
"gap_extension_penalty", `Int gap_extension_penalty;
"mismatch_penalty", `Int mismatch_penalty;
]
end
let bwa_mem_default = {Common_config.
name = "default-bwa-mem";
gap_open_penalty = 6;
gap_extension_penalty = 1;
mismatch_penalty = 4;
}
module Mem = Bwa_config(struct let default = bwa_mem_default end)
let bwa_aln_default = {Common_config.
name = "default-bwa-aln";
gap_open_penalty = 11;
gap_extension_penalty = 4;
mismatch_penalty = 3;
}
module Aln = Bwa_config(struct let default = bwa_aln_default end)
end