This is a test version of Biostars. For the public version, visit https://www.biostars.org.
samtools sort error: [bam_sort_core] merging from 3 files and 1 in-memory blocks...

Hi there,

When I run script "samtools sort -n -O SAM $bamfile", an error appeared as "[bam_sort_core] merging from 3 files and 1 in-memory blocks..." and the output file is empty? I have checked the memory and it is sufficient (256G memory can be used for the 2 G file ). Anyone can help?

Joe

software error

Hi I have same problem pleas help me? Do you solve your problem? I want convert sam file to txt file but i dont know how?

Hi I want convert sam file to txt file but i dont know how? When I run script "samtools sort -n -O SAM $bamfile", an error appeared as "[bam_sort_core] merging from 3 files and 1 in-memory blocks... How solve this problem?

What version of samtools are you running?

I want convert sam file to txt file but i dont know how?

SAM file is already in text format. No conversion is needed.

Hi I want convert sam file to txt file but i dont know how? When I run script "samtools sort -n -O SAM $bamfile", an error appeared as "[bam_sort_core] merging from 3 files and 1 in-memory blocks... How solve this problem?

1 answer

If you are running the latest samtools then the command should be samtools sort -n -o sorted.bam input.bam (if you want file name sorted). For a 2GB file you should not need to mess with memory settings.

Log in to answer this question.