Samtools sort crash
1
0
Entering edit mode
7.2 years ago
saaz1291 ▴ 20

Hi, I am trying to use samtools to sort my bam files: samtools sort <name>.bam -o <name>_sorted.bam.

After a while, the terminal seems to crash. I have linked screenshots of both the terminal window and the system monitor. The problem seems to start around the 15s mark in the system monitor.

http://imgur.com/a/ADoTY

https://imgur.com/J31YJ3o

I have tried this with a variety of bam file sizes, from 10 MB to 500 MB (made from sam files of 35 MB and 3 GB respectively). I have also tried using less memory (-@ 1 -m 3G). But the problem occurs in each one. I can see some temp files but not the final output.

alignment samtools • 3.1k views
ADD COMMENT
0
Entering edit mode

Hi, I can't see the screenshots. Make sure you added them or output the error here.

Edit: Ok thanks for adding. The screenshots are not too helpful. It is much easier if you add a reproducible example of your issue, along with the error message that should come up.

By the way, I am guessing that by your screenshot you are trying to view the bam file. This will not be possible if you just open as it is a binary file. You can see it with samtools with the following: samtools view -h file.bam | less

ADD REPLY
0
Entering edit mode

Hi, I edited the post to include the links. Thanks for pointing that out!

ADD REPLY
0
Entering edit mode

So, the problem is that the whole gibberish on the screen ends, by itself with no particular error message, and I can actually type in more commands on the terminal. But the temp files remain in the directory, and the expected output file never appears.

http://imgur.com/a/lnRX2

That is what it looks at the end.

Edit: This happens not when I'm viewing the file, but just running the sort command.

ADD REPLY
0
Entering edit mode

You may want to run the process in the background through a screen session for example. Could be that this is just timing for some reason.

ADD REPLY
2
Entering edit mode
7.2 years ago

my guess: You're using an old version of samtools but you're using the arguments of the new version. (or vice/versa)

http://www.htslib.org/doc/samtools-0.1.19.html

vs

http://www.htslib.org/doc/samtools.html

ADD COMMENT
0
Entering edit mode

Thanks! That was it!

ADD REPLY

Login before adding your answer.

Traffic: 2427 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