let picard_mark_duplicates
?(configuration = Tools.Picard.Mark_duplicates_settings.default) bam =
let input_bam = get_bam (AF.get_file bam) in
let output_bam =
(* We assume that the settings do not impact the actual result. *)
Name_file.from_path input_bam#product#path
~readable_suffix:"mark_dups.bam" [] in
Bam (
Tools.Picard.mark_duplicates ~settings:configuration
~run_with ~input_bam output_bam
)|> AF.with_provenance "picard-mark-duplicates"
["bam", AF.get_provenance bam]