let prepare ~run_with = function | `Fastq _ as f -> f | `Bam (b, p) -> `Bam (Samtools.sort_bam_if_necessary ~run_with ~by:`Read_name b, p)