<p>Is there a tool like bedtools shuffle which I can use to randomly shuffle a bam file? or will I have to convert my bam into a bed and then shuffle it? thanks</p>

`samtools bamshuf file.bam` does the job. It'll also break up your bam in `-n` (default=64) chunks. Unfortunately though, it wants to shuffle the entire bam and then writes the chunks to disk (does not stream even with the `-O` option). If you just want to sample a few reads from a large bam quickly, you can "shuffle" some coordinates and then use `samtools view file.bam chr:start-start | head -1` to get a read. If you want read pairs, you can either use `samtools bamshuf` or sort the bam by name(`samtools sort -n`).