This is a test version of Biostars. For the public version, visit https://www.biostars.org.
samtools sort error

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?

software error

This message is not an error. It may be posted to stderr, but it is just telling you the final steps of the sorting (samtools sort splits the reads, sorts these subsets, then merges the sorted subsets) are taking place. If this is accompanied by another message containing the word 'error' or something alike, then it's of course a different situation. If this is the only message, you should have a sorted bamfile after the job finishes.

If you just want to convert bam to sam, you can do samtools view -h $bamfile.

1 answer

That is not an error, just an info message. You are fine. It means that the sort created three temporary files which are now being merged.

Log in to answer this question.