let hlarp input =
let out o =
Name_file.from_path o ~readable_suffix:"hlarp.csv" [] in
let hlarp = Tools.Hlarp.run ~run_with in
let hla_result, output_path, prov_argument =
match input with
| `Seq2hla v ->
let r = get_seq2hla_result (AF.get_file v) in
`Seq2hla r, out r#product#work_dir_path, ("seq2hla", AF.get_provenance v)
| `Optitype v ->
let r = get_optitype_result (AF.get_file v) in
`Optitype r, out r#product#path, ("optitype", AF.get_provenance v)
in
let res = hlarp ~hla_result ~output_path in
MHC_alleles res |> AF.with_provenance "hlarp" [prov_argument]