<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>

One option is to use <a href="http://bedops.readthedocs.org/en/latest/content/reference/file-management/conversion/bam2bed.html">*bam2bed*</a> in conjunction with <a href="https://github.com/alexpreynolds/sample">*sample*</a>:

    $ bam2bed < reads.bam > reads.bed
    $ sample -k 1234 reads.bed > random_sample.bed

One advantage of `sample` over GNU `shuf` is that `shuf` loads everything into memory before shuffling, while `sample` uses reservoir sampling on line offsets so that the memory overhead is much, much lower. Memory usage can be an issue for very large input files.