let bam ~sample_name ?sorting ~reference_build input =
fun ~var_count ->
function_call "bam" [
"sample_name", string sample_name;
"sorting",
string (
Option.value_map ~default:"NONE" sorting
~f:(function `Coordinate -> "Coordinate" | `Read_name -> "Read-name")
);
"reference_build", string reference_build;
"file", input ~var_count;
]