let picard_clean_bam bam =
let input_bam = get_bam (AF.get_file bam) in
let output_bam_path =
Name_file.from_path
input_bam#product#path
~readable_suffix:"cleaned.bam"
[]
in
Bam (
Tools.Picard.clean_bam ~run_with input_bam output_bam_path
)
|> AF.with_provenance "picard-clean-bam" ["bam", AF.get_provenance bam]