let to_json t: Yojson.Basic.json =
let {name;
sam_mapq_unique;
overhang_length;
parameters} = t in
`Assoc [
"name", `String name;
"sam_mapq_unique",
(match sam_mapq_unique with
| None -> `Null
| Some x -> `Int x);
"overhang_length",
(match overhang_length with
| None -> `Null
| Some x -> `Int x);
"parameters",
`Assoc (List.map parameters ~f:(fun (a, b) -> a, `String b));
]