### Description of the bug Discussed with @maxulysse on Slack: 1. Spark MarkDuplicates wants name sorted output, so BAMs are made as such 2. If requesting BAM output instead of CRAM, merging happens with name sorted output, causing non-contiguous blocks to be close to each other 3. Indexing of the merged BAM fails The options should be made mutually exclusive so that broken output is not generated. ### Command used and terminal output ```console nextflow run nf-core/sarek -r 3.5.1 --input samplesheet.csv -params-file parameters.yaml --outdir ./ -profile cluster -qs 2 -resume --igenomes_ignore ``` ### Relevant files [parameters.zip](https://github.com/user-attachments/files/21593853/parameters.zip) [nextflow-log.zip](https://github.com/user-attachments/files/21593866/nextflow-log.zip) ### System information - Nextflow version: 24.10.2 - Hardware: HPC - Executor: SLURM - Container engine: Apptainer - OS: Debian 10