let predictor_to_tool ~run_with predictor =
let get_tool t =
let tool =
Machine.get_tool
run_with
Machine.Tool.Definition.(create t)
in
let ensure = Machine.Tool.(ensure tool) in
let init = Machine.Tool.(init tool) in
(ensure, init)
in
match predictor with
| `NetMHC -> Some (get_tool "netMHC")
| `NetMHCpan -> Some (get_tool "netMHCpan")
| `NetMHCIIpan -> Some (get_tool "netMHCIIpan")
| `NetMHCcons -> Some (get_tool "netMHCcons")
| _ -> None