Splitted sorted BAM files with samtools
1
0
Entering edit mode
3.2 years ago

Hello. I'm trying to use the command "sort" of samtools (ex: samtools sort alignment.bam -o alignment.sorted.bam), but for some reason, instead of generating one single sorted file (ex: alignment.sorted.bam) it generates many files (ex: alignment.sorted.bam.0000.bam, alignment.sorted.bam.0001.bam, alignment.sorted.bam.0002.bam, ..., alignment.sorted.bam.0020.bam). The odd thing is that I had used the exact same command before for a few data of the same batch and it generated a single file. Does anyone have any idea what could be happening and how do I solve this? I'm also thinking of merging the files, if I can't solve it. How do I find out the correct order to merge? Thanks in advance.

samtools sort • 793 views
ADD COMMENT
1
Entering edit mode
3.2 years ago
ATpoint 86k

These are intermediate/temporary files that are created once the chunk of sorted reads exceeds the allocated (-m) memory taht is used to store them in RAM. They should be automatically merged into a single file and then cleaned up unless your job got killed for any reason. Any error messages?

ADD COMMENT
0
Entering edit mode

I see. Thank you.

No. I didn't receive any error messages.

ADD REPLY

Login before adding your answer.

Traffic: 1008 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6