CoverM gives wrong results if the BAM files are not sorted and it doesn't warn the user that the input should be sorted.
jgi_summarize_bam_contig_depths raises the following error message if the input is not sorted:
ERROR: the bam file 'test_sequences.bam' is not sorted!
Please execute 'samtools sort' on unsorted input bam files and try again!