When I attempt to merge BAM files I receive the following:
[bam_index_core] the alignment is not sorted (NS500126:311:HFGKHBGXX:4:21604:15061:18811): 3000920 > 3000506 in 1-th chr [bam_index_build2] fail to index the BAM file. *** glibc detected *** python: double free or corruption (!prev): 0x0000000003687440
If I load my BAMs into Cistrome Galaxy, the SAMtools BAM merge works just fine. What is going on?