add decider code for bam slicing, copied from bwa workflow decider