let cufflinks ?reference_build bamf =
let bam = get_bam (AF.get_file bamf) in
let reference_build =
match reference_build with
| None -> bam#product#reference_build
| Some r -> r in
let result_prefix =
Name_file.in_directory ~readable_suffix:"cufflinks" Config.work_dir [
bam#product#escaped_sample_name;
reference_build
] in
Cufflinks_result (
Tools.Cufflinks.run
~reference_build ~bam ~run_with ~result_prefix
)
|> AF.with_provenance "cufflinks" ["bam", AF.get_provenance bamf]
~string_arguments:["reference-build", reference_build]