The documentation covers the requirement for random ordered input, however It would be nice to add a check to be sure that a bam file is not coordinate sorted before attempting to process it. (see https://twitter.com/KeywanHP/status/646661366774923264)
Testing for a stretch of reads from the same chromosome and monotonically increasing position is probably a reliable test. If that's hard, at minimum you could check for presence of a so:coordinate header.
The documentation covers the requirement for random ordered input, however It would be nice to add a check to be sure that a bam file is not coordinate sorted before attempting to process it. (see https://twitter.com/KeywanHP/status/646661366774923264)
Testing for a stretch of reads from the same chromosome and monotonically increasing position is probably a reliable test. If that's hard, at minimum you could check for presence of a so:coordinate header.