I got a new computer recently and had to re-install samtools (version 1.5) and a few other programs. Now when I try to sort a bam file, everything goes well (samtools creates all those little intermediate files) until the merging process :
[bam_sort_core] merging from 58 files...
Then it gets stuck. I get no error message but the output file (sorted.bam) remains empty even if I wait hours. When I monitor the activity of samtools, I see that it is reading a lot, but not writing. Any idea on what is going on ?
In case this is useful, I'm on MacOS 10.12, 8 Go, 4 cores and I tried two different settings for sorting :
samtools sort in.bam > sorted.bam # 1st setting samtools sort -@ 4 -m 1G in.bam > sorted.bam # 2d setting