fix weird samtools crash when sorting piped bam in subread/junc