This is a test version of Biostars. For the public version, visit https://www.biostars.org.
samtools sort failed to merge tmp .bam file

I tried to sort a .bam file with the following command

/data/tam/script/bwa.kit/samtools sort libTTNRgenomemaster_map_lotusgenome.bam > libTTNRgenomemaster_map_lotusgenome.sorted.bam

The following error, together with many ...bam.tmp.XXXX.bam files were generated (XXXX up to 1491)

[bam_sort_core] merging from 1492 files...
[E::hts_open_format] fail to open file 'libTTNRgenomemaster_map_lotusgenome.bam.tmp.1020.bam'

Related threads were read but not helpful.

Any idea how to solve this problem?

Thanks.

samtools bwa bam

Did you run out of space on the disk? How much memory do you have? You could try assigning more memory to sort with -m option. Post the output of ulimit -n.

Hi, i am also having the same issue. THe output of ulimit -n is 1024 Thanks

0 answers

No answers yet.

Log in to answer this question.